Darkflow: Erreur d'entraînement du nouveau jeu de données - "AttributeError : l'objet 'NoneType' n'a pas d'attribut 'shape'"

Créé le 30 mai 2017  ·  23Commentaires  ·  Source: thtrieu/darkflow

Salut,

Je forme un nouvel ensemble de données. Cependant, la formation s'exécute toujours sur quelques étapes et rencontre soudainement l'erreur suivante : "AttributeError : l'objet 'NoneType' n'a pas d'attribut 'forme'". Je pense que le format d'annotation et le nom de fichier dans le fichier d'annotation sont corrects car la formation peut se dérouler sur quelques étapes et je suis à court d'idées sur la façon de résoudre davantage les problèmes.

Appréciez toute idée ou aide à ce sujet.

Merci.

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'

Commentaire le plus utile

J'ai rencontré cela dans le passé. Il y a de fortes chances que certains fichiers .xml ou .jpg ne soient pas nommés/configurés correctement. Une façon de déboguer ce qui a mal tourné est d'ajouter

print(jpg)

Après cette ligne : https://github.com/thtrieu/darkflow/blob/master/darkflow/net/yolov2/data.py#L26

Ainsi, vous pourrez voir le nom du fichier corrompu et enquêter sur son .xml ou .jpg .

Tous les 23 commentaires

Vérifiez vos fichiers xml, le nom du fichier inclut-il l'extension de vos images ?

Oui, le nom du fichier inclut l'extension de mes images : .jpg.

Ci-dessous se trouve l'un des fichiers xml :

<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 Vu que cela ne fonctionne pas - pouvez-vous essayer de mettre simplement les noms de fichiers sans le chemin, c'est-à-dire <filename>000004.jpg</filename> et voir si cela change quelque chose lorsque vous essayez de vous entraîner?

@abagshaw Merci pour la suggestion. J'ai essayé de mettre les noms de fichiers sans le chemin et je rencontre toujours la même erreur.

D'autres idées ?

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 La chose étrange est qu'il n'y a pas d'erreur lors de la première étape ... ce qui peut indiquer que certains des fichiers .xml sont correctement configurés et d'autres non? Êtes-vous sûr à 100 % que _tous_ les fichiers utilisent le format <filename>000004.jpg</filename> . Est-il possible qu'un (ou plusieurs d'entre eux) ne soit pas correctement configuré ? Je ne sais pas comment vous modifiez le format de tous ces fichiers... mais peut-être que si vous utilisez un outil pour modifier par lots une tonne de fichiers, il pourrait en manquer certains ?

La seule autre chose à laquelle je peux penser est que peut-être certaines images ont été supprimées de /ml/data/new/JPEGImages mais leurs fichiers correspondants .xml n'ont pas été supprimés de /ml/data/new/Annotations ? Y a-t-il autant de fichiers .xml dans /ml/data/new/Annotations que d'images dans /ml/data/new/JPEGImages ?

J'ai rencontré cela dans le passé. Il y a de fortes chances que certains fichiers .xml ou .jpg ne soient pas nommés/configurés correctement. Une façon de déboguer ce qui a mal tourné est d'ajouter

print(jpg)

Après cette ligne : https://github.com/thtrieu/darkflow/blob/master/darkflow/net/yolov2/data.py#L26

Ainsi, vous pourrez voir le nom du fichier corrompu et enquêter sur son .xml ou .jpg .

Merci @abagshaw et @thtrieu ! J'ai trouvé la cause du problème en écrivant un script python pour analyser les fichiers xml afin de vérifier les valeurs de largeur, hauteur, ymin, ymax, xmin et xmax. Le problème est dû à deux fichiers jpg qui ne peuvent pas être chargés correctement par opencv, ce qui fait que la largeur et la hauteur sont spécifiées à 0 dans les fichiers xml écrits par labelImg.

La suggestion de @thtrieu est très utile. Je n'ai pas utilisé print pour trouver le problème .jpg ou .xml.
Pour tous ceux qui débutent avec darkflow, je veux juste m'assurer que cela fonctionne dans votre environnement ou non. J'ai fait une petite conclusion ici, en raison des problèmes que j'ai rencontrés:

  1. utilisez les données de darkflow-master/test/training/annotations et .../images, vous n'avez donc pas besoin de considérer l'outil VOCformat. vous avez deux fichiers .xml ici. (1.xml, 2.xml)
  2. créez votre propre _test_labels.txt_, mettez trois noms de classe en raison des données (seulement deux images à cheval et à vélo, vous pouvez obtenir le nom de la classe à partir de .xml, il suffit de les ouvrir et de vérifier).
    la personne
    vélo
    cheval
  3. changez les _classes_ nad _filters_ dans le fichier .cfg, et vous devez changer le nom de *.cfg, sinon un autre problème de problème se produira, et NE changez PAS les .weights que vous voulez utiliser, sinon un autre problème de problème se produira.
  4. exécutez le code suivant pour vérifier s'il s'exécute ou non dans votre environnement.
    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 pouvez-vous partager avec nous votre script s'il vous plaît !

J'ai rencontré cela dans le passé. Il y a de fortes chances que certains fichiers .xml ou .jpg ne soient pas nommés/configurés correctement. Une façon de déboguer ce qui a mal tourné est d'ajouter

print(jpg)

Après cette ligne : https://github.com/thtrieu/darkflow/blob/master/darkflow/net/yolov2/data.py#L26

Ainsi, vous pourrez voir le nom du fichier corrompu et enquêter sur son .xml ou .jpg .

Comment pourrais-je résoudre le problème si c'est les jpegs? J'ai eu le même problème et j'ai exécuté la déclaration d'impression.

J'ai obtenu cette sortie:

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**

Je ne sais pas exactement ce que cela signifie, à part le fait que le 2ème fichier image n'a pas de .jpg après.

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'

obtenir cette erreur comment la réparer plz help

@ wendq86 Vu que cela ne fonctionne pas - pouvez-vous essayer de mettre simplement les noms de fichiers sans le chemin, c'est-à-dire <filename>000004.jpg</filename> et voir si cela change quelque chose lorsque vous essayez de vous entraîner?

cela a fonctionné pour moi

Salut, j'ai rencontré le même problème lorsque je veux former l'ensemble de données COCO. Voici comment je résous ce problème :

  1. J'utilise https://github.com/tylin/coco-dpm/blob/master/coco/convert_to_pascalformat.py pour convertir le format COCO json au format XML.

  2. Mais nous devons modifier une partie du script pour nous assurer que le format de ce nouveau fichier XML est le même que le format de VOC XML dans l'exemple de darkflow (darkflow/test/training/annotations). Par exemple:
    COCO XML du script de l'étape 1 est :
    <tag1>
    xxxxx
    </tag1>
    <tag2>
    xxxxx
    </tag2>
    Mais nous avons besoin du format comme:
    <tag1>xxxxx</tag>
    <tag2>xxxxx</tag2>

3 changez 'tvmonitor' en 'tv' dans le fichier 'label.txt'

J'ai supprimé toutes les images jpeg et cela a fonctionné

Salut,

Je forme un nouvel ensemble de données. Cependant, la formation s'exécute toujours sur quelques étapes et rencontre soudainement l'erreur suivante : "AttributeError : l'objet 'NoneType' n'a pas d'attribut 'forme'". Je pense que le format d'annotation et le nom de fichier dans le fichier d'annotation sont corrects car la formation peut se dérouler sur quelques étapes et je suis à court d'idées sur la façon de résoudre davantage les problèmes.

Appréciez toute idée ou aide à ce sujet.

Merci.

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'

supprimer toutes les images jpeg

Salut, j'essaie de former la détection d'objets personnalisés pour détecter le logo de mon entreprise, tout s'est bien passé jusqu'à cette erreur, j'ai également supprimé et annoté à nouveau des images mais cela ne change rien au résultat. Quelqu'un pourrait m'aider avec ça
Je vous remercie

(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'

Le nom de votre image comporte-t-il des caractères spéciaux ? Si c'est le cas, changez-les.

Le dimanche 24 novembre 2019 à 18h32, karan bari [email protected] a écrit :

Salut, j'essaie de former la détection d'objets personnalisés pour détecter mon
logo de l'entreprise, tout s'est bien passé jusqu'à cette erreur, j'ai également supprimé et
images annotées à nouveau, mais cela ne change rien au résultat. Quelqu'un peut-il s'il vous plaît
aidez-moi avec ça
Je vous remercie

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

(base) 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 : Passer (type, 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:517 : FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:518 : FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:519 : FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:520 : FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:525 : FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("ressource", np.ubyte, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:541 : FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:542 : FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:543 : FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:544 : FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:545 : FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:550 : FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("ressource", np.ubyte, 1)])
AVERTISSEMENT : La journalisation avant l'analyse des indicateurs passe à stderr.
W1124 18:22:27.201594 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:15 : Le nom tf.train.RMSPropOptimizer est obsolète. Veuillez utiliser tf.compat.v1.train.RMSPropOptimizer à la place.

W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] Depuis C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:16 : le nom tf.train.AdadeltaOptimizer est obsolète. Veuillez utiliser tf.compat.v1.train.AdadeltaOptimizer à la place.

