Darkflow: Neuer Dataset-Trainingsfehler – „AttributeError: ‚NoneType‘-Objekt hat kein Attribut ‚Shape‘“

Erstellt am 30. Mai 2017  ·  23Kommentare  ·  Quelle: thtrieu/darkflow

Hallo,

Ich trainiere einen neuen Datensatz. Das Training läuft jedoch immer einige Schritte und stößt plötzlich auf folgenden Fehler: "AttributeError: 'NoneType' object has no attribute 'shape'". Ich denke, dass das Anmerkungsformat und der Dateiname in der Anmerkungsdatei korrekt sind, da das Training einige Schritte dauern kann und mir Ideen für weitere Fehlerbehebungen einfallen.

Schätzen Sie Ideen oder Hilfe dazu.

Danke schön.

root<strong i="9">@dd84391fd870</strong>:/ml/darkflow# flow --model cfg/tiny-yolo-new.cfg --train --dataset "../data/new/JPEGImages" --annotation "../data/new/Annotations"

Parsing cfg/tiny-yolo-new.cfg
Loading None ...
Finished in 0.00011324882507324219s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 40)
-------+--------+----------------------------------+---------------
Running entirely on CPU
cfg/tiny-yolo-new.cfg loss hyper-parameters:
    H       = 13
    W       = 13
    box     = 5
    classes = 3
    scales  = [1.0, 5.0, 1.0, 1.0]
Building cfg/tiny-yolo-new.cfg loss
Building cfg/tiny-yolo-new.cfg train op
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
Finished in 7.207982778549194s

Enter training ...

cfg/tiny-yolo-new.cfg parsing ../data/new/Annotations
Parsing for ['tank', 'truck', 'apc'] 
[====================>]100%  000296.xml
Statistics:
apc: 48
tank: 70
truck: 24
Dataset size: 130
Dataset of 130 instance(s)
Training statistics: 
    Learning rate : 1e-05
    Batch size    : 16
    Epoch number  : 1000
    Backup every  : 2000
step 1 - loss 106.16172790527344 - moving ave loss 106.16172790527344
step 2 - loss 106.1773681640625 - moving ave loss 106.16329193115234
step 3 - loss 106.09341430664062 - moving ave loss 106.15630416870117
step 4 - loss 106.24054718017578 - moving ave loss 106.16472846984863
step 5 - loss 106.12216186523438 - moving ave loss 106.1604718093872
step 6 - loss 106.24075317382812 - moving ave loss 106.1684999458313
Traceback (most recent call last):
  File "/usr/local/bin/flow", line 6, in <module>
    cliHandler(sys.argv)
  File "/usr/local/lib/python3.5/dist-packages/darkflow/cli.py", line 29, in cliHandler
    print('Enter training ...'); tfnet.train()
  File "/usr/local/lib/python3.5/dist-packages/darkflow/net/flow.py", line 37, in train
    for i, (x_batch, datum) in enumerate(batches):
  File "/usr/local/lib/python3.5/dist-packages/darkflow/net/yolo/data.py", line 113, in shuffle
    inp, new_feed = self._batch(train_instance)
  File "/usr/local/lib/python3.5/dist-packages/darkflow/net/yolov2/data.py", line 27, in _batch
    img = self.preprocess(path, allobj)
  File "/usr/local/lib/python3.5/dist-packages/darkflow/net/yolo/predict.py", line 61, in preprocess
    result = imcv2_affine_trans(im)
  File "/usr/local/lib/python3.5/dist-packages/darkflow/utils/im_transform.py", line 19, in imcv2_affine_trans
    h, w, c = im.shape
AttributeError: 'NoneType' object has no attribute 'shape'

Hilfreichster Kommentar

Ich bin in der Vergangenheit darauf gestoßen. Es besteht eine hohe Wahrscheinlichkeit, dass einige .xml - oder .jpg -Dateien nicht richtig benannt/konfiguriert sind. Eine Möglichkeit, Fehler zu debuggen, besteht darin, hinzuzufügen

print(jpg)

Nach dieser Zeile: https://github.com/thtrieu/darkflow/blob/master/darkflow/net/yolov2/data.py#L26

So können Sie den Namen der beschädigten Datei sehen und entweder .xml oder .jpg untersuchen.

Alle 23 Kommentare

Überprüfen Sie Ihre XML-Dateien. Enthält der Dateiname die Erweiterung Ihrer Bilder?

Ja, der Dateiname enthält die Erweiterung meiner Bilder: .jpg.

Unten ist eine der XML-Dateien:

<annotation>
  <folder>JPEGImages</folder>
  <filename>/ml/data/new/JPEGImages/000004.jpg</filename>
  <source>
    <database>Unknown</database>
  </source>
  <size>
    <width>386</width>
    <height>257</height>
    <depth>3</depth>
  </size>
  <segmented>0</segmented>
  <object>
    <name>tank</name>
    <pose>Unspecified</pose>
    <truncated>0</truncated>
    <difficult>0</difficult>
    <bndbox>
      <xmin>80</xmin>
      <ymin>51</ymin>
      <xmax>357</xmax>
      <ymax>220</ymax>
    </bndbox>
  </object>
</annotation>

@ wendq86 Da das nicht funktioniert - können Sie versuchen, die Dateinamen einfach ohne den Pfad einzufügen, dh <filename>000004.jpg</filename> , und sehen, ob sich dadurch etwas ändert, wenn Sie versuchen, zu trainieren?

@abagshaw Danke für den Vorschlag. Ich habe versucht, die Dateinamen ohne den Pfad einzufügen, und es tritt immer noch derselbe Fehler auf.

Irgendwelche anderen Ideen?

root<strong i="8">@154b72514519</strong>:/ml/darkflow# flow --model cfg/tiny-yolo-new.cfg --train --dataset "/ml/data/new/JPEGImages" --annotation "/ml/data/new/Annotations"

Parsing cfg/tiny-yolo-new.cfg
Loading None ...
Finished in 0.00011515617370605469s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 40)
-------+--------+----------------------------------+---------------
Running entirely on CPU
cfg/tiny-yolo-new.cfg loss hyper-parameters:
    H       = 13
    W       = 13
    box     = 5
    classes = 3
    scales  = [1.0, 5.0, 1.0, 1.0]
Building cfg/tiny-yolo-new.cfg loss
Building cfg/tiny-yolo-new.cfg train op
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
Finished in 6.813853979110718s

Enter training ...

cfg/tiny-yolo-new.cfg parsing /ml/data/new/Annotations
Parsing for ['tank', 'truck', 'apc'] 
[====================>]100%  000296.xml
Statistics:
tank: 70
truck: 24
apc: 48
Dataset size: 130
Dataset of 130 instance(s)
Training statistics: 
    Learning rate : 1e-05
    Batch size    : 16
    Epoch number  : 1000
    Backup every  : 2000
