Darkflow: Novo erro de treinamento do conjunto de dados - "AttributeError: objeto 'NoneType' não tem atributo 'shape'"

Criado em 30 mai. 2017  ·  23Comentários  ·  Fonte: thtrieu/darkflow

Oi,

Estou treinando um novo conjunto de dados. No entanto, o treinamento sempre é executado por algumas etapas e, de repente, encontra o seguinte erro: "AttributeError: 'NoneType' object has no attribute 'shape'". Acho que o formato da anotação e o nome do arquivo no arquivo de anotações estão corretos, pois o treinamento pode ser executado por algumas etapas e estou tendo ideias sobre como solucionar problemas ainda mais.

Aprecie quaisquer idéias ou ajuda sobre isso.

Obrigada.

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'

Comentários muito úteis

Eu encontrei isso no passado. Há uma grande chance de alguns arquivos .xml ou .jpg não serem nomeados/configurados corretamente. Uma maneira de depurar o que deu errado é adicionar

print(jpg)

Após esta linha: https://github.com/thtrieu/darkflow/blob/master/darkflow/net/yolov2/data.py#L26

Assim, você poderá ver o nome do arquivo corrompido e investigar seu .xml ou .jpg .

Todos 23 comentários

Verifique seus arquivos xml, o nome do arquivo inclui a extensão de suas imagens?

Sim, o nome do arquivo inclui a extensão das minhas imagens: .jpg.

Abaixo está um dos arquivos 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 Vendo que isso não está funcionando - você pode tentar apenas colocar os nomes dos arquivos sem o caminho, ou seja, <filename>000004.jpg</filename> e ver se isso muda alguma coisa ao tentar treinar?

@abagshaw Obrigado pela sugestão. Tentei colocar os nomes dos arquivos sem o caminho e ainda encontro o mesmo erro.

Alguma outra ideia?

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 O estranho é que não há erro na primeira etapa ... o que pode indicar que alguns dos arquivos .xml estão configurados corretamente e outros não? Você tem 100% de certeza de que _todos_ os arquivos usam o formato <filename>000004.jpg</filename> . Existe a possibilidade de que um (ou mais deles) esteja/não esteja configurado corretamente? Não tenho certeza de como você está modificando o formato de todos esses arquivos ... mas talvez se você estiver usando uma ferramenta para modificar em lote uma tonelada de arquivos, pode estar faltando alguns?

A única outra coisa que posso pensar é que talvez algumas imagens tenham sido removidas de /ml/data/new/JPEGImages mas seus arquivos .xml correspondentes não foram removidos de /ml/data/new/Annotations ? Há o mesmo número de arquivos .xml em /ml/data/new/Annotations que há imagens em /ml/data/new/JPEGImages ?

Eu encontrei isso no passado. Há uma grande chance de alguns arquivos .xml ou .jpg não serem nomeados/configurados corretamente. Uma maneira de depurar o que deu errado é adicionar

print(jpg)

Após esta linha: https://github.com/thtrieu/darkflow/blob/master/darkflow/net/yolov2/data.py#L26

Assim, você poderá ver o nome do arquivo corrompido e investigar seu .xml ou .jpg .

Obrigado @abagshaw e @thtrieu! Encontrei a causa do problema escrevendo um script python para analisar os arquivos xml para verificar o valor de largura, altura, ymin, ymax, xmin e xmax. O problema é devido a dois arquivos jpg que não podem ser carregados corretamente pelo opencv, resultando na largura e altura sendo especificadas como 0 nos arquivos xml escritos pelo labelImg.

