Darkflow: Nuevo error de entrenamiento de conjunto de datos: "AttributeError: el objeto 'NoneType' no tiene atributo 'shape'"

Creado en 30 may. 2017  ·  23Comentarios  ·  Fuente: thtrieu/darkflow

Hola,

Estoy entrenando un nuevo conjunto de datos. Sin embargo, el entrenamiento siempre se ejecuta durante unos pocos pasos y de repente se encuentra con el siguiente error: "AttributeError: 'NoneType' object have noAttribute 'shape'". Creo que el formato de anotación y el nombre de archivo en el archivo de anotación son correctos, ya que la capacitación se puede ejecutar en unos pocos pasos y tengo ideas sobre cómo solucionar más problemas.

Agradezco cualquier idea o ayuda en esto.

Gracias.

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'

Comentario más útil

Me he encontrado con esto en el pasado. Existe una alta probabilidad de que algunos archivos .xml o .jpg no tengan el nombre/configuración adecuada. Una forma de depurar lo que salió mal es agregar

print(jpg)

Después de esta línea: https://github.com/thtrieu/darkflow/blob/master/darkflow/net/yolov2/data.py#L26

Por lo tanto, podrá ver el nombre del archivo dañado e investigar si es .xml o .jpg .

Todos 23 comentarios

Verifique sus archivos xml, ¿el nombre del archivo incluye la extensión de sus imágenes?

Sí, el nombre del archivo incluye la extensión de mis imágenes: .jpg.

A continuación se muestra uno de los archivos 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 Al ver que eso no funciona, ¿puede intentar simplemente poner los nombres de archivo sin la ruta, es decir, <filename>000004.jpg</filename> y ver si eso cambia algo al intentar entrenar?

@abagshaw Gracias por la sugerencia. Intenté poner los nombres de archivo sin la ruta y sigo encontrando el mismo error.

¿Alguna otra idea?

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 Lo extraño es que no da error en el primer paso... lo que puede indicar que algunos de los archivos .xml están configurados correctamente y otros no. ¿Está 100% seguro de que _todos_ los archivos usan el formato <filename>000004.jpg</filename> . ¿Existe la posibilidad de que uno (o más de ellos) no esté configurado correctamente? No estoy seguro de cómo está modificando el formato de todos estos archivos... pero tal vez si está utilizando una herramienta para modificar por lotes una tonelada de archivos, ¿podría faltar alguno?

Lo único que se me ocurre es que tal vez se eliminaron algunas imágenes de /ml/data/new/JPEGImages pero sus archivos correspondientes .xml no se eliminaron de /ml/data/new/Annotations . ¿Hay la misma cantidad de archivos .xml en /ml/data/new/Annotations que de imágenes en /ml/data/new/JPEGImages ?

Me he encontrado con esto en el pasado. Existe una alta probabilidad de que algunos archivos .xml o .jpg no tengan el nombre/configuración adecuada. Una forma de depurar lo que salió mal es agregar

print(jpg)

Después de esta línea: https://github.com/thtrieu/darkflow/blob/master/darkflow/net/yolov2/data.py#L26

Por lo tanto, podrá ver el nombre del archivo dañado e investigar si es .xml o .jpg .

¡Gracias @abagshaw y @thtrieu! Encontré la causa del problema escribiendo una secuencia de comandos de Python para analizar los archivos xml y verificar el valor de ancho, alto, ymin, ymax, xmin y xmax. El problema se debe a dos archivos jpg que opencv no puede cargar correctamente, lo que hace que el ancho y la altura se especifiquen como 0 en los archivos xml escritos por labelImg.

La sugerencia de @thtrieu es muy útil. No utilicé la impresión para encontrar el problema .jpg o .xml.
Para cualquiera que esté comenzando con darkflow, solo quiero asegurarme de si funciona en su entorno o no. Hice una pequeña conclusión aquí, debido a los problemas que se me ocurrieron:

  1. use datos de darkflow-master/test/training/annotations y .../images, por lo que no necesita considerar la herramienta VOCformat. tienes dos archivos .xml aquí. (1.xml, 2.xml)
  2. haga su propio _test_labels.txt_, coloque tres nombres de clase debido a los datos (solo dos imágenes montando a caballo y montando en bicicleta, puede obtener el nombre de la clase de .xml, solo ábralos y verifique).
    persona
    bicicleta
    caballo
  3. cambie las _clases_ y los _filtros_ en el archivo .cfg, y tendrá que cambiar el nombre de *.cfg; de lo contrario, se producirá algún otro problema, y ​​NO cambie los .pesos que desea usar; de lo contrario, se producirá otro problema.
  4. ejecute el siguiente código para verificar si se ejecuta en su entorno o no.
    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, ¿puede compartir con nosotros su guión, por favor?