step 1 - loss 105.96209716796875 - moving ave loss 105.96209716796875
step 2 - loss 105.95611572265625 - moving ave loss 105.9614990234375
step 3 - loss 105.87786865234375 - moving ave loss 105.95313598632812
Traceback (most recent call last):
  File "/usr/local/bin/flow", line 6, in <module>
    cliHandler(sys.argv)
  File "/usr/local/lib/python3.5/dist-packages/darkflow/cli.py", line 29, in cliHandler
    print('Enter training ...'); tfnet.train()
  File "/usr/local/lib/python3.5/dist-packages/darkflow/net/flow.py", line 37, in train
    for i, (x_batch, datum) in enumerate(batches):
  File "/usr/local/lib/python3.5/dist-packages/darkflow/net/yolo/data.py", line 113, in shuffle
    inp, new_feed = self._batch(train_instance)
  File "/usr/local/lib/python3.5/dist-packages/darkflow/net/yolov2/data.py", line 27, in _batch
    img = self.preprocess(path, allobj)
  File "/usr/local/lib/python3.5/dist-packages/darkflow/net/yolo/predict.py", line 61, in preprocess
    result = imcv2_affine_trans(im)
  File "/usr/local/lib/python3.5/dist-packages/darkflow/utils/im_transform.py", line 19, in imcv2_affine_trans
    h, w, c = im.shape
AttributeError: 'NoneType' object has no attribute 'shape'

@wendq86 Das Seltsame ist, dass beim ersten Schritt kein Fehler auftritt ... was darauf hindeuten kann, dass einige der .xml -Dateien richtig konfiguriert sind und andere nicht? Sind Sie 100 % sicher, dass _alle_ Dateien das Format <filename>000004.jpg</filename> verwenden. Besteht die Möglichkeit, dass einer (oder mehrere) nicht richtig konfiguriert ist/sind? Ich bin mir nicht sicher, wie Sie das Format für all diese Dateien ändern ... aber vielleicht fehlen einige, wenn Sie ein Tool verwenden, um eine Menge Dateien im Stapel zu ändern?

Das einzige andere, was mir einfällt, ist, dass vielleicht einige Bilder aus /ml/data/new/JPEGImages entfernt wurden, aber die entsprechenden .xml Dateien wurden nicht aus /ml/data/new/Annotations entfernt? Gibt es in /ml/data/new/Annotations genauso viele .xml Dateien wie in /ml/data/new/JPEGImages Bilder?

Ich bin in der Vergangenheit darauf gestoßen. Es besteht eine hohe Wahrscheinlichkeit, dass einige .xml - oder .jpg -Dateien nicht richtig benannt/konfiguriert sind. Eine Möglichkeit, Fehler zu debuggen, besteht darin, hinzuzufügen

print(jpg)

Nach dieser Zeile: https://github.com/thtrieu/darkflow/blob/master/darkflow/net/yolov2/data.py#L26

So können Sie den Namen der beschädigten Datei sehen und entweder .xml oder .jpg untersuchen.

Danke @abagshaw und @thtrieu! Ich habe die Ursache des Problems gefunden, indem ich ein Python-Skript geschrieben habe, um die XML-Dateien zu analysieren und die Werte für Breite, Höhe, ymin, ymax, xmin und xmax zu überprüfen. Das Problem liegt an zwei JPG-Dateien, die von opencv nicht richtig geladen werden können, was dazu führt, dass Breite und Höhe in den von labelImg geschriebenen XML-Dateien mit 0 angegeben werden.

Der Vorschlag von @thtrieu ist sehr hilfreich. Ich habe print nicht verwendet, um das Problem .jpg oder .xml herauszufinden.
Für alle, die mit Darkflow anfangen, möchte nur sichergehen, ob es in Ihrer Umgebung funktioniert oder nicht. Ich habe hier ein kleines Fazit gezogen, aufgrund der Probleme, auf die ich gestoßen bin:

  1. Verwenden Sie Daten aus darkflow-master/test/training/annotations und .../images, sodass Sie das VOCformat-Tool nicht berücksichtigen müssen. Sie haben hier zwei .xml-Dateien. (1.xml, 2.xml)
  2. Erstellen Sie Ihre eigene _test_labels.txt_, geben Sie aufgrund der Daten drei Klassennamen ein (nur zwei Bilder mit Pferd und Fahrrad, Sie können den Klassennamen aus der .xml-Datei erhalten, öffnen Sie sie einfach und überprüfen Sie sie).
    Person
    Fahrrad
    Pferd
  3. Ändern Sie die _classes_ und _filters_ in der .cfg-Datei, und Sie müssen den Namen von *.cfg ändern, da sonst ein anderes Problem auftreten wird, und ändern Sie NICHT die .weights, die Sie verwenden möchten, da sonst ein anderes Problem auftritt.
  4. Führen Sie den folgenden Code aus, um zu überprüfen, ob er in Ihrer Umgebung ausgeführt wird oder nicht.
    flow --model ../tiny-yolo-voc-try.cfg --load ../tiny-yolo-voc.weights --labels ../test_labels.txt --train --annotation ../annotations --dataset ../images --gpu 1.0

wendq86 können Sie uns bitte Ihr Skript mitteilen!

Ich bin in der Vergangenheit darauf gestoßen. Es besteht eine hohe Wahrscheinlichkeit, dass einige .xml - oder .jpg -Dateien nicht richtig benannt/konfiguriert sind. Eine Möglichkeit, Fehler zu debuggen, besteht darin, hinzuzufügen

print(jpg)

Nach dieser Zeile: https://github.com/thtrieu/darkflow/blob/master/darkflow/net/yolov2/data.py#L26

So können Sie den Namen der beschädigten Datei sehen und entweder .xml oder .jpg untersuchen.

Wie würde ich vorgehen, um das Problem zu beheben, wenn es die JPEGs sind? Ich hatte das gleiche Problem und führte die Druckanweisung aus.

Ich habe diese Ausgabe:

cfg/yolov2-tiny-c1v2.cfg parsing lung_train/annotations
Parsing for ['Opacity']
[====================>]100%  012a5620-d082-4bb8-9b3b-e72d8938000c.xml
Statistics:
Opacity: 11
Dataset size: 6
Dataset of 6 instance(s)
**010ccb9f-6d46-4380-af11-84f87397a1b8.jpg
00c0b293-48e7-4e16-ac76-9269ba535a62**

Ich weiß nicht genau, was das bedeutet, außer dass die 2. Bilddatei kein .jpg dahinter hat.

Dataset size: 10
Dataset of 10 instance(s)
Traceback (most recent call last):
  File "flow", line 6, in <module>
    cliHandler(sys.argv)
  File "/content/darkflow/darkflow/cli.py", line 33, in cliHandler
    print('Enter training ...'); tfnet.train()
  File "/content/darkflow/darkflow/net/flow.py", line 39, in train
    for i, (x_batch, datum) in enumerate(batches):
  File "/content/darkflow/darkflow/net/yolo/data.py", line 114, in shuffle
    inp, new_feed = self._batch(train_instance)
  File "/content/darkflow/darkflow/net/yolov2/data.py", line 28, in _batch
    img = self.preprocess(path, allobj)
  File "/content/darkflow/darkflow/net/yolo/predict.py", line 62, in preprocess
    result = imcv2_affine_trans(im)
  File "/content/darkflow/darkflow/utils/im_transform.py", line 20, in imcv2_affine_trans
    h, w, c = im.shape