A sugestão do @thtrieu é muito útil. Não usei print para descobrir o problema .jpg ou .xml.
Para quem está começando com o darkflow, só quero ter certeza se funciona no seu ambiente ou não. Fiz uma pequena conclusão aqui, devido aos problemas que encontrei:

  1. use dados de darkflow-master/test/training/annotations e .../images, então você não precisa considerar a ferramenta VOCformat. você tem dois arquivos .xml aqui. (1.xml, 2.xml)
  2. faça seu próprio _test_labels.txt_, coloque três nomes de classe devido aos dados (apenas duas fotos andando a cavalo e andando de bicicleta, você pode pegar o nome da classe em .xml, basta abri-las e conferir).
    pessoa
    bicicleta
    cavalo
  3. altere o _classes_ nad _filters_ no arquivo .cfg, e você terá que alterar o nome de *.cfg, caso contrário, algum outro problema ocorrerá e NÃO altere os .weights que você deseja usar, caso contrário, outro problema ocorrerá.
  4. execute o código a seguir para verificar se ele é executado em seu ambiente ou não.
    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 você pode compartilhar conosco seu script por favor!

Eu encontrei isso no passado. Há uma grande chance de alguns arquivos .xml ou .jpg não serem nomeados/configurados corretamente. Uma maneira de depurar o que deu errado é adicionar

print(jpg)

Após esta linha: https://github.com/thtrieu/darkflow/blob/master/darkflow/net/yolov2/data.py#L26

Assim, você poderá ver o nome do arquivo corrompido e investigar seu .xml ou .jpg .

Como eu faria para corrigir o problema se forem os jpegs? Eu tive o mesmo problema e executei a declaração de impressão.

Eu obtive esta saída:

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

Eu não sei exatamente o que isso significa, exceto que o segundo arquivo de imagem não tem .jpg depois dele.

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'

recebendo este erro como corrigi-lo plz ajuda

@wendq86 Vendo que isso não está funcionando - você pode tentar apenas colocar os nomes dos arquivos sem o caminho, ou seja, <filename>000004.jpg</filename> e ver se isso muda alguma coisa ao tentar treinar?

isso funcionou para mim

Oi, eu enfrentei o mesmo problema quando quero treinar o conjunto de dados COCO. Aqui está como eu resolvo esse problema:

  1. Eu uso https://github.com/tylin/coco-dpm/blob/master/coco/convert_to_pascalformat.py para converter o formato COCO json para o formato XML.

  2. Mas precisamos modificar alguma parte do script para garantir que o formato desse novo arquivo XML seja o mesmo que o formato VOC XML no exemplo do darkflow (darkflow/test/training/annotations). Por exemplo:
    COCO XML do script da etapa 1 é:
    <tag1>
    xxxxx
    </tag1>
    <tag2>
    xxxxx
    </tag2>
    Mas precisamos do formato como:
    <tag1>xxxxx</tag>
    <tag2>xxxxx</tag2>

3 altere 'tvmonitor' para 'tv' no arquivo 'label.txt'

Apaguei todas as imagens jpeg e funcionou

Oi,

Estou treinando um novo conjunto de dados. No entanto, o treinamento sempre é executado por algumas etapas e, de repente, encontra o seguinte erro: "AttributeError: 'NoneType' object has no attribute 'shape'". Acho que o formato da anotação e o nome do arquivo no arquivo de anotações estão corretos, pois o treinamento pode ser executado por algumas etapas e estou tendo ideias sobre como solucionar problemas ainda mais.

Aprecie quaisquer idéias ou ajuda sobre isso.

Obrigada.

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'

excluir todas as imagens jpeg

Oi, estou tentando treinar a detecção de objetos personalizados para detectar o logotipo da minha empresa, tudo correu bem até esse erro, também excluí e anotei imagens novamente, mas não houve alteração no resultado. Alguém pode me ajudar com isso
Obrigada

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

O nome da sua imagem tem caracteres especiais? Se sim, troque-os.

Em domingo, 24 de novembro de 2019 às 18h32, karan bari [email protected] escreveu:

Oi, estou tentando treinar a detecção de objetos personalizados para detectar meu
company-logo, tudo correu bem até este erro, eu também deletei e
imagens anotadas novamente, mas não houve alteração no resultado. Alguém pode por favor
me ajude com isso
Obrigada