Me he encontrado con esto en el pasado. Existe una alta probabilidad de que algunos archivos .xml o .jpg no tengan el nombre/configuración adecuada. Una forma de depurar lo que salió mal es agregar

print(jpg)

Después de esta línea: https://github.com/thtrieu/darkflow/blob/master/darkflow/net/yolov2/data.py#L26

Por lo tanto, podrá ver el nombre del archivo dañado e investigar si es .xml o .jpg .

¿Cómo haría para solucionar el problema si son los jpegs? Tuve el mismo problema y ejecuté la declaración de impresión.

Obtuve esta salida:

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

No sé exactamente qué significa eso, aparte de que el segundo archivo de imagen no tiene .jpg despué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'

obtener este error cómo solucionarlo por favor ayuda

@ wendq86 Al ver que eso no funciona, ¿puede intentar simplemente poner los nombres de archivo sin la ruta, es decir, <filename>000004.jpg</filename> y ver si eso cambia algo al intentar entrenar?

esto funcionó para mí

Hola, enfrenté el mismo problema cuando quiero entrenar el conjunto de datos COCO. Así es como soluciono este problema:

  1. Uso https://github.com/tylin/coco-dpm/blob/master/coco/convert_to_pascalformat.py para convertir el formato COCO json al formato XML.

  2. Pero necesitamos modificar alguna parte del script para asegurarnos de que el formato de este nuevo archivo XML sea el mismo que el formato de VOC XML en el ejemplo de darkflow (darkflow/test/training/annotations). Por ejemplo:
    COCO XML del script del paso 1 es:
    <tag1>
    xxxxx
    </tag1>
    <tag2>
    xxxxx
    </tag2>
    Pero necesitamos el formato como:
    <tag1>xxxxx</tag>
    <tag2>xxxxx</tag2>

3 cambie 'tvmonitor' a 'tv' en el archivo 'label.txt'

Eliminé todas las imágenes jpeg y funcionó.

Hola,

Estoy entrenando un nuevo conjunto de datos. Sin embargo, el entrenamiento siempre se ejecuta durante unos pocos pasos y de repente se encuentra con el siguiente error: "AttributeError: 'NoneType' object have noAttribute 'shape'". Creo que el formato de anotación y el nombre de archivo en el archivo de anotación son correctos, ya que la capacitación se puede ejecutar en unos pocos pasos y tengo ideas sobre cómo solucionar más problemas.

Agradezco cualquier idea o ayuda en esto.

Gracias.

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'

eliminar todas las imágenes jpeg

Hola, estoy tratando de entrenar la detección de objetos personalizados para detectar el logotipo de mi empresa, todo salió bien hasta este error, también eliminé y anoté las imágenes nuevamente, pero no cambió el resultado. ¿Alguien puede ayudarme con esto?
Gracias

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

¿El nombre de tu imagen tiene caracteres especiales? Si es así cambiarlos.

El domingo 24 de noviembre de 2019 a las 6:32 p. m., karan bari [email protected] escribió:

Hola, estoy tratando de entrenar la detección de objetos personalizados para detectar mi
logotipo de la empresa, todo iba bien hasta este error, también eliminé y
imágenes anotadas de nuevo, pero no hay cambios en el resultado. alguien puede por favor
Ayúdame con esto
Gracias