W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:17 : Le nom tf.train.AdagradOptimizer est obsolète. Veuillez utiliser tf.compat.v1.train.AdagradOptimizer à la place.

W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:18 : Le nom tf.train.AdagradDAOptimizer est obsolète. Veuillez utiliser tf.compat.v1.train.AdagradDAOptimizer à la place.

W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:19 : Le nom tf.train.MomentumOptimizer est obsolète. Veuillez utiliser tf.compat.v1.train.MomentumOptimizer à la place.

Analyse ./cfg/tiny-yolo-voc.cfg
Analyse cfg/tiny-yolo-voc-1c.cfg
Loading bin/tiny-yolo-voc.weights...
Identifié avec succès 63471556 octets
Terminé en 0.019990205764770508s

Filet de construction...
W1124 18:22:27.253580 10144 deprecation_wrapper.py:119] Depuis C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:105 : le nom tf.placeholder est obsolète. Veuillez utiliser tf.compat.v1.placeholder à la place.

source | Former? | Description de la couche | Taille de sortie
-------+--------+--------------------------------------------- -+---------------
W1124 18:22:27.257580 10144 deprecation_wrapper.py:119] Depuis C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:70 : le nom tf.variable_scope est obsolète. Veuillez utiliser tf.compat.v1.variable_scope à la place.

W1124 18:22:27.261598 10144 deprecation_wrapper.py:119] Depuis C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:71 : le nom tf.get_variable est obsolète. Veuillez utiliser tf.compat.v1.get_variable à la place.

W1124 18:22:27.277594 10144 deprecation_wrapper.py:119] Depuis C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:84 : le nom tf.placeholder_with_default est obsolète. Veuillez utiliser tf.compat.v1.placeholder_with_default à la place.

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

Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 416, 416, 16)
W1124 18:22:27.389549 10144 deprecation_wrapper.py:119] Depuis C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\simple.py:106 : le nom tf.nn.max_pool est obsolète. Veuillez utiliser tf.nn.max_pool2d à la place.

Charger | Ouais! | maxp 2x2p0_2 | (?, 208, 208, 16)
Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 208, 208, 32)
Charger | Ouais! | maxp 2x2p0_2 | (?, 104, 104, 32)
Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 104, 104, 64)
Charger | Ouais! | maxp 2x2p0_2 | (?, 52, 52, 64)
Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 52, 52, 128)
Charger | Ouais! | maxp 2x2p0_2 | (?, 26, 26, 128)
Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 26, 26, 256)
Charger | Ouais! | maxp 2x2p0_2 | (?, 13, 13, 256)
Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 13, 13, 512)
Charger | Ouais! | maxp 2x2p0_1 | (?, 13, 13, 512)
Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 13, 13, 1024)
Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 13, 13, 1024)
Init | Ouais! | conv 1x1p0_1 linéaire | (?, 13, 13, 30)
-------+--------+--------------------------------------------- -+---------------
Fonctionnant entièrement sur CPU
cfg/tiny-yolo-voc-1c.cfg hyper-paramètres de perte :
H = 13
W = 13
case = 5
classes = 1
échelles = [1.0, 5.0, 1.0, 1.0]
W1124 18:22:29.962576 10144 deprecation.py:323] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:87 : to_float (de tensorflow.python.ops.math_ops) est obsolète et sera supprimé dans une future version.
Instructions pour la mise à jour :
Utilisez tf.cast la place.
Construire la perte cfg/tiny-yolo-voc-1c.cfg
W1124 18:22:30.010835 10144 deprecation_wrapper.py:119] Depuis C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:107 : le nom tf.summary.scalar est obsolète. Veuillez utiliser tf.compat.v1.summary.scalar à la place.