(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: Passar (tipo, 1) ou '1tipo' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passar (type, 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passar (tipo, 1) ou '1tipo' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passar (type, 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passar (type, 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passar (type, 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passar (tipo, 1) ou '1tipo' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passar (type, 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passar (type, 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passar (type, 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passar (type, 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passar (type, 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
AVISO: O log antes da análise do sinalizador vai para stderr.
W1124 18:22:27.201594 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:15: O nome tf.train.RMSPropOptimizer está obsoleto. Em vez disso, use tf.compat.v1.train.RMSPropOptimizer.

W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:16: O nome tf.train.AdadeltaOptimizer está obsoleto. Em vez disso, use tf.compat.v1.train.AdadeltaOptimizer.

W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:17: O nome tf.train.AdagradOptimizer está obsoleto. Em vez disso, use tf.compat.v1.train.AdagradOptimizer.

W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:18: O nome tf.train.AdagradDAOptimizer está obsoleto. Em vez disso, use tf.compat.v1.train.AdagradDAOptimizer.

W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:19: O nome tf.train.MomentumOptimizer está obsoleto. Em vez disso, use tf.compat.v1.train.MomentumOptimizer.

Analisando ./cfg/tiny-yolo-voc.cfg
Analisando cfg/tiny-yolo-voc-1c.cfg
Carregando bin/tiny-yolo-voc.weights ...
63471556 bytes identificados com sucesso
Terminado em 0,019990205764770508s

Construindo rede...
W1124 18:22:27.253580 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:105: O nome tf.placeholder está obsoleto. Em vez disso, use tf.compat.v1.placeholder.

Fonte | Trem? | Descrição da camada | Tamanho de saída
-------+--------+--------------------------------- -+---------------
W1124 18:22:27.257580 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:70: O nome tf.variable_scope está obsoleto. Em vez disso, use tf.compat.v1.variable_scope.

W1124 18:22:27.261598 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:71: O nome tf.get_variable está obsoleto. Por favor, use tf.compat.v1.get_variable.

W1124 18:22:27.277594 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:84: O nome tf.placeholder_with_default está obsoleto. Em vez disso, use tf.compat.v1.placeholder_with_default.

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

Carregar | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 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: O nome tf.nn.max_pool está obsoleto. Em vez disso, use tf.nn.max_pool2d.

Carregar | Sim! | maxp 2x2p0_2 | (?, 208, 208, 16)
Carregar | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 208, 208, 32)
Carregar | Sim! | maxp 2x2p0_2 | (?, 104, 104, 32)
Carregar | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 104, 104, 64)
Carregar | Sim! | maxp 2x2p0_2 | (?, 52, 52, 64)
Carregar | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 52, 52, 128)
Carregar | Sim! | maxp 2x2p0_2 | (?, 26, 26, 128)
Carregar | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 26, 26, 256)
Carregar | Sim! | maxp 2x2p0_2 | (?, 13, 13, 256)
Carregar | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 13, 13, 512)
Carregar | Sim! | maxp 2x2p0_1 | (?, 13, 13, 512)
Carregar | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 13, 13, 1024)
Carregar | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 13, 13, 1024)
Iniciar | Sim! | conv 1x1p0_1 linear | (?, 13, 13, 30)
-------+--------+--------------------------------- -+---------------
Rodando inteiramente na CPU
cfg/tiny-yolo-voc-1c.cfg hiperparâmetros de perda:
H = 13
W = 13
caixa = 5
aulas = 1
escalas = [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á obsoleto e será removido em uma versão futura.
Instruções para atualização:
Use tf.cast em vez disso.
Perda de construção cfg/tiny-yolo-voc-1c.cfg
W1124 18:22:30.010835 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:107: O nome tf.summary.scalar está obsoleto. Em vez disso, use tf.compat.v1.summary.scalar.

Construindo 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á obsoleto e será removido em uma versão futura.
Instruções para atualização:
Use tf.where em 2.0, que tem a mesma regra de transmissão 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: chamando Ones.__init__ (de tensorflow.python .ops.init_ops) com dtype está obsoleto e será removido em uma versão futura.
Instruções para atualização:
Chame a instância do inicializador com o argumento dtype em vez de passá-lo para o construtor
W1124 18:22:32.795700 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:145: O nome tf.Session está obsoleto. Em vez disso, use tf.compat.v1.Session.

2019-11-24 18:22:32.800843: I tensorflow/core/platform/cpu_feature_guard.cc:142] Sua CPU suporta instruções que este binário do TensorFlow não foi compilado para usar: AVX2
Terminado em 11.774582862854004s

Entre no treino...

cfg/tiny-yolo-voc-1c.cfg analisando annotations_clean
Analisando para ['vodafone']
[====================>]100% Image9.xml
Estatisticas:
Tamanho do conjunto de dados: 53
Conjunto de dados de 53 instâncias
Image20.jpg
Traceback (última chamada mais recente):
Arquivo "fluxo", linha 6, em
cliHandler(sys.argv)
Arquivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\cli.py", linha 33, no cliHandler
print('Digite o treinamento...'); tfnet.train()
Arquivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\flow.py", linha 39, em train
for i, (x_batch, datum) em enumerate(lotes):
Arquivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolodata.py", linha 114, em ordem aleatória
inp, new_feed = self._batch(train_instance)
Arquivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2data.py", linha 28, em _batch
img = self.preprocess(caminho, allobj)
Arquivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolo\predict.py", linha 62, em pré-processamento
resultado = imcv2_affine_trans(im)
Arquivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflowutils\im_transform.py", linha 20, em imcv2_affine_trans
h, w, c = im.forma
AttributeError: o objeto 'NoneType' não tem atributo 'shape'


Você está recebendo isso porque comentou.
Responda a este e-mail diretamente, visualize-o no GitHub
https://github.com/thtrieu/darkflow/issues/265?email_source=notifications&email_token=AGG23MNSSXWIHQFI75KYEWDQVJ3ORA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAKXNAissue#comment-5578
ou cancelar
https://github.com/notifications/unsubscribe-auth/AGG23MMETFBN5NG76IHGWZ3QVJ3ORANCNFSM4DNJVSVQ
.

O nome da sua imagem tem caracteres especiais? Se sim, troque-os.

No domingo, 24 de novembro de 2019 às 18h32, karan bari @ . * > escreveu: Olá, estou tentando treinar a detecção de objetos personalizados para detectar o logotipo da minha empresa, tudo correu bem até esse erro, também excluí e anotei imagens novamente, mas não houve alteração no resultado. Alguém pode me ajudar com isso Obrigado (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: A passagem de (tipo, 1) ou '1tipo' como sinônimo de tipo está obsoleta; em uma versão futura do numpy, será entendido como (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: Passando (type , 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passando (type , 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passando (tipo , 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passando (type , 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passando (tipo , 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passando (type , 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passando (type , 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passando (type , 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passando (type , 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passando (type , 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (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: Passando (type , 1) ou '1type' como sinônimo de tipo está obsoleto; em uma versão futura do numpy, será entendido como (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) AVISO: O log antes da análise do sinalizador vai para stderr. W1124 18:22:27.201594 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:15: O nome tf.train.RMSPropOptimizer está obsoleto. Em vez disso, use tf.compat.v1.train.RMSPropOptimizer. W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:16: O nome tf.train.AdadeltaOptimizer está obsoleto. Em vez disso, use tf.compat.v1.train.AdadeltaOptimizer. W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:17: O nome tf.train.AdagradOptimizer está obsoleto. Em vez disso, use tf.compat.v1.train.AdagradOptimizer. W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:18: O nome tf.train.AdagradDAOptimizer está obsoleto. Em vez disso, use tf.compat.v1.train.AdagradDAOptimizer. W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:19: O nome tf.train.MomentumOptimizer está obsoleto. Em vez disso, use tf.compat.v1.train.MomentumOptimizer. Analisando ./cfg/tiny-yolo-voc.cfg Analisando cfg/tiny-yolo-voc-1c.cfg Carregando bin/tiny-yolo-voc.weights ... Identificado com sucesso 63471556 bytes Concluído em 0,019990205764770508s Criando rede ... W1124 18:22:27.253580 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:105: O nome tf.placeholder está obsoleto. Em vez disso, use tf.compat.v1.placeholder. Fonte | Trem? | Descrição da camada | Tamanho da saída -------+--------+------------------------------- ---+--------------- W1124 18:22:27.257580 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\ baseop.py:70: O nome tf.variable_scope está obsoleto. Em vez disso, use tf.compat.v1.variable_scope. W1124 18:22:27.261598 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:71: O nome tf.get_variable está obsoleto. Por favor, use tf.compat.v1.get_variable. W1124 18:22:27.277594 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:84: O nome tf.placeholder_with_default está obsoleto. Em vez disso, use tf.compat.v1.placeholder_with_default. | | entrada | (?, 416, 416, 3) Carga | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 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: O nome tf. nn.max_pool está obsoleto. Em vez disso, use tf.nn.max_pool2d. Carregar | Sim! | maxp 2x2p0_2 | (?, 208, 208, 16) Carga | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 208, 208, 32) Carga | Sim! | maxp 2x2p0_2 | (?, 104, 104, 32) Carga | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 104, 104, 64) Carga | Sim! | maxp 2x2p0_2 | (?, 52, 52, 64) Carga | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 52, 52, 128) Carga | Sim! | maxp 2x2p0_2 | (?, 26, 26, 128) Carga | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 26, 26, 256) Carga | Sim! | maxp 2x2p0_2 | (?, 13, 13, 256) Carga | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 13, 13, 512) Carga | Sim! | maxp 2x2p0_1 | (?, 13, 13, 512) Carga | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 13, 13, 1024) Carga | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 13, 13, 1024) Iniciar | Sim! | conv 1x1p0_1 linear | (?, 13, 13, 30) -------+------------+------------------------ ----------+--------------- Executando inteiramente em CPU cfg/tiny-yolo-voc-1c.cfg hiperparâmetros de perda: H = 13 W = 13 caixa = 5 classes = 1 escala = [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á obsoleto e será removido em uma versão futura. Instruções para atualização: Em vez disso, use tf.cast . Compilando cfg/tiny-yolo-voc-1c.cfg loss W1124 18:22:30.010835 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:107: O nome tf.summary.scalar está obsoleto. Em vez disso, use tf.compat.v1.summary.scalar. Construindo 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á obsoleto e será removido em uma versão futura. Instruções para atualização: Use tf.where na versão 2.0, que tem a mesma regra de transmissão 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: chamar Ones.__init__ (de tensorflow.python.ops.init_ops) com dtype está obsoleto e será removido em uma versão futura. Instruções para atualização: Chame a instância do inicializador com o argumento dtype em vez de passá-lo para o construtor W1124 18:22:32.795700 10144 deprecation_wrapper.py:119] De C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py :145: O nome tf.Session está obsoleto. Em vez disso, use tf.compat.v1.Session. 2019-11-24 18:22:32.800843: I tensorflow/core/platform/cpu_feature_guard.cc:142] Sua CPU suporta instruções que este binário do TensorFlow não foi compilado para uso: AVX2 Finalizado em 11.774582862854004s Digite training ... cfg/ tiny-yolo-voc-1c.cfg analisando annotations_clean Analisando para ['vodafone'] [====================>]100% Image9.xml Estatísticas: tamanho do conjunto de dados : 53 Conjunto de dados de 53 instâncias Image20.jpg Traceback (última chamada mais recente): Arquivo "fluxo", linha 6, emcliHandler(sys.argv) Arquivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\cli.py", linha 33, em cliHandler print('Enter training ...'); tfnet.train() Arquivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\flow.py", linha 39, em train for i, (x_batch, datum) em enumerate(lotes): Arquivo "C: \Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolodata.py", linha 114, em shuffle inp, new_feed = self._batch(train_instance) File "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ yolov2data.py", linha 28, em _batch img = self.preprocess(path, allobj) Arquivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolo\predict.py", linha 62, no resultado do pré-processamento = imcv2_affine_trans(im) Arquivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflowutils\im_transform.py", linha 20, em imcv2_affine_trans h, w, c = im.shape AttributeError: 'NoneType' object has no attribute 'shape ' — Você está recebendo isso porque comentou. Responda a este e-mail diretamente, vê-lo no GitHub <# 265? Email_source = notificações & email_token = AGG23MNSSXWIHQFI75KYEWDQVJ3ORA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAKXNA # issuecomment-557886388>, ou unsubscribe https://github.com/notifications/unsubscribe-auth/AGG23MMETFBN5NG76IHGWZ3QVJ3ORANCNFSM4DNJVSVQ .

Não, eu renomei todas as imagens no formato Image1, Image2, Image3... etc e todas as imagens têm o formato .jpg

É muito possível que uma de suas dimensões de anotação seja menor que
0 ou fora da imagem.

Verifique também se você pode abrir manualmente todas as imagens.

Em domingo, 24 de novembro de 2019 às 18h42, karan bari [email protected] escreveu:

O nome da sua imagem tem caracteres especiais? Se sim, troque-os.
… <#m_-6851739743886041955_>
No domingo, 24 de novembro de 2019 às 18h32, karan bari @ . * > escreveu: Oi, eu sou
tentando treinar a detecção de objetos personalizados para detectar o logotipo da minha empresa,
tudo correu bem até este erro, também deletei e anotei imagens
novamente, mas não há mudança no resultado. Alguém pode me ajudar com isso
Obrigado (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: Passar (tipo, 1) ou '1tipo' como sinônimo de tipo é
descontinuada; em uma versão futura do numpy, será entendido como (tipo,
(1,)) / '(1,) tipo'. _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:517:
FutureWarning: Passar (tipo, 1) ou '1tipo' como sinônimo de tipo é
descontinuada; em uma versão futura do numpy, será entendido como (tipo,
(1,)) / '(1,) tipo'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:518:
FutureWarning: Passar (tipo, 1) ou '1tipo' como sinônimo de tipo é
descontinuada; em uma versão futura do numpy, será entendido como (tipo,
(1,)) / '(1,) tipo'. _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:519:
FutureWarning: Passar (tipo, 1) ou '1tipo' como sinônimo de tipo é
descontinuada; em uma versão futura do numpy, será entendido como (tipo,
(1,)) / '(1,) tipo'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:520:
FutureWarning: Passar (tipo, 1) ou '1tipo' como sinônimo de tipo é
descontinuada; em uma versão futura do numpy, será entendido como (tipo,
(1,)) / '(1,) tipo'. _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:525:
FutureWarning: Passar (tipo, 1) ou '1tipo' como sinônimo de tipo é
descontinuada; em uma versão futura do numpy, será entendido como (tipo,
(1,)) / '(1,) tipo'. np_resource = np.dtype([("resource", np.ubyte, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:541:
FutureWarning: Passar (tipo, 1) ou '1tipo' como sinônimo de tipo é
descontinuada; em uma versão futura do numpy, será entendido como (tipo,
(1,)) / '(1,) tipo'. _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:542:
FutureWarning: Passar (tipo, 1) ou '1tipo' como sinônimo de tipo é
descontinuada; em uma versão futura do numpy, será entendido como (tipo,
(1,)) / '(1,) tipo'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:543:
FutureWarning: Passar (tipo, 1) ou '1tipo' como sinônimo de tipo é
descontinuada; em uma versão futura do numpy, será entendido como (tipo,
(1,)) / '(1,) tipo'. _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:544:
FutureWarning: Passar (tipo, 1) ou '1tipo' como sinônimo de tipo é
descontinuada; em uma versão futura do numpy, será entendido como (tipo,
(1,)) / '(1,) tipo'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:545:
FutureWarning: Passar (tipo, 1) ou '1tipo' como sinônimo de tipo é
descontinuada; em uma versão futura do numpy, será entendido como (tipo,
(1,)) / '(1,) tipo'. _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:550:
FutureWarning: Passar (tipo, 1) ou '1tipo' como sinônimo de tipo é
descontinuada; em uma versão futura do numpy, será entendido como (tipo,
(1,)) / '(1,) tipo'. np_resource = np.dtype([("resource", np.ubyte, 1)])
AVISO: O log antes da análise do sinalizador vai para stderr. W1124 18:22:27.201594
10144 deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:15:
O nome tf.train.RMSPropOptimizer está obsoleto. Por favor, use
tf.compat.v1.train.RMSPropOptimizer. W1124 18:22:27.209591 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:16:
O nome tf.train.AdadeltaOptimizer está obsoleto. Por favor, use
tf.compat.v1.train.AdadeltaOptimizer. W1124 18:22:27.209591 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:17:
O nome tf.train.AdagradOptimizer está obsoleto. Por favor, use
tf.compat.v1.train.AdagradOptimizer. W1124 18:22:27.213590 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:18:
O nome tf.train.AdagradDAOptimizer está obsoleto. Por favor, use
tf.compat.v1.train.AdagradDAOptimizer. W1124 18:22:27.213590 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:19:
O nome tf.train.MomentumOptimizer está obsoleto. Por favor, use
tf.compat.v1.train.MomentumOptimizer. Análise
./cfg/tiny-yolo-voc.cfg Analisando cfg/tiny-yolo-voc-1c.cfg Carregando
bin/tiny-yolo-voc.weights ... Identificado com sucesso 63471556 bytes
Terminado em 0,019990205764770508s Rede de construção ... W1124 18:22:27.253580
10144 deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:105:
O nome tf.placeholder está obsoleto. Por favor, use tf.compat.v1.placeholder
em vez de. Fonte | Trem? | Descrição da camada | Tamanho de saída
-------+--------+--------------------------------- -+--------------- W1124
18:22:27.257580 10144 deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:70:
O nome tf.variable_scope está obsoleto. Por favor, use
tf.compat.v1.variable_scope em vez disso. W1124 18:22:27.261598 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:71:
O nome tf.get_variable está obsoleto. Por favor, use
tf.compat.v1.get_variable em vez disso. W1124 18:22:27.277594 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:84:
O nome tf.placeholder_with_default está obsoleto. Por favor, use
tf.compat.v1.placeholder_with_default em vez disso. | | entrada | (?, 416, 416, 3)
Carregar | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 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:
O nome tf.nn.max_pool está obsoleto. Em vez disso, use tf.nn.max_pool2d.
Carregar | Sim! | maxp 2x2p0_2 | (?, 208, 208, 16) Carga | Sim! | conversão 3x3p1_1
+bnorm com vazamento | (?, 208, 208, 32) Carga | Sim! | maxp 2x2p0_2 | (?, 104, 104,
32) Carga | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 104, 104, 64) Carga | Sim!
| maxp 2x2p0_2 | (?, 52, 52, 64) Carga | Sim! | conv 3x3p1_1 +bnorm com vazamento |
(?, 52, 52, 128) Carga | Sim! | maxp 2x2p0_2 | (?, 26, 26, 128) Carga | Sim!
| conv 3x3p1_1 +bnorm com vazamento | (?, 26, 26, 256) Carga | Sim! | maxp 2x2p0_2 |
(?, 13, 13, 256) Carga | Sim! | conv 3x3p1_1 +bnorm com vazamento | (?, 13, 13, 512)
Carregar | Sim! | maxp 2x2p0_1 | (?, 13, 13, 512) Carga | Sim! | conversão 3x3p1_1
+bnorm com vazamento | (?, 13, 13, 1024) Carga | Sim! | conv 3x3p1_1 +bnorm com vazamento |
(?, 13, 13, 1024) Iniciar | Sim! | conv 1x1p0_1 linear | (?, 13, 13, 30)
-------+--------+--------------------------------- -+--------------- Correndo
inteiramente na CPU cfg/tiny-yolo-voc-1c.cfg hiperparâmetros de perda: H = 13 W =
13 caixas = 5 aulas = 1 escala = [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á obsoleto e será
removido em uma versão futura. Instruções para atualização: Use tf.cast
em vez de. Perda de construção cfg/tiny-yolo-voc-1c.cfg W1124 18:22:30.010835 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:107:
O nome tf.summary.scalar está obsoleto. Por favor, use
tf.compat.v1.summary.scalar em vez disso. Construindo cfg/tiny-yolo-voc-1c.cfg
treinar 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) é
obsoleto e será removido em uma versão futura. Instruções para
atualização: Use tf.where em 2.0, que tem a mesma regra de transmissão que
np.where W1124 18:22:32.038406 10144 depreciação.py:506] De
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\training\rmsprop.py:119:
chamando Uns. init (de tensorflow.python.ops.init_ops) com dtype é
obsoleto e será removido em uma versão futura. Instruções para
atualização: Chama a instância inicializadora com o argumento dtype em vez de
passando para o construtor W1124 18:22:32.795700 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:145:
O nome tf.Session está obsoleto. Em vez disso, use tf.compat.v1.Session.
24/11/2019 18:22:32.800843: I
tensorflow/core/platform/cpu_feature_guard.cc:142] Sua CPU suporta
instruções que este binário do TensorFlow não foi compilado para usar: AVX2
Concluído em 11.774582862854004s Entre no treinamento ... cfg/tiny-yolo-voc-1c.cfg
analisando annotations_clean Analisando para ['vodafone']
[====================>]100% Image9.xml Estatísticas: Tamanho do conjunto de dados: 53 Conjunto de dados
de 53 instâncias Image20.jpg Traceback (última chamada mais recente): Arquivo
"fluxo", linha 6, no arquivo cliHandler(sys.argv)
"C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\cli.py", linha 33,
in cliHandler print('Digite o treinamento...'); Arquivo tfnet.train()
"C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\flow.py",
linha 39, em train for i, (x_batch, datum) em enumerate(lotes): File
"C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolodata.py",
linha 114, em shuffle inp, new_feed = self._batch(train_instance) Arquivo
"C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2data.py",
linha 28, em _batch img = self.preprocess(path, allobj) Arquivo
"C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolo\predict.py",
linha 62, no resultado do pré-processamento = imcv2_affine_trans(im) Arquivo
"C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflowutils\im_transform.py",
linha 20, em imcv2_affine_trans h, w, c = im.shape AttributeError:
O objeto 'NoneType' não tem atributo 'shape' — Você está recebendo isso porque
você comentou. Responda a este e-mail diretamente, visualize-o no GitHub <#265
https://github.com/thtrieu/darkflow/issues/265 ?email_source=notifications&email_token=AGG23MNSSXWIHQFI75KYEWDQVJ3ORA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAKXNAissue#comment-557
ou cancelar
https://github.com/notifications/unsubscribe-auth/AGG23MMETFBN5NG76IHGWZ3QVJ3ORANCNFSM4DNJVSVQ
.

Não, eu renomei todas as imagens no formato Image1, Image2, Image3... etc.
e todas as imagens têm formato .jpg


Você está recebendo isso porque comentou.
Responda a este e-mail diretamente, visualize-o no GitHub
https://github.com/thtrieu/darkflow/issues/265?email_source=notifications&email_token=AGG23MJ2SKBIF2FQTPTLBRLQVJ4SVA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN6WW2ZLOORPWSZGOEFAK,5PQ#issuecomment-557ZLOORPWSZGOEFAK ,
ou cancelar
https://github.com/notifications/unsubscribe-auth/AGG23ML6HYW6S7JZEN2ZAF3QVJ4SVANCNFSM4DNJVSVQ
.

Anotei novamente as imagens desta vez usando labelImg, o problema ainda persiste.

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'

Aqui está o erro novamente e o arquivo .xml correspondente para 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>

Melhor colocar
print(im, type(im))
em darkflow/net/yolo/predict.py em L58 e verifique o caminho sozinho

Teve o mesmo erro

Eu estava enfrentando o mesmo problema e minha correção foi:
mudou im = cv2.imread(im) para im = cv2.imread(im+'.jpg') na linha predict.py # 60

Eu tive o mesmo problema e foi porque excluí a imagem jpg, mas esqueci de excluir sua anotação. portanto, certifique-se de que as imagens e suas anotações sejam consistentes.

Esta página foi útil?
0 / 5 - 0 avaliações