(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: pasar (tipo, 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: pasar (tipo, 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: pasar (tipo, 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: pasar (tipo, 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: pasar (tipo, 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: pasar (tipo, 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá como (tipo, (1,)) / '(1,)tipo'.
np_recurso = np.dtype([("recurso", np.ubyte, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:541: FutureWarning: pasar (tipo, 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: pasar (tipo, 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: pasar (tipo, 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: pasar (tipo, 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: pasar (tipo, 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: pasar (tipo, 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá como (tipo, (1,)) / '(1,)tipo'.
np_recurso = np.dtype([("recurso", np.ubyte, 1)])
ADVERTENCIA: El inicio de sesión antes de que el análisis de banderas vaya a stderr.
W1124 18:22:27.201594 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:15: El nombre tf.train.RMSPropOptimizer está en desuso. Utilice tf.compat.v1.train.RMSPropOptimizer en su lugar.

W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:16: El nombre tf.train.AdadeltaOptimizer está en desuso. Utilice tf.compat.v1.train.AdadeltaOptimizer en su lugar.

W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:17: El nombre tf.train.AdagradOptimizer está en desuso. Utilice tf.compat.v1.train.AdagradOptimizer en su lugar.

W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:18: El nombre tf.train.AdagradDAOptimizer está en desuso. Utilice tf.compat.v1.train.AdagradDAOptimizer en su lugar.

W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:19: El nombre tf.train.MomentumOptimizer está en desuso. Utilice tf.compat.v1.train.MomentumOptimizer en su lugar.

Analizando ./cfg/tiny-yolo-voc.cfg
Analizando cfg/tiny-yolo-voc-1c.cfg
Cargando bin/tiny-yolo-voc.pesos ...
63471556 bytes identificados con éxito
Terminado en 0.019990205764770508s

Red de construcción...
W1124 18:22:27.253580 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:105: El nombre tf.placeholder está en desuso. Utilice tf.compat.v1.placeholder en su lugar.

Fuente | ¿Entrenar? | Descripción de la capa | Tamaño de salida
-------+--------------+--------------------------------- -----------------
W1124 18:22:27.257580 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:70: El nombre tf.variable_scope está en desuso. Utilice tf.compat.v1.variable_scope en su lugar.

W1124 18:22:27.261598 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:71: El nombre tf.get_variable está en desuso. Utilice tf.compat.v1.get_variable en su lugar.

W1124 18:22:27.277594 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:84: El nombre tf.placeholder_with_default está en desuso. Utilice tf.compat.v1.placeholder_with_default en su lugar.

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

Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 416, 416, 16)
W1124 18:22:27.389549 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\simple.py:106: El nombre tf.nn.max_pool está en desuso. Utilice tf.nn.max_pool2d en su lugar.

Cargar | ¡Sí! | maxp 2x2p0_2 | (?, 208, 208, 16)
Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 208, 208, 32)
Cargar | ¡Sí! | maxp 2x2p0_2 | (?, 104, 104, 32)
Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 104, 104, 64)
Cargar | ¡Sí! | maxp 2x2p0_2 | (?, 52, 52, 64)
Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 52, 52, 128)
Cargar | ¡Sí! | maxp 2x2p0_2 | (?, 26, 26, 128)
Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 26, 26, 256)
Cargar | ¡Sí! | maxp 2x2p0_2 | (?, 13, 13, 256)
Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 13, 13, 512)
Cargar | ¡Sí! | maxp 2x2p0_1 | (?, 13, 13, 512)
Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 13, 13, 1024)
Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 13, 13, 1024)
inicial | ¡Sí! | conv 1x1p0_1 lineal | (?, 13, 13, 30)
-------+--------------+--------------------------------- -----------------
Ejecutándose completamente en la CPU
cfg/tiny-yolo-voc-1c.cfg hiperparámetros de pérdida:
H = 13
ancho = 13
caja = 5
clases = 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á en desuso y se eliminará en una versión futura.
Instrucciones para actualizar:
Use tf.cast en su lugar.
Pérdida del edificio cfg/tiny-yolo-voc-1c.cfg
W1124 18:22:30.010835 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:107: El nombre tf.summary.scalar está en desuso. Utilice tf.compat.v1.summary.scalar en su lugar.

Building cfg/tiny-yolo-voc-1c.cfg tren op
W1124 18:22:30.102793 10144 deprecation.py:323] Desde 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á en desuso y se eliminará en una versión futura.
Instrucciones para actualizar:
Use tf.where en 2.0, que tiene la misma regla de transmisión que np.where
W1124 18:22:32.038406 10144 deprecation.py:506] Desde C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\training\rmsprop.py:119: llamando a Ones.__init__ (desde tensorflow.python .ops.init_ops) con dtype está en desuso y se eliminará en una versión futura.
Instrucciones para actualizar:
Llame a la instancia del inicializador con el argumento dtype en lugar de pasarlo al constructor
W1124 18:22:32.795700 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:145: El nombre tf.Session está en desuso. Utilice tf.compat.v1.Session en su lugar.

2019-11-24 18:22:32.800843: I tensorflow/core/platform/cpu_feature_guard.cc:142] Su CPU admite instrucciones que este binario de TensorFlow no se compiló para usar: AVX2
Terminado en 11.774582862854004s

Entra en entrenamiento...

cfg/tiny-yolo-voc-1c.cfg analizando anotaciones_limpiar
Análisis de ['vodafone']
[====================>]100% Imagen9.xml
Estadísticas:
Tamaño del conjunto de datos: 53
Conjunto de datos de 53 instancias
Imagen20.jpg
Rastreo (llamadas recientes más última):
Archivo "flujo", línea 6, en
cliHandler(sys.argv)
Archivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\cli.py", línea 33, en cliHandler
print('Ingresar al entrenamiento...'); tfnet.tren()
Archivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\flow.py", línea 39, en tren
para i, (x_batch, datum) en enumerar (lotes):
Archivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolodata.py", línea 114, en modo aleatorio
inp, new_feed = self._batch(train_instance)
Archivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2data.py", línea 28, en _batch
img = self.preprocess(ruta, allobj)
Archivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolo\predict.py", línea 62, en preproceso
resultado = imcv2_affine_trans(im)
Archivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflowutils\im_transform.py", línea 20, en imcv2_affine_trans
h, w, c = forma im.
AttributeError: el objeto 'NoneType' no tiene atributo 'shape'


Estás recibiendo esto porque comentaste.
Responda a este correo electrónico directamente, véalo en GitHub
https://github.com/thtrieu/darkflow/issues/265?email_source=notifications&email_token=AGG23MNSSXWIHQFI75KYEWDQVJ3ORA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAKXNA#issuecomment-385788,66
o darse de baja
https://github.com/notifications/unsubscribe-auth/AGG23MMETFBN5NG76IHGWZ3QVJ3ORANCNFSM4DNJVSVQ
.

¿El nombre de tu imagen tiene caracteres especiales? Si es así cambiarlos.

El dom., 24 nov. 2019 a las 18:32, karan bari @ . * > escribió: Hola, estoy tratando de entrenar la detección de objetos personalizados para detectar el logotipo de mi empresa, todo salió bien hasta este error, también eliminé y anoté las imágenes nuevamente, pero no cambió el resultado. ¿Puede alguien ayudarme con esto? Gracias (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: pasar (tipo, 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: Pasando (escriba , 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: Pasando (escriba , 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: Pasando (escriba , 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: Pasando (escriba , 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: Pasando (escriba , 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: Pasando (escriba , 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: Pasando (escriba , 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: Pasando (escriba , 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: Pasando (escriba , 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: Pasando (escriba , 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá 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: Pasando (escriba , 1) o '1tipo' como sinónimo de tipo está en desuso; en una versión futura de numpy, se entenderá como (tipo, (1,)) / '(1,)tipo'. np_resource = np.dtype([("resource", np.ubyte, 1)]) ADVERTENCIA: El inicio de sesión antes de que el análisis de indicadores vaya a stderr. W1124 18:22:27.201594 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:15: El nombre tf.train.RMSPropOptimizer está en desuso. Utilice tf.compat.v1.train.RMSPropOptimizer en su lugar. W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:16: El nombre tf.train.AdadeltaOptimizer está en desuso. Utilice tf.compat.v1.train.AdadeltaOptimizer en su lugar. W1124 18:22:27.209591 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:17: El nombre tf.train.AdagradOptimizer está en desuso. Utilice tf.compat.v1.train.AdagradOptimizer en su lugar. W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:18: El nombre tf.train.AdagradDAOptimizer está en desuso. Utilice tf.compat.v1.train.AdagradDAOptimizer en su lugar. W1124 18:22:27.213590 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:19: El nombre tf.train.MomentumOptimizer está en desuso. Utilice tf.compat.v1.train.MomentumOptimizer en su lugar. Analizando ./cfg/tiny-yolo-voc.cfg Analizando cfg/tiny-yolo-voc-1c.cfg Cargando bin/tiny-yolo-voc.weights... Identificado correctamente 63471556 bytes Terminado en 0.019990205764770508s Red de construcción... W1124 18:22:27.253580 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:105: El nombre tf.placeholder está en desuso. Utilice tf.compat.v1.placeholder en su lugar. Fuente | ¿Entrenar? | Descripción de la capa | Tamaño de salida ---------------------+---------------------------------------- ---+--------------- W1124 18:22:27.257580 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\ baseop.py:70: el nombre tf.variable_scope está en desuso. Utilice tf.compat.v1.variable_scope en su lugar. W1124 18:22:27.261598 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:71: El nombre tf.get_variable está en desuso. Utilice tf.compat.v1.get_variable en su lugar. W1124 18:22:27.277594 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:84: El nombre tf.placeholder_with_default está en desuso. Utilice tf.compat.v1.placeholder_with_default en su lugar. | | entrada | (?, 416, 416, 3) Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 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: El nombre tf. nn.max_pool está en desuso. Utilice tf.nn.max_pool2d en su lugar. Cargar | ¡Sí! | maxp 2x2p0_2 | (?, 208, 208, 16) Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 208, 208, 32) Cargar | ¡Sí! | maxp 2x2p0_2 | (?, 104, 104, 32) Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 104, 104, 64) Cargar | ¡Sí! | maxp 2x2p0_2 | (?, 52, 52, 64) Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 52, 52, 128) Cargar | ¡Sí! | maxp 2x2p0_2 | (?, 26, 26, 128) Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 26, 26, 256) Cargar | ¡Sí! | maxp 2x2p0_2 | (?, 13, 13, 256) Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 13, 13, 512) Cargar | ¡Sí! | maxp 2x2p0_1 | (?, 13, 13, 512) Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 13, 13, 1024) Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 13, 13, 1024) Inicio | ¡Sí! | conv 1x1p0_1 lineal | (?, 13, 13, 30) -------+--------------+------------------------ ----------+--------------- Se ejecuta completamente en la CPU cfg/tiny-yolo-voc-1c.cfg hiperparámetros de pérdida: H = 13 W = 13 cajas = 5 clases = 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á en desuso y se eliminará en una versión futura. Instrucciones para actualizar: use tf.cast en su lugar. Building cfg/tiny-yolo-voc-1c.cfg loss W1124 18:22:30.010835 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:107: El nombre tf.summary.scalar está en desuso. Utilice tf.compat.v1.summary.scalar en su lugar. Building cfg/tiny-yolo-voc-1c.cfg tren op W1124 18:22:30.102793 10144 deprecation.py:323] Desde 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á en desuso y se eliminará en una versión futura. Instrucciones para actualizar: use tf.where en 2.0, que tiene la misma regla de transmisión que np.where W1124 18:22:32.038406 10144 deprecation.py:506] Desde C:\Users\karanbari\Anaconda3\lib\site-packages\ tensorflow\python\training\rmsprop.py:119: llamar a Ones.__init__ (de tensorflow.python.ops.init_ops) con dtype está en desuso y se eliminará en una versión futura. Instrucciones para la actualización: Llame a la instancia del inicializador con el argumento dtype en lugar de pasarlo al constructor W1124 18:22:32.795700 10144 deprecation_wrapper.py:119] Desde C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py :145: El nombre tf.Session está en desuso. Utilice tf.compat.v1.Session en su lugar. 2019-11-24 18:22:32.800843: I tensorflow/core/platform/cpu_feature_guard.cc:142] Su CPU admite instrucciones que este binario de TensorFlow no se compiló para usar: AVX2 Terminado en 11.774582862854004s Entrar en entrenamiento... cfg/ tiny-yolo-voc-1c.cfg parsing annotations_clean Parsing for ['vodafone'] [====================>]100% Image9.xml Estadísticas: tamaño del conjunto de datos : 53 Conjunto de datos de 53 instancia(s) Imagen20.jpg Rastreo (última llamada más reciente): Archivo "flujo", línea 6, encliHandler(sys.argv) Archivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\cli.py", línea 33, en cliHandler print('Enter training...'); tfnet.train() Archivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\flow.py", línea 39, en tren para i, (x_batch, datum) en enumerar(lotes): Archivo "C: \Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolodata.py", línea 114, en entrada aleatoria, new_feed = self._batch(train_instance) File "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ yolov2data.py", línea 28, en _batch img = self.preprocess(path, allobj) File "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolo\predict.py", línea 62, en el resultado del preprocesamiento = imcv2_affine_trans(im) Archivo "C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflowutils\im_transform.py", línea 20, en imcv2_affine_trans h, w, c = im.shape AttributeError: el objeto 'NoneType' no tiene el atributo 'shape' ' — Estás recibiendo esto porque comentaste. Responder a este correo electrónico directamente, visualizarla en GitHub <# 265? = Email_source notificaciones y email_token = AGG23MNSSXWIHQFI75KYEWDQVJ3ORA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAKXNA # issuecomment-557886388>, o darse de baja https://github.com/notifications/unsubscribe-auth/AGG23MMETFBN5NG76IHGWZ3QVJ3ORANCNFSM4DNJVSVQ .

No, he vuelto a grabar todas las imágenes en formato Imagen1, Imagen2,Imagen3... etc. y todas las imágenes tienen formato .jpg

Es muy posible que una de las dimensiones de su anotación sea menor que
0 o fuera de la imagen.

Compruebe también si puede abrir manualmente todas las imágenes.

El domingo 24 de noviembre de 2019 a las 6:42 p. m., karan bari [email protected] escribió:

¿El nombre de tu imagen tiene caracteres especiales? Si es así cambiarlos.
… <#m_-6851739743886041955_>
El dom., 24 nov. 2019 a las 18:32, karan bari @ . * > escribió: Hola soy
tratando de entrenar la detección de objetos personalizados para detectar el logotipo de mi empresa,
todo salió bien hasta este error, también borré y anoté imágenes
de nuevo, pero no hay cambios en el resultado. ¿Alguien puede ayudarme con esto?
Gracias (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.pesos --tren
--anotación annotations_clean --dataset images/train_clean --epoch 300
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\frameworkdtypes.py:516:
Advertencia futura: Pasar (tipo, 1) o '1 tipo' como sinónimo de tipo es
obsoleto; en una versión futura de numpy, se entenderá 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:
Advertencia futura: Pasar (tipo, 1) o '1 tipo' como sinónimo de tipo es
obsoleto; en una versión futura de numpy, se entenderá 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:
Advertencia futura: Pasar (tipo, 1) o '1 tipo' como sinónimo de tipo es
obsoleto; en una versión futura de numpy, se entenderá 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:
Advertencia futura: Pasar (tipo, 1) o '1 tipo' como sinónimo de tipo es
obsoleto; en una versión futura de numpy, se entenderá 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:
Advertencia futura: Pasar (tipo, 1) o '1 tipo' como sinónimo de tipo es
obsoleto; en una versión futura de numpy, se entenderá 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:
Advertencia futura: Pasar (tipo, 1) o '1 tipo' como sinónimo de tipo es
obsoleto; en una versión futura de numpy, se entenderá como (tipo,
(1,)) / '(1,)tipo'. np_recurso = np.dtype([("recurso", np.ubyte, 1)])
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorboard\compat\tensorflow_stubdtypes.py:541:
Advertencia futura: Pasar (tipo, 1) o '1 tipo' como sinónimo de tipo es
obsoleto; en una versión futura de numpy, se entenderá 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:
Advertencia futura: Pasar (tipo, 1) o '1 tipo' como sinónimo de tipo es
obsoleto; en una versión futura de numpy, se entenderá 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:
Advertencia futura: Pasar (tipo, 1) o '1 tipo' como sinónimo de tipo es
obsoleto; en una versión futura de numpy, se entenderá 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:
Advertencia futura: Pasar (tipo, 1) o '1 tipo' como sinónimo de tipo es
obsoleto; en una versión futura de numpy, se entenderá 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:
Advertencia futura: Pasar (tipo, 1) o '1 tipo' como sinónimo de tipo es
obsoleto; en una versión futura de numpy, se entenderá 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:
Advertencia futura: Pasar (tipo, 1) o '1 tipo' como sinónimo de tipo es
obsoleto; en una versión futura de numpy, se entenderá como (tipo,
(1,)) / '(1,)tipo'. np_recurso = np.dtype([("recurso", np.ubyte, 1)])
ADVERTENCIA: El inicio de sesión antes de que el análisis de banderas vaya a stderr. W1124 18:22:27.201594
10144 deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:15:
El nombre tf.train.RMSPropOptimizer está en desuso. Por favor use
tf.compat.v1.train.RMSPropOptimizer en su lugar. W1124 18:22:27.209591 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:16:
El nombre tf.train.AdadeltaOptimizer está en desuso. Por favor use
tf.compat.v1.train.AdadeltaOptimizer en su lugar. W1124 18:22:27.209591 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:17:
El nombre tf.train.AdagradOptimizer está en desuso. Por favor use
tf.compat.v1.train.AdagradOptimizer en su lugar. W1124 18:22:27.213590 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:18:
El nombre tf.train.AdagradDAOptimizer está en desuso. Por favor use
tf.compat.v1.train.AdagradDAOptimizer en su lugar. W1124 18:22:27.213590 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:19:
El nombre tf.train.MomentumOptimizer está en desuso. Por favor use
tf.compat.v1.train.MomentumOptimizer en su lugar. análisis
./cfg/tiny-yolo-voc.cfg Analizando cfg/tiny-yolo-voc-1c.cfg Cargando
bin/tiny-yolo-voc.weights ... Identificado con éxito 63471556 bytes
Terminado en 0.019990205764770508s Red de construcción... W1124 18:22:27.253580
10144 deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:105:
El nombre tf.placeholder está en desuso. Utilice tf.compat.v1.placeholder
en lugar de. Fuente | ¿Entrenar? | Descripción de la capa | Tamaño de salida
-------+--------------+--------------------------------- ----------------- W1124
18:22:27.257580 10144 deprecation_wrapper.py:119] Desde
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:70:
El nombre tf.variable_scope está en desuso. Por favor use
tf.compat.v1.variable_scope en su lugar. W1124 18:22:27.261598 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:71:
El nombre tf.get_variable está en desuso. Por favor use
tf.compat.v1.get_variable en su lugar. W1124 18:22:27.277594 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\ops\baseop.py:84:
El nombre tf.placeholder_with_default está en desuso. Por favor use
tf.compat.v1.placeholder_with_default en su lugar. | | entrada | (?, 416, 416, 3)
Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 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:
El nombre tf.nn.max_pool está en desuso. Utilice tf.nn.max_pool2d en su lugar.
Cargar | ¡Sí! | maxp 2x2p0_2 | (?, 208, 208, 16) Cargar | ¡Sí! | conversión 3x3p1_1
+bnorm con fugas | (?, 208, 208, 32) Cargar | ¡Sí! | maxp 2x2p0_2 | (?, 104, 104,
32) Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 104, 104, 64) Cargar | ¡Sí!
| maxp 2x2p0_2 | (?, 52, 52, 64) Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas |
(?, 52, 52, 128) Cargar | ¡Sí! | maxp 2x2p0_2 | (?, 26, 26, 128) Cargar | ¡Sí!
| conv 3x3p1_1 +bnorm con fugas | (?, 26, 26, 256) Cargar | ¡Sí! | maxp 2x2p0_2 |
(?, 13, 13, 256) Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas | (?, 13, 13, 512)
Cargar | ¡Sí! | maxp 2x2p0_1 | (?, 13, 13, 512) Cargar | ¡Sí! | conversión 3x3p1_1
+bnorm con fugas | (?, 13, 13, 1024) Cargar | ¡Sí! | conv 3x3p1_1 +bnorm con fugas |
(?, 13, 13, 1024) Inicio | ¡Sí! | conv 1x1p0_1 lineal | (?, 13, 13, 30)
-------+--------------+--------------------------------- ----------------- Corriendo
completamente en CPU cfg/tiny-yolo-voc-1c.cfg hiperparámetros de pérdida: H = 13 W =
13 cajas = 5 clases = 1 escalas = [1.0, 5.0, 1.0, 1.0] W1124 18:22:29.962576
10144 depreciación.py:323] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:87:
to_float (de tensorflow.python.ops.math_ops) está en desuso y será
eliminado en una versión futura. Instrucciones para actualizar: Use tf.cast
en lugar de. Edificio cfg/tiny-yolo-voc-1c.cfg pérdida W1124 18:22:30.010835 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\yolov2\train.py:107:
El nombre tf.summary.scalar está en desuso. Por favor use
tf.compat.v1.summary.scalar en su lugar. Construyendo cfg/tiny-yolo-voc-1c.cfg
tren 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) es
en desuso y se eliminará en una versión futura. Instrucciones para
actualización: use tf.where en 2.0, que tiene la misma regla de transmisión que
np.where W1124 18:22:32.038406 10144 depreciación.py:506] Desde
C:\Users\karanbari\Anaconda3\lib\site-packages\tensorflow\python\training\rmsprop.py:119:
llamando Unos. init (de tensorflow.python.ops.init_ops) con dtype es
en desuso y se eliminará en una versión futura. Instrucciones para
actualización: llame a la instancia del inicializador con el argumento dtype en lugar de
pasándoselo al constructor W1124 18:22:32.795700 10144
deprecation_wrapper.py:119] De
C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\net\build.py:145:
El nombre tf.Session está en desuso. Utilice tf.compat.v1.Session en su lugar.
2019-11-24 18:22:32.800843: yo
tensorflow/core/platform/cpu_feature_guard.cc:142] Su CPU admite
instrucciones que este binario TensorFlow no fue compilado para usar: AVX2
Terminado en 11.774582862854004s Entrar en entrenamiento... cfg/tiny-yolo-voc-1c.cfg
analizando annotations_clean Analizando para ['vodafone']
[====================>]100% Image9.xml Estadísticas: Tamaño del conjunto de datos: 53 Conjunto de datos
de 53 instancia(s) Imagen20.jpg Rastreo (última llamada más reciente): Archivo
"flujo", línea 6, en el archivo cliHandler (sys.argv)
"C:\Users\karanbari\Desktop\YOLOdarkflow-masterdarkflow\cli.py", línea 33,
en cliHandler print('Entrar en entrenamiento...'); Archivo tfnet.train()
"C:\Usuarios\karanbari\Escritorio\YOLOdarkflow-masterdarkflow\net\flow.py",
línea 39, en tren para i, (x_batch, datum) en enumerar (lotes): Archivo
"C:\Usuarios\karanbari\Escritorio\YOLOdarkflow-masterdarkflow\net\yolodata.py",
línea 114, en shuffle inp, new_feed = self._batch(train_instance) Archivo
"C:\Usuarios\karanbari\Escritorio\YOLOdarkflow-masterdarkflow\net\yolov2data.py",
línea 28, en _batch img = self.preprocess(path, allobj) File
"C:\Usuarios\karanbari\Escritorio\YOLOdarkflow-masterdarkflow\net\yolo\predict.py",
línea 62, en resultado de preprocesamiento = archivo imcv2_affine_trans(im)
"C:\Usuarios\karanbari\Escritorio\YOLOdarkflow-masterdarkflowutils\im_transform.py",
línea 20, en imcv2_affine_trans h, w, c = im.shape AttributeError:
El objeto 'NoneType' no tiene el atributo 'shape': está recibiendo esto porque
comentaste. Responda a este correo electrónico directamente, véalo en GitHub <#265
https://github.com/thtrieu/darkflow/issues/265 ?email_source=notifications&email_token=AGG23MNSSXWIHQFI75KYEWDQVJ3ORA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAKXNA#issuecomment-53878,8
o darse de baja
https://github.com/notifications/unsubscribe-auth/AGG23MMETFBN5NG76IHGWZ3QVJ3ORANCNFSM4DNJVSVQ
.