Construire cfg/tiny-yolo-voc-1c.cfg train op
W1124 18:22:30.102793 10144 deprecation.py:323] Depuis C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\ops\math_grad.py:1205 : add_dispatch_support..wrapper (de tensorflow.python.ops.array_ops) est obsolète et sera supprimé dans une future version.
Instructions pour la mise à jour :
Utilisez tf.where dans 2.0, qui a la même règle de diffusion que np.where
W1124 18:22:32.038406 10144 deprecation.py:506] Depuis C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\training\rmsprop.py:119 : appelant Ones.__init__ (depuis tensorflow.python .ops.init_ops) avec dtype est obsolète et sera supprimé dans une future version.
Instructions pour la mise à jour :
Appelez l'instance de l'initialiseur avec l'argument dtype au lieu de le transmettre au constructeur
W1124 18:22:32.795700 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:145 : Le nom tf.Session est obsolète. Veuillez utiliser tf.compat.v1.Session à la place.

2019-11-24 18:22:32.800843 : I tensorflow/core/platform/cpu_feature_guard.cc:142] Votre CPU prend en charge les instructions pour lesquelles ce binaire TensorFlow n'a pas été compilé : AVX2
Terminé en 11.774582862854004s

Entrer en formation...

cfg/tiny-yolo-voc-1c.cfg analyse annotations_clean
Analyse pour ['vodafone']
[====================>]100 % Image9.xml
Statistiques:
Taille du jeu de données : 53
Ensemble de données de 53 instance(s)
Image20.jpg
Traceback (dernier appel le plus récent) :
Fichier "flow", ligne 6, dans
cliHandler(sys.argv)
Fichier "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\cli.py", ligne 33, dans cliHandler
print('Entrez formation...'); tfnet.train()
Fichier "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\flow.py", ligne 39, dans le train
for i, (x_batch, datum) in enumerate(batches):
Fichier "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolodata.py", ligne 114, en mode aléatoire
inp, new_feed = self._batch(train_instance)
Fichier "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2data.py", ligne 28, dans _batch
img = self.preprocess(chemin, allobj)
Fichier "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolo\predict.py", ligne 62, en prétraitement
résultat = imcv2_affine_trans(im)
Fichier "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflowutils\im_transform.py", ligne 20, dans imcv2_affine_trans
h, w, c = im.forme
AttributeError : l'objet 'NoneType' n'a pas d'attribut 'forme'


Vous recevez ceci parce que vous avez commenté.
Répondez directement à cet e-mail, consultez-le sur GitHub
https://github.com/thtrieu/darkflow/issues/265?email_source=notifications&email_token=AGG23MNSSXWIHQFI75KYEWDQVJ3ORA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAKXNA#issuecomment6388 ,
ou désabonnez-vous
https://github.com/notifications/unsubscribe-auth/AGG23MMETFBN5NG76IHGWZ3QVJ3ORANCNFSM4DNJVSVQ
.

Le nom de votre image comporte-t-il des caractères spéciaux ? Si c'est le cas, changez-les.

Le dimanche 24 novembre 2019 à 18 h 32, karan bari @ . * > a écrit : Bonjour, j'essaie de former la détection d'objets personnalisés pour détecter le logo de mon entreprise, tout s'est bien passé jusqu'à cette erreur, j'ai également supprimé et annoté à nouveau des images, mais cela ne change rien au résultat. Quelqu'un peut-il m'aider s'il vous plaît avec ceci Merci (base) C:\Users\karanbari>cd Desktop/YOLO/darkflow-master (base) 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 : Passer (type, 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:517 : FutureWarning : Passing (type , 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:518 : FutureWarning : Passing (type , 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:519 : FutureWarning : Passing (type , 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:520 : FutureWarning : Passing (type , 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:525 : FutureWarning : Passing (type , 1) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'. 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) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'. _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) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'. _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) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'. _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) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'. _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) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'. _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) ou '1type' comme synonyme de type est obsolète ; dans une future version de numpy, il sera compris comme (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) AVERTISSEMENT : la journalisation avant l'analyse des indicateurs passe à stderr. W1124 18:22:27.201594 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:15 : Le nom tf.train.RMSPropOptimizer est obsolète. Veuillez utiliser tf.compat.v1.train.RMSPropOptimizer à la place. W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] Depuis C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:16 : le nom tf.train.AdadeltaOptimizer est obsolète. Veuillez utiliser tf.compat.v1.train.AdadeltaOptimizer à la place. W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:17 : Le nom tf.train.AdagradOptimizer est obsolète. Veuillez utiliser tf.compat.v1.train.AdagradOptimizer à la place. W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:18 : Le nom tf.train.AdagradDAOptimizer est obsolète. Veuillez utiliser tf.compat.v1.train.AdagradDAOptimizer à la place. W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:19 : Le nom tf.train.MomentumOptimizer est obsolète. Veuillez utiliser tf.compat.v1.train.MomentumOptimizer à la place. Analyse ./cfg/tiny-yolo-voc.cfg Analyse cfg/tiny-yolo-voc-1c.cfg Chargement bin/tiny-yolo-voc.weights ... Identifié avec succès 63471556 octets Terminé en 0.019990205764770508s Construction net ... W1124 18:22:27.253580 10144 deprecation_wrapper.py:119] Depuis C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:105 : le nom tf.placeholder est obsolète. Veuillez utiliser tf.compat.v1.placeholder à la place. source | Former? | Description de la couche | Taille de sortie -------+--------+--------------------------------------------- ---+--------------- W1124 18:22:27.257580 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\ baseop.py:70 : le nom tf.variable_scope est obsolète. Veuillez utiliser tf.compat.v1.variable_scope à la place. W1124 18:22:27.261598 10144 deprecation_wrapper.py:119] Depuis C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:71 : le nom tf.get_variable est obsolète. Veuillez utiliser tf.compat.v1.get_variable à la place. W1124 18:22:27.277594 10144 deprecation_wrapper.py:119] Depuis C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:84 : le nom tf.placeholder_with_default est obsolète. Veuillez utiliser tf.compat.v1.placeholder_with_default à la place. | | entrée | (?, 416, 416, 3) Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 416, 416, 16) W1124 18:22:27.389549 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\simple.py:106 : Le nom tf. nn.max_pool est obsolète. Veuillez utiliser tf.nn.max_pool2d à la place. Charger | Ouais! | maxp 2x2p0_2 | (?, 208, 208, 16) Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 208, 208, 32) Charger | Ouais! | maxp 2x2p0_2 | (?, 104, 104, 32) Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 104, 104, 64) Charger | Ouais! | maxp 2x2p0_2 | (?, 52, 52, 64) Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 52, 52, 128) Charger | Ouais! | maxp 2x2p0_2 | (?, 26, 26, 128) Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 26, 26, 256) Charger | Ouais! | maxp 2x2p0_2 | (?, 13, 13, 256) Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 13, 13, 512) Charger | Ouais! | maxp 2x2p0_1 | (?, 13, 13, 512) Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 13, 13, 1024) Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 13, 13, 1024) Init | Ouais! | conv 1x1p0_1 linéaire | (?, 13, 13, 30) -------+--------+------------------------ ----------+--------------- Tournant entièrement sur CPU cfg/tiny-yolo-voc-1c.cfg hyper-paramètres de perte : H = 13 W = 13 box = 5 classes = 1 échelles = [1.0, 5.0, 1.0, 1.0] W1124 18:22:29.962576 10144 deprecation.py:323] Depuis C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\ train.py:87 : to_float (de tensorflow.python.ops.math_ops) est obsolète et sera supprimé dans une future version. Instructions pour la mise à jour : utilisez tf.cast la place. Construire cfg/tiny-yolo-voc-1c.cfg loss W1124 18:22:30.010835 10144 deprecation_wrapper.py:119] Depuis C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:107 : Le nom tf.summary.scalar est obsolète. Veuillez utiliser tf.compat.v1.summary.scalar à la place. Construire cfg/tiny-yolo-voc-1c.cfg train op W1124 18:22:30.102793 10144 deprecation.py:323] De C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\ops\math_grad .py:1205 : add_dispatch_support..wrapper (de tensorflow.python.ops.array_ops) est obsolète et sera supprimé dans une future version. Instructions pour la mise à jour : utilisez tf.where dans 2.0, qui a la même règle de diffusion que np.where W1124 18:22:32.038406 10144 deprecation.py:506] De C:\Users\karanbari\Anaconda3\lib\site-packages\ tensorflow\python\training\rmsprop.py:119 : appeler Ones.__init__ (depuis tensorflow.python.ops.init_ops) avec dtype est obsolète et sera supprimé dans une future version. Instructions pour la mise à jour : appelez l'instance de l'initialiseur avec l'argument dtype au lieu de le transmettre au constructeur W1124 18:22:32.795700 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py :145: Le nom tf.Session est obsolète. Veuillez utiliser tf.compat.v1.Session à la place. 2019-11-24 18:22:32.800843 : I tensorflow/core/platform/cpu_feature_guard.cc:142] Votre CPU prend en charge les instructions pour lesquelles ce binaire TensorFlow n'a pas été compilé : AVX2 Terminé en 11.774582862854004s Entrez dans la formation... cfg/ tiny-yolo-voc-1c.cfg parsing annotations_clean Parsing for ['vodafone'] [====================>]100% Image9.xml Statistiques : Taille du jeu de données : 53 Jeu de données de 53 instance(s) Image20.jpg Traceback (appel le plus récent en dernier) : Fichier "flow", ligne 6, danscliHandler(sys.argv) Fichier "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\cli.py", ligne 33, dans cliHandler print('Enter training ...'); tfnet.train() File "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\flow.py", ligne 39, in train for i, (x_batch, datum) in enumerate(batches): File "C: \Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolodata.py", ligne 114, dans shuffle inp, new_feed = self._batch(train_instance) Fichier "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ yolov2data.py", ligne 28, dans _batch img = self.preprocess(path, allobj) File "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolo\predict.py", ligne 62, dans le résultat du prétraitement = imcv2_affine_trans(im) Fichier "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflowutils\im_transform.py", ligne 20, dans imcv2_affine_trans h, w, c = im.shape AttributeError : l'objet 'NoneType' n'a pas d'attribut 'shape ' - Vous recevez ceci parce que vous avez commenté. Répondre à cet e - mail directement, voir sur GitHub <# 265? Email_source = notifications & email_token = AGG23MNSSXWIHQFI75KYEWDQVJ3ORA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAKXNA # issuecomment-557886388> ou désabonnement https://github.com/notifications/unsubscribe-auth/AGG23MMETFBN5NG76IHGWZ3QVJ3ORANCNFSM4DNJVSVQ .

Non, j'ai renommé toutes les images au format Image1, Image2, Image3... etc et toutes les images ont le format .jpg

Il est fort possible qu'une de vos dimensions d'annotation soit inférieure à
0 ou hors de l'image.

Vérifiez également si vous pouvez ouvrir manuellement toutes les images.

Le dimanche 24 novembre 2019 à 18h42, karan bari [email protected] a écrit :

Le nom de votre image comporte-t-il des caractères spéciaux ? Si c'est le cas, changez-les.
… <#m_-6851739743886041955_>
Le dimanche 24 novembre 2019 à 18 h 32, karan bari @ . * > a écrit : Salut, je suis
essayer de former la détection d'objets personnalisés pour détecter le logo de mon entreprise,
tout s'est bien passé jusqu'à cette erreur, j'ai également supprimé et annoté des images
encore une fois, mais cela ne change rien au résultat. Quelqu'un pourrait m'aider avec ça
Merci (base) C:\Users\karanbari>cd Desktop/YOLO/darkflow-master (base)
C:\Users\karanbari\Desktop\YOLOdarkflow-master>flux python --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 : Passer (type, 1) ou '1type' comme synonyme de type est
obsolète ; dans une future version de numpy, il sera compris comme (type,
(1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:517 :
FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est
obsolète ; dans une future version de numpy, il sera compris comme (type,
(1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:518 :
FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est
obsolète ; dans une future version de numpy, il sera compris comme (type,
(1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:519 :
FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est
obsolète ; dans une future version de numpy, il sera compris comme (type,
(1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:520 :
FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est
obsolète ; dans une future version de numpy, il sera compris comme (type,
(1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:525 :
FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est
obsolète ; dans une future version de numpy, il sera compris comme (type,
(1,)) / '(1,)type'. np_resource = np.dtype([("ressource", np.ubyte, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:541 :
FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est
obsolète ; dans une future version de numpy, il sera compris comme (type,
(1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:542 :
FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est
obsolète ; dans une future version de numpy, il sera compris comme (type,
(1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:543 :
FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est
obsolète ; dans une future version de numpy, il sera compris comme (type,
(1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:544 :
FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est
obsolète ; dans une future version de numpy, il sera compris comme (type,
(1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:545 :
FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est
obsolète ; dans une future version de numpy, il sera compris comme (type,
(1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:550 :
FutureWarning : Passer (type, 1) ou '1type' comme synonyme de type est
obsolète ; dans une future version de numpy, il sera compris comme (type,
(1,)) / '(1,)type'. np_resource = np.dtype([("ressource", np.ubyte, 1)])
AVERTISSEMENT : La journalisation avant l'analyse des indicateurs passe à stderr. W1124 18:22:27.201594
10144 deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:15 :
Le nom tf.train.RMSPropOptimizer est obsolète. Veuillez utiliser
tf.compat.v1.train.RMSPropOptimizer à la place. W1124 18:22:27.209591 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:16 :
Le nom tf.train.AdadeltaOptimizer est obsolète. Veuillez utiliser
tf.compat.v1.train.AdadeltaOptimizer à la place. W1124 18:22:27.209591 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:17 :
Le nom tf.train.AdagradOptimizer est obsolète. Veuillez utiliser
tf.compat.v1.train.AdagradOptimizer à la place. W1124 18:22:27.213590 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:18 :
Le nom tf.train.AdagradDAOptimizer est obsolète. Veuillez utiliser
tf.compat.v1.train.AdagradDAOptimizer à la place. W1124 18:22:27.213590 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:19 :
Le nom tf.train.MomentumOptimizer est obsolète. Veuillez utiliser
tf.compat.v1.train.MomentumOptimizer à la place. Analyse
./cfg/tiny-yolo-voc.cfg Analyse cfg/tiny-yolo-voc-1c.cfg Chargement
bin/tiny-yolo-voc.weights ... Identifié avec succès 63471556 octets
Terminé en 0.019990205764770508s Construction net ... W1124 18:22:27.253580
10144 deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:105 :
Le nom tf.placeholder est obsolète. Veuillez utiliser tf.compat.v1.placeholder
au lieu. source | Former? | Description de la couche | Taille de sortie
-------+--------+--------------------------------------------- -+--------------- W1124
18:22:27.257580 10144 deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:70 :
Le nom tf.variable_scope est obsolète. Veuillez utiliser
tf.compat.v1.variable_scope à la place. W1124 18:22:27.261598 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:71 :
Le nom tf.get_variable est obsolète. Veuillez utiliser
tf.compat.v1.get_variable à la place. W1124 18:22:27.277594 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:84 :
Le nom tf.placeholder_with_default est obsolète. Veuillez utiliser
tf.compat.v1.placeholder_with_default à la place. | | entrée | (?, 416, 416, 3)
Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 416, 416, 16) W1124
18: 22: 27.389549 10144 deprecation_wrapper.py: 119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\simple.py:106 :
Le nom tf.nn.max_pool est obsolète. Veuillez utiliser tf.nn.max_pool2d à la place.
Charger | Ouais! | maxp 2x2p0_2 | (?, 208, 208, 16) Charger | Ouais! | conversion 3x3p1_1
+ bnorm qui fuit | (?, 208, 208, 32) Charger | Ouais! | maxp 2x2p0_2 | (?, 104, 104,
32) Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 104, 104, 64) Charger | Ouais!
| maxp 2x2p0_2 | (?, 52, 52, 64) Charger | Ouais! | conv 3x3p1_1 + fuite bnorm |
(?, 52, 52, 128) Charger | Ouais! | maxp 2x2p0_2 | (?, 26, 26, 128) Charger | Ouais!
| conv 3x3p1_1 + fuite bnorm | (?, 26, 26, 256) Charger | Ouais! | maxp 2x2p0_2 |
(?, 13, 13, 256) Charger | Ouais! | conv 3x3p1_1 + fuite bnorm | (?, 13, 13, 512)
Charger | Ouais! | maxp 2x2p0_1 | (?, 13, 13, 512) Charger | Ouais! | conversion 3x3p1_1
+ bnorm qui fuit | (?, 13, 13, 1024) Charger | Ouais! | conv 3x3p1_1 + fuite bnorm |
(?, 13, 13, 1024) Init | Ouais! | conv 1x1p0_1 linéaire | (?, 13, 13, 30)
-------+--------+--------------------------------------------- -+--------------- Courir
entièrement sur CPU cfg/tiny-yolo-voc-1c.cfg hyper-paramètres de perte : H = 13 W =
13 cases = 5 classes = 1 échelles = [1.0, 5.0, 1.0, 1.0] W1124 18:22:29.962576
10144 deprecation.py:323] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:87 :
to_float (de tensorflow.python.ops.math_ops) est obsolète et sera
supprimé dans une future version. Instructions pour la mise à jour : utilisez tf.cast
au lieu. Bâtiment cfg/tiny-yolo-voc-1c.cfg perte W1124 18:22:30.010835 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:107 :
Le nom tf.summary.scalar est obsolète. Veuillez utiliser
tf.compat.v1.summary.scalar à la place. Bâtiment cfg/tiny-yolo-voc-1c.cfg
train op W1124 18:22:30.102793 10144 deprecation.py:323] De
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\ops\math_grad.py:1205 :
add_dispatch_support..wrapper (de tensorflow.python.ops.array_ops) est
obsolète et sera supprimé dans une future version. Consignes pour
mise à jour : utilisez tf.where dans 2.0, qui a la même règle de diffusion que
np.where W1124 18:22:32.038406 10144 deprecation.py:506] De
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\training\rmsprop.py:119 :
appelant les Uns. init (de tensorflow.python.ops.init_ops) avec dtype est
obsolète et sera supprimé dans une future version. Consignes pour
mise à jour : appelez l'instance de l'initialiseur avec l'argument dtype au lieu de
en le passant au constructeur W1124 18:22:32.795700 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:145 :
Le nom tf.Session est obsolète. Veuillez utiliser tf.compat.v1.Session à la place.
2019-11-24 18:22:32.800843 : je
tensorflow/core/platform/cpu_feature_guard.cc:142] Votre CPU prend en charge
instructions pour lesquelles ce binaire TensorFlow n'a pas été compilé : AVX2
Terminé en 11.774582862854004s Entrez dans la formation ... cfg/tiny-yolo-voc-1c.cfg
parsing annotations_clean Analyse pour ['vodafone']
[====================>]100 % Image9.xml Statistiques : Taille de l'ensemble de données : 53
de 53 instance(s) Image20.jpg Traceback (appel le plus récent en dernier) : Fichier
"flow", ligne 6, dans le fichier cliHandler(sys.argv)
"C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\cli.py", ligne 33,
in cliHandler print('Entrez la formation...'); tfnet.train() Fichier
"C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\flow.py",
ligne 39, dans train for i, (x_batch, datum) in enumerate(batches): File
"C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolodata.py",
ligne 114, dans shuffle inp, new_feed = self._batch(train_instance) File
"C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2data.py",
ligne 28, dans _batch img = self.preprocess(path, allobj) File
"C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolo\predict.py",
ligne 62, dans le résultat du prétraitement = fichier imcv2_affine_trans(im)
"C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflowutils\im_transform.py",
ligne 20, dans imcv2_affine_trans h, w, c = im.shape AttributeError :
L'objet 'NoneType' n'a pas d'attribut 'forme' - Vous recevez ceci parce que
vous avez commenté. Répondez directement à cet e-mail, consultez-le sur GitHub <#265
https://github.com/thtrieu/darkflow/issues/265 ?email_source=notifications&email_token=AGG23MNSSXWIHQFI75KYEWDQVJ3ORA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAKXNA#issuecomment6388>,
ou désabonnez-vous
https://github.com/notifications/unsubscribe-auth/AGG23MMETFBN5NG76IHGWZ3QVJ3ORANCNFSM4DNJVSVQ
.

Non, j'ai renommé toutes les images au format Image1, Image2, Image3... etc.
et toutes les images sont au format .jpg


Vous recevez ceci parce que vous avez commenté.
Répondez directement à cet e-mail, consultez-le sur GitHub
https://github.com/thtrieu/darkflow/issues/265?email_source=notifications&email_token=AGG23MJ2SKBIF2FQTPTLBRLQVJ4SVA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAK5PQ57#commentaire-58,78
ou désabonnez-vous
https://github.com/notifications/unsubscribe-auth/AGG23ML6HYW6S7JZEN2ZAF3QVJ4SVANCNFSM4DNJVSVQ
.

J'ai de nouveau annoté les images cette fois en utilisant labelImg, le problème persiste toujours.

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'

Voici à nouveau l'erreur et le fichier .xml correspondant pour 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>

Mieux vaut mettre
print(im, type(im))
dans darkflow/net/yolo/predict.py à L58 et vérifiez le chemin par vous-même

Avait la même erreur

J'étais confronté au même problème et ma solution était:
changé im = cv2.imread(im) en im = cv2.imread(im+'.jpg') dans predict.py line# 60

J'ai eu le même problème et c'est parce que j'ai supprimé l'image jpg mais j'ai oublié de supprimer son annotation. assurez-vous donc que les images et leurs annotations sont cohérentes.

Cette page vous a été utile?
0 / 5 - 0 notes

Questions connexes

LeeroyHannigan picture LeeroyHannigan  ·  4Commentaires

ManojPabani picture ManojPabani  ·  4Commentaires

1NNcoder picture 1NNcoder  ·  3Commentaires

bareblackfoot picture bareblackfoot  ·  4Commentaires

eugtanchik picture eugtanchik  ·  4Commentaires