AttributeError: 'NoneType' object has no attribute 'shape'

bekomme diesen Fehler, wie man ihn behebt, bitte helfen

@ wendq86 Da das nicht funktioniert - können Sie versuchen, die Dateinamen einfach ohne den Pfad einzufügen, dh <filename>000004.jpg</filename> , und sehen, ob sich dadurch etwas ändert, wenn Sie versuchen, zu trainieren?

das hat bei mir funktioniert

Hallo, ich hatte das gleiche Problem, als ich den COCO-Datensatz trainieren wollte. So behebe ich dieses Problem:

  1. Ich verwende https://github.com/tylin/coco-dpm/blob/master/coco/convert_to_pascalformat.py , um das COCO-json-Format in das XML-Format zu konvertieren.

  2. Wir müssen jedoch einen Teil des Skripts ändern, um sicherzustellen, dass das Format dieser neuen XML-Datei mit dem Format von VOC XML im Darkflow-Beispiel übereinstimmt (darkflow/test/training/annotations). Zum Beispiel:
    COCO XML aus dem Skript von Schritt 1 ist:
    <tag1>
    xxxxx
    </tag1>
    <tag2>
    xxxxx
    </tag2>
    Aber wir brauchen das Format wie:
    <tag1>xxxxx</tag>
    <tag2>xxxxx</tag2>

3 Ändern Sie in der Datei „label.txt“ „tvmonitor“ in „tv“.

Ich habe alle JPEG-Bilder gelöscht und es hat funktioniert

Hallo,

Ich trainiere einen neuen Datensatz. Das Training läuft jedoch immer einige Schritte und stößt plötzlich auf folgenden Fehler: "AttributeError: 'NoneType' object has no attribute 'shape'". Ich denke, dass das Anmerkungsformat und der Dateiname in der Anmerkungsdatei korrekt sind, da das Training einige Schritte dauern kann und mir Ideen für weitere Fehlerbehebungen einfallen.

Schätzen Sie Ideen oder Hilfe dazu.

Danke schön.

root<strong i="10">@dd84391fd870</strong>:/ml/darkflow# flow --model cfg/tiny-yolo-new.cfg --train --dataset "../data/new/JPEGImages" --annotation "../data/new/Annotations"

Parsing cfg/tiny-yolo-new.cfg
Loading None ...
Finished in 0.00011324882507324219s

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 40)
-------+--------+----------------------------------+---------------
Running entirely on CPU
cfg/tiny-yolo-new.cfg loss hyper-parameters:
  H       = 13
  W       = 13
  box     = 5
  classes = 3
  scales  = [1.0, 5.0, 1.0, 1.0]
Building cfg/tiny-yolo-new.cfg loss
Building cfg/tiny-yolo-new.cfg train op
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
Finished in 7.207982778549194s

Enter training ...

cfg/tiny-yolo-new.cfg parsing ../data/new/Annotations
Parsing for ['tank', 'truck', 'apc'] 
[====================>]100%  000296.xml
Statistics:
apc: 48
tank: 70
truck: 24
Dataset size: 130
Dataset of 130 instance(s)
Training statistics: 
  Learning rate : 1e-05
  Batch size    : 16
  Epoch number  : 1000
  Backup every  : 2000
step 1 - loss 106.16172790527344 - moving ave loss 106.16172790527344
step 2 - loss 106.1773681640625 - moving ave loss 106.16329193115234
step 3 - loss 106.09341430664062 - moving ave loss 106.15630416870117
step 4 - loss 106.24054718017578 - moving ave loss 106.16472846984863
step 5 - loss 106.12216186523438 - moving ave loss 106.1604718093872
step 6 - loss 106.24075317382812 - moving ave loss 106.1684999458313
Traceback (most recent call last):
  File "/usr/local/bin/flow", line 6, in <module>
    cliHandler(sys.argv)
  File "/usr/local/lib/python3.5/dist-packages/darkflow/cli.py", line 29, in cliHandler
    print('Enter training ...'); tfnet.train()
  File "/usr/local/lib/python3.5/dist-packages/darkflow/net/flow.py", line 37, in train
    for i, (x_batch, datum) in enumerate(batches):
  File "/usr/local/lib/python3.5/dist-packages/darkflow/net/yolo/data.py", line 113, in shuffle
    inp, new_feed = self._batch(train_instance)
  File "/usr/local/lib/python3.5/dist-packages/darkflow/net/yolov2/data.py", line 27, in _batch
    img = self.preprocess(path, allobj)
  File "/usr/local/lib/python3.5/dist-packages/darkflow/net/yolo/predict.py", line 61, in preprocess
    result = imcv2_affine_trans(im)
  File "/usr/local/lib/python3.5/dist-packages/darkflow/utils/im_transform.py", line 19, in imcv2_affine_trans
    h, w, c = im.shape
AttributeError: 'NoneType' object has no attribute 'shape'

alle JPEG-Bilder löschen

Hallo, ich versuche, die benutzerdefinierte Objekterkennung zu trainieren, um mein Firmenlogo zu erkennen. Bis zu diesem Fehler lief alles gut. Ich habe auch Bilder gelöscht und erneut mit Anmerkungen versehen, aber es ändert sich nichts am Ergebnis. Kann mir bitte jemand dabei helfen
Danke schön

(base) C:\Users\karanbari>cd Desktop/YOLO/darkflow-master

(base) C:\Users\karanbari\Desktop\YOLO\darkflow-master>python flow --model cfg/tiny-yolo-voc-1c.cfg --load bin/tiny-yolo-voc.weights --train --annotation annotations_clean --dataset images/train_clean --epoch 300
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
WARNING: Logging before flag parsing goes to stderr.
W1124 18:22:27.201594 10144 deprecation_wrapper.py:119] From C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\build.py:15: The name tf.train.RMSPropOptimizer is deprecated. Please use tf.compat.v1.train.RMSPropOptimizer instead.

W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] From C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\build.py:16: The name tf.train.AdadeltaOptimizer is deprecated. Please use tf.compat.v1.train.AdadeltaOptimizer instead.

W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] From C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\build.py:17: The name tf.train.AdagradOptimizer is deprecated. Please use tf.compat.v1.train.AdagradOptimizer instead.

W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] From C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\build.py:18: The name tf.train.AdagradDAOptimizer is deprecated. Please use tf.compat.v1.train.AdagradDAOptimizer instead.

W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] From C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\build.py:19: The name tf.train.MomentumOptimizer is deprecated. Please use tf.compat.v1.train.MomentumOptimizer instead.


Parsing ./cfg/tiny-yolo-voc.cfg
Parsing cfg/tiny-yolo-voc-1c.cfg
Loading bin/tiny-yolo-voc.weights ...
Successfully identified 63471556 bytes
Finished in 0.019990205764770508s

Building net ...
W1124 18:22:27.253580 10144 deprecation_wrapper.py:119] From C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\build.py:105: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
W1124 18:22:27.257580 10144 deprecation_wrapper.py:119] From C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\ops\baseop.py:70: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.

W1124 18:22:27.261598 10144 deprecation_wrapper.py:119] From C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\ops\baseop.py:71: The name tf.get_variable is deprecated. Please use tf.compat.v1.get_variable instead.

W1124 18:22:27.277594 10144 deprecation_wrapper.py:119] From C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\ops\baseop.py:84: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.

       |        | input                            | (?, 416, 416, 3)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
W1124 18:22:27.389549 10144 deprecation_wrapper.py:119] From C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\ops\simple.py:106: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.

 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 30)
-------+--------+----------------------------------+---------------
Running entirely on CPU
cfg/tiny-yolo-voc-1c.cfg loss hyper-parameters:
        H       = 13
        W       = 13
        box     = 5
        classes = 1
        scales  = [1.0, 5.0, 1.0, 1.0]
W1124 18:22:29.962576 10144 deprecation.py:323] From C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\yolov2\train.py:87: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.cast` instead.
Building cfg/tiny-yolo-voc-1c.cfg loss
W1124 18:22:30.010835 10144 deprecation_wrapper.py:119] From C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\yolov2\train.py:107: The name tf.summary.scalar is deprecated. Please use tf.compat.v1.summary.scalar instead.

Building cfg/tiny-yolo-voc-1c.cfg train op
W1124 18:22:30.102793 10144 deprecation.py:323] From C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\ops\math_grad.py:1205: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
W1124 18:22:32.038406 10144 deprecation.py:506] From C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\training\rmsprop.py:119: calling Ones.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W1124 18:22:32.795700 10144 deprecation_wrapper.py:119] From C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\build.py:145: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

2019-11-24 18:22:32.800843: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
Finished in 11.774582862854004s

Enter training ...

cfg/tiny-yolo-voc-1c.cfg parsing annotations_clean
Parsing for ['vodafone']
[====================>]100%  Image9.xml
Statistics:
Dataset size: 53
Dataset of 53 instance(s)
Image20.jpg
Traceback (most recent call last):
  File "flow", line 6, in <module>
    cliHandler(sys.argv)
  File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\cli.py", line 33, in cliHandler
    print('Enter training ...'); tfnet.train()
  File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\flow.py", line 39, in train
    for i, (x_batch, datum) in enumerate(batches):
  File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\yolo\data.py", line 114, in shuffle
    inp, new_feed = self._batch(train_instance)
  File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\yolov2\data.py", line 28, in _batch
    img = self.preprocess(path, allobj)
  File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\yolo\predict.py", line 62, in preprocess
    result = imcv2_affine_trans(im)
  File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\utils\im_transform.py", line 20, in imcv2_affine_trans
    h, w, c = im.shape
AttributeError: 'NoneType' object has no attribute 'shape'

Enthält Ihr Bildname Sonderzeichen? Wenn ja, ändern Sie sie.

Am Sonntag, den 24. November 2019 um 18:32 Uhr schrieb Karan Bari [email protected] :

Hallo, ich versuche, die benutzerdefinierte Objekterkennung zu trainieren, um meine zu erkennen
Firmenlogo, ging alles gut bis zu diesem Fehler habe ich auch gelöscht und
kommentierte Bilder erneut, aber es ändert sich nichts am Ergebnis. Kann bitte jemand
hilf mir dabei
Danke schön

(Basis) C:\Benutzer\karanbari>cd Desktop/YOLO/darkflow-master

(Basis) C:\Users\karanbari\Desktop\YOLOdarkflow-master>python flow --model cfg/tiny-yolo-voc-1c.cfg --load bin/tiny-yolo-voc.weights --train --annotation annotations_clean --dataset images/train_clean --epoch 300
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden.
np_resource = np.dtype([("ressource", np.ubyte, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden.
np_resource = np.dtype([("ressource", np.ubyte, 1)])
WARNUNG: Die Protokollierung vor dem Flag-Parsing geht an stderr.
W1124 18:22:27.201594 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:15: Der Name tf.train.RMSPropOptimizer ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.train.RMSPropOptimizer.

W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:16: Der Name tf.train.AdadeltaOptimizer ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.train.AdadeltaOptimizer.

W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:17: Der Name tf.train.AdagradOptimizer ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.train.AdagradOptimizer.

W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:18: Der Name tf.train.AdagradDAOptimizer ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.train.AdagradDAOptimizer.

W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:19: Der Name tf.train.MomentumOptimizer ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.train.MomentumOptimizer.

Analysieren von ./cfg/tiny-yolo-voc.cfg
Analysieren von cfg/tiny-yolo-voc-1c.cfg
bin/tiny-yolo-voc.weights werden geladen ...
63471556 Bytes erfolgreich identifiziert
Beendet in 0,019990205764770508s

Baunetz ...
W1124 18:22:27.253580 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:105: Der Name tf.placeholder ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.placeholder.

Quelle | Zug? | Schichtbeschreibung | Ausgabegröße
-------+--------+------------------------------- -+---------------
W1124 18:22:27.257580 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:70: Der Name tf.variable_scope ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.variable_scope.

W1124 18:22:27.261598 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:71: Der Name tf.get_variable ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.get_variable.

W1124 18:22:27.277594 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:84: Der Name tf.placeholder_with_default ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.placeholder_with_default.

   |        | input                            | (?, 416, 416, 3)

Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 416, 416, 16)
W1124 18:22:27.389549 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\simple.py:106: Der Name tf.nn.max_pool ist veraltet. Bitte verwenden Sie stattdessen tf.nn.max_pool2d.

Laden | Ja! | maxp 2x2p0_2 | (?, 208, 208, 16)
Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 208, 208, 32)
Laden | Ja! | maxp 2x2p0_2 | (?, 104, 104, 32)
Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 104, 104, 64)
Laden | Ja! | maxp 2x2p0_2 | (?, 52, 52, 64)
Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 52, 52, 128)
Laden | Ja! | maxp 2x2p0_2 | (?, 26, 26, 128)
Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 26, 26, 256)
Laden | Ja! | maxp 2x2p0_2 | (?, 13, 13, 256)
Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 13, 13, 512)
Laden | Ja! | maxp 2x2p0_1 | (?, 13, 13, 512)
Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 13, 13, 1024)
Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 13, 13, 1024)
Initialisieren | Ja! | conv 1x1p0_1 linear | (?, 13, 13, 30)
-------+--------+------------------------------- -+---------------
Läuft komplett auf CPU
cfg/tiny-yolo-voc-1c.cfg Verlust-Hyperparameter:
H = 13
B = 13
Kästchen = 5
Klassen = 1
Skalen = [1,0, 5,0, 1,0, 1,0]
W1124 18:22:29.962576 10144 deprecation.py:323] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:87: to_float (von tensorflow.python.ops.math_ops) ist veraltet und wird in einer zukünftigen Version entfernt.
Anleitung zum Update:
Verwenden Sie stattdessen tf.cast .
Erstellen von cfg/tiny-yolo-voc-1c.cfg-Verlust
W1124 18:22:30.010835 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:107: Der Name tf.summary.scalar ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.summary.scalar.

Erstellen von cfg/tiny-yolo-voc-1c.cfg Zug op
W1124 18:22:30.102793 10144 deprecation.py:323] Von C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\ops\math_grad.py:1205: add_dispatch_support..wrapper (aus tensorflow.python.ops.array_ops) ist veraltet und wird in einer zukünftigen Version entfernt.
Anleitung zum Update:
Verwenden Sie tf.where in 2.0, das dieselbe Übertragungsregel wie np.where hat
W1124 18:22:32.038406 10144 deprecation.py:506] Von C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\training\rmsprop.py:119: Aufruf von Ones.__init__ (von tensorflow.python .ops.init_ops) mit dtype ist veraltet und wird in einer zukünftigen Version entfernt.
Anleitung zum Update:
Rufen Sie die Initialisierungsinstanz mit dem dtype-Argument auf, anstatt es an den Konstruktor zu übergeben
W1124 18:22:32.795700 10144 deprecation_wrapper.py:119] Aus C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:145: Der Name tf.Session ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.Session.

2019-11-24 18:22:32.800843: I tensorflow/core/platform/cpu_feature_guard.cc:142] Ihre CPU unterstützt Anweisungen, für deren Verwendung diese TensorFlow-Binärdatei nicht kompiliert wurde: AVX2
Beendet in 11.774582862854004s

Ausbildung betreten ...

cfg/tiny-yolo-voc-1c.cfg parsing annotations_clean
Parsing für ['vodafone']
[====================>]100% Image9.xml
Statistiken:
Datensatzgröße: 53
Datensatz von 53 Instanz(en)
Bild20.jpg
Traceback (letzter Aufruf zuletzt):
Datei "flow", Zeile 6, in
CLIHandler(sys.argv)
Datei "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\cli.py", Zeile 33, in cliHandler
print('Training eingeben ...'); tfnet.train()
Datei "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\flow.py", Zeile 39, im Zug
für i, (x_batch, datum) in enumerate(batches):
Datei "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolodata.py", Zeile 114, in zufälliger Reihenfolge
inp, new_feed = self._batch(train_instance)
Datei "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2data.py", Zeile 28, in _batch
img = self.preprocess (Pfad, allobj)
Datei „C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolo\predict.py“, Zeile 62, im Vorprozess
Ergebnis = imcv2_affine_trans(im)
Datei "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflowutils\im_transform.py", Zeile 20, in imcv2_affine_trans
h, w, c = im.form
AttributeError: 'NoneType'-Objekt hat kein Attribut 'Shape'


Sie erhalten dies, weil Sie kommentiert haben.
Antworten Sie direkt auf diese E-Mail und zeigen Sie sie auf GitHub an
https://github.com/thtrieu/darkflow/issues/265?email_source=notifications&email_token=AGG23MNSSXWIHQFI75KYEWDQVJ3ORA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAKXNA#issuecomment-5587,863
oder abbestellen
https://github.com/notifications/unsubscribe-auth/AGG23MMETFBN5NG76IHGWZ3QVJ3ORANCNFSM4DNJVSVQ
.

Enthält Ihr Bildname Sonderzeichen? Wenn ja, ändern Sie sie.

Am Sonntag, 24. November 2019 um 18:32 Uhr, karan bari @ . * > schrieb: Hallo, ich versuche, die benutzerdefinierte Objekterkennung zu trainieren, um mein Firmenlogo zu erkennen. Bis zu diesem Fehler lief alles gut. Ich habe auch Bilder gelöscht und erneut mit Anmerkungen versehen, aber es ändert sich nichts am Ergebnis. Kann mir bitte jemand mit diesem Dankeschön helfen (Basis) C:\Users\karanbari>cd Desktop/YOLO/darkflow-master (Basis) C:\Users\karanbari\Desktop\YOLOdarkflow-master>python flow --model cfg/ tiny-yolo-voc-1c.cfg --load bin/tiny-yolo-voc.weights --train --annotation annotations_clean --dataset images/train_clean --epoch 300 C:\Users\karanbari\Anaconda3\lib\site -packages\tensorflow\python\frameworkdtypes.py:516: FutureWarning: Das Übergeben von (type, 1) oder '1type' als Synonym für type ist veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:517: FutureWarning: Passing (type , 1) oder '1type' als Synonym für type ist veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:518: FutureWarning: Passing (type , 1) oder '1type' als Synonym für type ist veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:519: FutureWarning: Passing (type , 1) oder '1type' als Synonym für type ist veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:520: FutureWarning: Passing (type , 1) oder '1type' als Synonym für type ist veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:525: FutureWarning: Passing (type , 1) oder '1type' als Synonym für type ist veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden. np_resource = np.dtype([("resource", np.ubyte, 1)]) C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:541: FutureWarning: Passing (type , 1) oder '1type' als Synonym für type ist veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:542: FutureWarning: Passing (type , 1) oder '1type' als Synonym für type ist veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:543: FutureWarning: Passing (type , 1) oder '1type' als Synonym für type ist veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:544: FutureWarning: Passing (type , 1) oder '1type' als Synonym für type ist veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:545: FutureWarning: Passing (type , 1) oder '1type' als Synonym für type ist veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:550: FutureWarning: Passing (type , 1) oder '1type' als Synonym für type ist veraltet; in einer zukünftigen Version von numpy wird es als (type, (1,)) / '(1,)type' verstanden. np_resource = np.dtype([("resource", np.ubyte, 1)]) WARNUNG: Die Protokollierung vor dem Flag-Parsing geht an stderr. W1124 18:22:27.201594 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:15: Der Name tf.train.RMSPropOptimizer ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.train.RMSPropOptimizer. W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:16: Der Name tf.train.AdadeltaOptimizer ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.train.AdadeltaOptimizer. W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:17: Der Name tf.train.AdagradOptimizer ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.train.AdagradOptimizer. W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:18: Der Name tf.train.AdagradDAOptimizer ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.train.AdagradDAOptimizer. W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:19: Der Name tf.train.MomentumOptimizer ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.train.MomentumOptimizer. Parsing ./cfg/tiny-yolo-voc.cfg Parsing cfg/tiny-yolo-voc-1c.cfg Loading bin/tiny-yolo-voc.weights ... Erfolgreich identifiziert 63471556 Bytes Beendet in 0.019990205764770508s Building net ... W1124 18:22:27.253580 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:105: Der Name tf.placeholder ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.placeholder. Quelle | Zug? | Schichtbeschreibung | Ausgabegröße -------+--------+------------------------------- ---+--------------- W1124 18:22:27.257580 10144 deprecation_wrapper.py:119] From C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\ baseop.py:70: Der Name tf.variable_scope ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.variable_scope. W1124 18:22:27.261598 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:71: Der Name tf.get_variable ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.get_variable. W1124 18:22:27.277594 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:84: Der Name tf.placeholder_with_default ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.placeholder_with_default. | | Eingabe | (?, 416, 416, 3) Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 416, 416, 16) W1124 18:22:27.389549 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\simple.py:106: Der Name tf. nn.max_pool ist veraltet. Bitte verwenden Sie stattdessen tf.nn.max_pool2d. Laden | Ja! | maxp 2x2p0_2 | (?, 208, 208, 16) Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 208, 208, 32) Laden | Ja! | maxp 2x2p0_2 | (?, 104, 104, 32) Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 104, 104, 64) Laden | Ja! | maxp 2x2p0_2 | (?, 52, 52, 64) Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 52, 52, 128) Laden | Ja! | maxp 2x2p0_2 | (?, 26, 26, 128) Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 26, 26, 256) Laden | Ja! | maxp 2x2p0_2 | (?, 13, 13, 256) Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 13, 13, 512) Laden | Ja! | maxp 2x2p0_1 | (?, 13, 13, 512) Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 13, 13, 1024) Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 13, 13, 1024) Initialisieren | Ja! | conv 1x1p0_1 linear | (?, 13, 13, 30) -------+--------+------------------------ ----------+--------------- Läuft komplett auf CPU cfg/tiny-yolo-voc-1c.cfg Verlust Hyperparameter: H = 13 W = 13 Box = 5 Klassen = 1 Skalen = [1.0, 5.0, 1.0, 1.0] W1124 18:22:29.962576 10144 deprecation.py:323] From C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\ train.py:87: to_float (aus tensorflow.python.ops.math_ops) ist veraltet und wird in einer zukünftigen Version entfernt. Anleitung zum Aktualisieren: Verwenden Sie stattdessen tf.cast . Erstellen von cfg/tiny-yolo-voc-1c.cfg Verlust W1124 18:22:30.010835 10144 deprecation_wrapper.py:119] Von C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:107: Der Name tf.summary.scalar ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.summary.scalar. Building cfg/tiny-yolo-voc-1c.cfg train op W1124 18:22:30.102793 10144 deprecation.py:323] Von C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\ops\math_grad .py:1205: add_dispatch_support..wrapper (aus tensorflow.python.ops.array_ops) ist veraltet und wird in einer zukünftigen Version entfernt. Anweisungen zum Aktualisieren: Verwenden Sie tf.where in 2.0, das dieselbe Broadcast-Regel wie np.where hat W1124 18:22:32.038406 10144 deprecation.py:506] From C:\Users\karanbari\Anaconda3\lib\site-packages\ tensorflow\python\training\rmsprop.py:119: Aufruf von Ones.__init__ (von tensorflow.python.ops.init_ops) mit dtype ist veraltet und wird in einer zukünftigen Version entfernt. Anleitung zur Aktualisierung: Initialisierungsinstanz mit dem dtype-Argument aufrufen, anstatt es an den Konstruktor W1124 18:22:32.795700 10144 deprecation_wrapper.py:119] From C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py zu übergeben :145: Der Name tf.Session ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.Session. 2019-11-24 18:22:32.800843: I tensorflow/core/platform/cpu_feature_guard.cc:142] Ihre CPU unterstützt Anweisungen, für deren Verwendung diese TensorFlow-Binärdatei nicht kompiliert wurde: AVX2 Finished in 11.774582862854004s Enter training ... cfg/ tiny-yolo-voc-1c.cfg parsing annotations_clean Parsing für ['vodafone'] [====================>]100 % Image9.xml Statistik: Datensatzgröße : 53 Datensatz von 53 Instanz(en) Image20.jpg Traceback (letzter Aufruf zuletzt): Datei "flow", Zeile 6, incliHandler(sys.argv) Datei „C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\cli.py“, Zeile 33, in cliHandler print('Enter training ...'); tfnet.train() Datei "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\flow.py", Zeile 39, im Zug für i, (x_batch, datum) in enumerate(batches): Datei "C: \Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolodata.py", Zeile 114, in shuffle inp, new_feed = self._batch(train_instance) Datei "C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ yolov2data.py", Zeile 28, in _batch img = self.preprocess(path, allobj) Datei "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolo\predict.py", Zeile 62, im Vorverarbeitungsergebnis = imcv2_affine_trans(im) Datei "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflowutils\im_transform.py", Zeile 20, in imcv2_affine_trans h, w, c = im.shape AttributeError: 'NoneType' object has no attribute 'shape ' — Sie erhalten dies, weil Sie einen Kommentar abgegeben haben. Antworten Sie auf diese E - Mail direkt, sehen sie auf GitHub <# 265? Email_source = Benachrichtigungen & email_token = AGG23MNSSXWIHQFI75KYEWDQVJ3ORA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAKXNA # issuecomment-557886388> oder abmelden https://github.com/notifications/unsubscribe-auth/AGG23MMETFBN5NG76IHGWZ3QVJ3ORANCNFSM4DNJVSVQ .

Nein, ich habe alle Bilder im Format Image1, Image2, Image3 ... usw. überarbeitet und alle Bilder haben das Format .jpg

Es ist sehr wahrscheinlich, dass eine Ihrer Anmerkungsdimensionen kleiner als ist
0 oder aus dem Bild.

Überprüfen Sie auch, ob Sie alle Bilder manuell öffnen können.

Am Sonntag, den 24. November 2019 um 18:42 Uhr schrieb Karan Bari [email protected] :

Enthält Ihr Bildname Sonderzeichen? Wenn ja, ändern Sie sie.
… <#m_-6851739743886041955_>
Am Sonntag, 24. November 2019 um 18:32 Uhr, karan bari @ . * > schrieb: Hallo, bin ich
Versuch, benutzerdefinierte Objekterkennung zu trainieren, um mein Firmenlogo zu erkennen,
alles lief gut bis zu diesem Fehler, ich habe auch Bilder gelöscht und kommentiert
wieder, aber es ändert sich nichts am Ergebnis. Kann mir bitte jemand dabei helfen
Danke (Basis) C:\Users\karanbari>cd Desktop/YOLO/darkflow-master (Basis)
C:\Benutzer\karanbari\Desktop\YOLOdarkflow-master>python flow --model
cfg/tiny-yolo-voc-1c.cfg --load bin/tiny-yolo-voc.weights --train
--annotation annotations_clean --dataset images/train_clean --epoch 300
C:\Benutzer\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:516:
FutureWarning: Passing (type, 1) oder '1type' als Synonym für type is
veraltet; in einer zukünftigen Version von numpy wird es verstanden als (type,
(1,)) / '(1,)typ'. _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Benutzer\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:517:
FutureWarning: Passing (type, 1) oder '1type' als Synonym für type is
veraltet; in einer zukünftigen Version von numpy wird es verstanden als (type,
(1,)) / '(1,)typ'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Benutzer\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:518:
FutureWarning: Passing (type, 1) oder '1type' als Synonym für type is
veraltet; in einer zukünftigen Version von numpy wird es verstanden als (type,
(1,)) / '(1,)typ'. _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Benutzer\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:519:
FutureWarning: Passing (type, 1) oder '1type' als Synonym für type is
veraltet; in einer zukünftigen Version von numpy wird es verstanden als (type,
(1,)) / '(1,)typ'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Benutzer\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:520:
FutureWarning: Passing (type, 1) oder '1type' als Synonym für type is
veraltet; in einer zukünftigen Version von numpy wird es verstanden als (type,
(1,)) / '(1,)typ'. _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Benutzer\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:525:
FutureWarning: Passing (type, 1) oder '1type' als Synonym für type is
veraltet; in einer zukünftigen Version von numpy wird es verstanden als (type,
(1,)) / '(1,)typ'. np_resource = np.dtype([("ressource", np.ubyte, 1)])
C:\Benutzer\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:541:
FutureWarning: Passing (type, 1) oder '1type' als Synonym für type is
veraltet; in einer zukünftigen Version von numpy wird es verstanden als (type,
(1,)) / '(1,)typ'. _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Benutzer\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:542:
FutureWarning: Passing (type, 1) oder '1type' als Synonym für type is
veraltet; in einer zukünftigen Version von numpy wird es verstanden als (type,
(1,)) / '(1,)typ'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Benutzer\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:543:
FutureWarning: Passing (type, 1) oder '1type' als Synonym für type is
veraltet; in einer zukünftigen Version von numpy wird es verstanden als (type,
(1,)) / '(1,)typ'. _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Benutzer\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:544:
FutureWarning: Passing (type, 1) oder '1type' als Synonym für type is
veraltet; in einer zukünftigen Version von numpy wird es verstanden als (type,
(1,)) / '(1,)typ'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Benutzer\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:545:
FutureWarning: Passing (type, 1) oder '1type' als Synonym für type is
veraltet; in einer zukünftigen Version von numpy wird es verstanden als (type,
(1,)) / '(1,)typ'. _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Benutzer\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:550:
FutureWarning: Passing (type, 1) oder '1type' als Synonym für type is
veraltet; in einer zukünftigen Version von numpy wird es verstanden als (type,
(1,)) / '(1,)typ'. np_resource = np.dtype([("ressource", np.ubyte, 1)])
WARNUNG: Die Protokollierung vor dem Flag-Parsing geht an stderr. W1124 18:22:27.201594
10144 deprecation_wrapper.py:119] Von
C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:15:
Der Name tf.train.RMSPropOptimizer ist veraltet. Benutzen Sie bitte
tf.compat.v1.train.RMSPropOptimizer stattdessen. W1124 18:22:27.209591 10144
deprecation_wrapper.py:119] Von
C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:16:
Der Name tf.train.AdadeltaOptimizer ist veraltet. Benutzen Sie bitte
tf.compat.v1.train.AdadeltaOptimizer stattdessen. W1124 18:22:27.209591 10144
deprecation_wrapper.py:119] Von
C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:17:
Der Name tf.train.AdagradOptimizer ist veraltet. Benutzen Sie bitte
tf.compat.v1.train.AdagradOptimizer stattdessen. W1124 18:22:27.213590 10144
deprecation_wrapper.py:119] Von
C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:18:
Der Name tf.train.AdagradDAOptimizer ist veraltet. Benutzen Sie bitte
tf.compat.v1.train.AdagradDAOptimizer statt dessen. W1124 18:22:27.213590 10144
deprecation_wrapper.py:119] Von
C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:19:
Der Name tf.train.MomentumOptimizer ist veraltet. Benutzen Sie bitte
tf.compat.v1.train.MomentumOptimizer stattdessen. Parsing
./cfg/tiny-yolo-voc.cfg Analysieren cfg/tiny-yolo-voc-1c.cfg Laden
bin/tiny-yolo-voc.weights ... 63471556 Bytes erfolgreich identifiziert
Beendet in 0.019990205764770508s Baunetz ... W1124 18:22:27.253580
10144 deprecation_wrapper.py:119] Von
C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:105:
Der Name tf.placeholder ist veraltet. Bitte verwenden Sie tf.compat.v1.placeholder
stattdessen. Quelle | Zug? | Schichtbeschreibung | Ausgabegröße
-------+--------+------------------------------- -+--------------- W1124
18:22:27.257580 10144 deprecation_wrapper.py:119] Von
C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:70:
Der Name tf.variable_scope ist veraltet. Benutzen Sie bitte
tf.compat.v1.variable_scope stattdessen. W1124 18:22:27.261598 10144
deprecation_wrapper.py:119] Von
C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:71:
Der Name tf.get_variable ist veraltet. Benutzen Sie bitte
tf.compat.v1.get_variable stattdessen. W1124 18:22:27.277594 10144
deprecation_wrapper.py:119] Von
C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:84:
Der Name tf.placeholder_with_default ist veraltet. Benutzen Sie bitte
tf.compat.v1.placeholder_with_default stattdessen. | | Eingabe | (?, 416, 416, 3)
Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 416, 416, 16) W1124
18:22:27.389549 10144 deprecation_wrapper.py:119] Von
C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\simple.py:106:
Der Name tf.nn.max_pool ist veraltet. Bitte verwenden Sie stattdessen tf.nn.max_pool2d.
Laden | Ja! | maxp 2x2p0_2 | (?, 208, 208, 16) Laden | Ja! | conv 3x3p1_1
+normal undicht | (?, 208, 208, 32) Laden | Ja! | maxp 2x2p0_2 | (?, 104, 104,
32) Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 104, 104, 64) Laden | Ja!
| maxp 2x2p0_2 | (?, 52, 52, 64) Laden | Ja! | conv 3x3p1_1 +bnorm undicht |
(?, 52, 52, 128) Laden | Ja! | maxp 2x2p0_2 | (?, 26, 26, 128) Laden | Ja!
| conv 3x3p1_1 +bnorm undicht | (?, 26, 26, 256) Laden | Ja! | maxp 2x2p0_2 |
(?, 13, 13, 256) Laden | Ja! | conv 3x3p1_1 +bnorm undicht | (?, 13, 13, 512)
Laden | Ja! | maxp 2x2p0_1 | (?, 13, 13, 512) Laden | Ja! | conv 3x3p1_1
+normal undicht | (?, 13, 13, 1024) Laden | Ja! | conv 3x3p1_1 +bnorm undicht |
(?, 13, 13, 1024) Initialisieren | Ja! | conv 1x1p0_1 linear | (?, 13, 13, 30)
-------+--------+------------------------------- -+--------------- Läuft
komplett auf CPU cfg/tiny-yolo-voc-1c.cfg Verlust Hyperparameter: H = 13 W =
13 Kästchen = 5 Klassen = 1 Skalen = [1,0, 5,0, 1,0, 1,0] W1124 18:22:29,962576
10144 veraltet.py:323] Von
C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:87:
to_float (von tensorflow.python.ops.math_ops) ist veraltet und wird es sein
in einer zukünftigen Version entfernt. Anleitung zum Update: Verwenden Sie tf.cast
stattdessen. Erstellen von cfg/tiny-yolo-voc-1c.cfg Verlust W1124 18:22:30.010835 10144
deprecation_wrapper.py:119] Von
C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:107:
Der Name tf.summary.scalar ist veraltet. Benutzen Sie bitte
tf.compat.v1.summary.scalar stattdessen. Erstellen von cfg/tiny-yolo-voc-1c.cfg
train op W1124 18:22:30.102793 10144 deprecation.py:323] From
C:\Benutzer\karanbari\Anaconda3\lib\site-packages\tensorflow\python\ops\math_grad.py:1205:
add_dispatch_support..wrapper (von tensorflow.python.ops.array_ops) ist
veraltet und wird in einer zukünftigen Version entfernt. Anweisungen für
Aktualisierung: Verwenden Sie tf.where in 2.0, das die gleiche Broadcast-Regel hat wie
np.where W1124 18:22:32.038406 10144 veraltet.py:506] From
C:\Benutzer\karanbari\Anaconda3\lib\site-packages\tensorflow\python\training\rmsprop.py:119:
rufende Einsen. init (von tensorflow.python.ops.init_ops) mit dtype ist
veraltet und wird in einer zukünftigen Version entfernt. Anweisungen für
Aktualisierung: Aufruf der Initialisierungsinstanz mit dem dtype-Argument statt
Übergabe an den Konstruktor W1124 18:22:32.795700 10144
deprecation_wrapper.py:119] Von
C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:145:
Der Name tf.Session ist veraltet. Bitte verwenden Sie stattdessen tf.compat.v1.Session.
2019-11-24 18:22:32.800843: I
tensorflow/core/platform/cpu_feature_guard.cc:142] Ihre CPU unterstützt
Anweisungen, für deren Verwendung diese TensorFlow-Binärdatei nicht kompiliert wurde: AVX2
Beendet in 11.774582862854004s Training eingeben ... cfg/tiny-yolo-voc-1c.cfg
parsing annotations_clean Parsing für ['vodafone']
[====================>]100% Image9.xml Statistiken: Datensatzgröße: 53 Datensatz
von 53 Instanz(en) Image20.jpg Traceback (letzter Aufruf zuletzt): Datei
"flow", Zeile 6, in der Datei cliHandler(sys.argv).
"C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\cli.py", Zeile 33,
in cliHandler print('Training eingeben ...'); tfnet.train()-Datei
"C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\flow.py",
Zeile 39, im Zug für i, (x_batch, datum) in enumerate(batches): File
"C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolodata.py",
Zeile 114, in shuffle inp, new_feed = self._batch(train_instance) File
"C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2data.py",
Zeile 28, in _batch img = self.preprocess(path, allobj) File
"C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolo\predict.py",
Zeile 62, im Vorverarbeitungsergebnis = imcv2_affine_trans(im) File
"C:\Benutzer\karanbari\Desktop\YOLOdarkflow-masterdarkflowutils\im_transform.py",
Zeile 20, in imcv2_affine_trans h, w, c = im.shape AttributeError:
Das Objekt „NoneType“ hat kein Attribut „Form“ – Sie erhalten dies, weil
du hast kommentiert. Antworten Sie direkt auf diese E-Mail, sehen Sie sie auf GitHub <#265
https://github.com/thtrieu/darkflow/issues/265 ?email_source=notifications&email_token=AGG23MNSSXWIHQFI75KYEWDQVJ3ORA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAKXNA#issuecomment-5858>86
oder abbestellen
https://github.com/notifications/unsubscribe-auth/AGG23MMETFBN5NG76IHGWZ3QVJ3ORANCNFSM4DNJVSVQ
.

Nein, ich habe alle Bilder im Format Image1, Image2, Image3 ... usw. überarbeitet
und alle Bilder haben das .jpg-Format


Sie erhalten dies, weil Sie kommentiert haben.
Antworten Sie direkt auf diese E-Mail und zeigen Sie sie auf GitHub an
https://github.com/thtrieu/darkflow/issues/265?email_source=notifications&email_token=AGG23MJ2SKBIF2FQTPTLBRLQVJ4SVA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAK5PQ#issuecomment-56578 ,
oder abbestellen
https://github.com/notifications/unsubscribe-auth/AGG23ML6HYW6S7JZEN2ZAF3QVJ4SVANCNFSM4DNJVSVQ
.

Ich habe die Bilder dieses Mal erneut mit labelImg kommentiert, das Problem besteht weiterhin.

Enter training ...

cfg/tiny-yolo-voc-1c.cfg parsing annotations_clean
Parsing for ['vodafone']
[====================>]100%  Image8.xml
Statistics:
vodafone: 59
Dataset size: 51
Dataset of 51 instance(s)
**Image7.jpg**
Traceback (most recent call last):
  File "flow", line 6, in <module>
    cliHandler(sys.argv)
  File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\cli.py", line 33, in cliHandler
    print('Enter training ...'); tfnet.train()
  File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\flow.py", line 39, in train
    for i, (x_batch, datum) in enumerate(batches):
  File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\yolo\data.py", line 114, in shuffle
    inp, new_feed = self._batch(train_instance)
  File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\yolov2\data.py", line 28, in _batch
    img = self.preprocess(path, allobj)
  File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\yolo\predict.py", line 62, in preprocess
    result = imcv2_affine_trans(im)
  File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\utils\im_transform.py", line 20, in imcv2_affine_trans
    h, w, c = im.shape
AttributeError: 'NoneType' object has no attribute 'shape'

Hier ist der Fehler noch einmal und die entsprechende .xml-Datei für Image7.jpg

<annotation>
    <folder>train_clean</folder>
    <filename>Image7.jpg</filename>
    <path>C:\Users\karanbari\Desktop\YOLO\images\train_clean\Image7.jpg</path>
    <source>
        <database>Unknown</database>
    </source>
    <size>
        <width>1300</width>
        <height>1390</height>
        <depth>3</depth>
    </size>
    <segmented>0</segmented>
    <object>
        <name>vodafone</name>
        <pose>Unspecified</pose>
        <truncated>0</truncated>
        <difficult>0</difficult>
        <bndbox>
            <xmin>370</xmin>
            <ymin>258</ymin>
            <xmax>916</xmax>
            <ymax>792</ymax>
        </bndbox>
    </object>
</annotation>

Besser stellen
print(im, type(im))
in darkflow/net/yolo/predict.py bei L58 und überprüfen Sie den Pfad selbst

Hatte den gleichen Fehler

Ich stand vor dem gleichen Problem und meine Lösung war:
geändert im = cv2.imread(im) zu im = cv2.imread(im+'.jpg') in der Zeile # 60 vondict.py

Ich hatte das gleiche Problem und es lag daran, dass ich ein JPG-Bild gelöscht, aber vergessen hatte, seine Anmerkung zu löschen. Stellen Sie daher sicher, dass Bilder und ihre Anmerkungen konsistent sind.

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen

Verwandte Themen

borasy picture borasy  ·  3Kommentare

realityzero picture realityzero  ·  3Kommentare

eugtanchik picture eugtanchik  ·  4Kommentare

bareblackfoot picture bareblackfoot  ·  4Kommentare

wonny2001 picture wonny2001  ·  4Kommentare