No, he vuelto a grabar todas las imágenes en formato Imagen1, Imagen2,Imagen3... etc.
y todas las imágenes tienen formato .jpg


Estás recibiendo esto porque comentaste.
Responda a este correo electrónico directamente, véalo en GitHub
https://github.com/thtrieu/darkflow/issues/265?email_source=notifications&email_token=AGG23MJ2SKBIF2FQTPTLBRLQVJ4SVA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAK5PQ7,87comment-156
o darse de baja
https://github.com/notifications/unsubscribe-auth/AGG23ML6HYW6S7JZEN2ZAF3QVJ4SVANCNFSM4DNJVSVQ
.

Nuevamente anoté las imágenes esta vez usando labelImg, el problema aún 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'

Aquí está el error nuevamente y el archivo .xml correspondiente 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>

mejor poner
print(im, type(im))
en darkflow/net/yolo/predict.py en L58 y verifique la ruta usted mismo

Tuve el mismo error

Estaba enfrentando el mismo problema y mi solución fue:
cambiado im = cv2.imread(im) a im = cv2.imread(im+'.jpg') en predict.py línea # 60

Tuve el mismo problema y fue porque eliminé la imagen jpg pero olvidé eliminar su anotación. así que asegúrese de que las imágenes y sus anotaciones sean consistentes.

¿Fue útil esta página
0 / 5 - 0 calificaciones