New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Dataset Training Error - "AttributeError: 'NoneType' object has no attribute 'shape'" #265
Comments
Check your xml files, does the filename include the extension of your images? |
Yes, the filename includes the extension of my images: .jpg. Below is one of the xml file:
|
@wendq86 Seeing as that isn't working - can you try just putting the filenames without the path, i.e. |
@abagshaw Thanks for the suggestion. I tried putting the filenames without the path and still encounter the same error. Any other ideas?
|
@wendq86 The odd thing is that it doesn't error on the first step...which may indicate that some of the The only other thing that I can think of is that maybe some images were removed from |
I have encountered this in the past. There is a high chance some
After this line: https://github.com/thtrieu/darkflow/blob/master/darkflow/net/yolov2/data.py#L26 So you will be able to see the name of the corrupted file and investigate either its |
Thanks @abagshaw and @thtrieu! I found the cause of the problem by writing a python script to parse through the xml files to check the width, height, ymin, ymax, xmin and xmax value. The problem is due to two jpg files that can't be loaded properly by opencv, resulting in the width and height being specified a 0 in the xml files written by labelImg. |
The suggestion of @thtrieu is very helpful. I didn't use print to find out the trouble .jpg or .xml.
|
wendq86 can you share with us your script please ! |
How would I go about fixing the issue if it's the jpegs? I had the same issue and ran the print statement. I got this output:
I don't know exactly what that means, other than that the 2nd image file does not have .jpg after it. |
getting this error how to fix it plz help |
this worked for me |
Hi, I faced the same problem when I want to train COCO dataset. Here is how I fix this problem:
3 change 'tvmonitor' to 'tv' in the 'label.txt' file |
I deleted all jpeg images and it worked |
delete all jpeg images |
Hi, I am trying to train custom object detection to detect my company-logo, everything went well until this error, I also deleted and annotated images again but it no change in the outcome. Can someone please help me with this
|
Does your image name have special characters? If so change them.
…On Sun, 24 Nov 2019 at 6:32 PM, karan bari ***@***.***> wrote:
Hi, I am trying to train custom object detection to detect my
company-logo, everything went well until this error, I also deleted and
annotated images again but it no change in the outcome. Can someone please
help me with this
Thank You
(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'
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#265?email_source=notifications&email_token=AGG23MNSSXWIHQFI75KYEWDQVJ3ORA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAKXNA#issuecomment-557886388>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGG23MMETFBN5NG76IHGWZ3QVJ3ORANCNFSM4DNJVSVQ>
.
|
No i have reanmed all the images in Image1, Image2,Image3... etc format and all the images have .jpg format |
It is very much possible that one of your annotation dimension is less than
0 or out of the image.
Also check if you can manually open all the images.
…On Sun, 24 Nov 2019 at 6:42 PM, karan bari ***@***.***> wrote:
Does your image name have special characters? If so change them.
… <#m_-6851739743886041955_>
On Sun, 24 Nov 2019 at 6:32 PM, karan bari *@*.***> wrote: Hi, I am
trying to train custom object detection to detect my company-logo,
everything went well until this error, I also deleted and annotated images
again but it no change in the outcome. Can someone please help me with this
Thank You (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..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 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' — You are receiving this because
you commented. Reply to this email directly, view it on GitHub <#265
<#265>?email_source=notifications&email_token=AGG23MNSSXWIHQFI75KYEWDQVJ3ORA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAKXNA#issuecomment-557886388>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGG23MMETFBN5NG76IHGWZ3QVJ3ORANCNFSM4DNJVSVQ
.
No i have reanmed all the images in Image1, Image2,Image3... etc format
and all the images have .jpg format
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#265?email_source=notifications&email_token=AGG23MJ2SKBIF2FQTPTLBRLQVJ4SVA5CNFSM4DNJVSV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAK5PQ#issuecomment-557887166>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGG23ML6HYW6S7JZEN2ZAF3QVJ4SVANCNFSM4DNJVSVQ>
.
|
I again annotated the images this time using labelImg, the issue still persists.
Here is the error again and the corresponding .xml file for Image7.jpg
|
Better to put Had the same Error |
I was facing the same issue and my fix was : |
I had the same issue and it was because I have deleted jpg image but forgot to delete its annotation. so make sure that images and their annotations are consistent. |
Hi,
I am training a new dataset. However, the training always runs for a few steps and suddenly encounters the following error: "AttributeError: 'NoneType' object has no attribute 'shape'". I think that the annotation format and filename in the Annotation file are correct as the training is able to run for a few steps and am running of ideas on how to troubleshoot further.
Appreciate any ideas or help on this.
Thank you.
The text was updated successfully, but these errors were encountered: