Skip to content
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

Train error #13

Open
fengzifrank opened this issue Apr 22, 2019 · 9 comments
Open

Train error #13

fengzifrank opened this issue Apr 22, 2019 · 9 comments

Comments

@fengzifrank
Copy link

An error occurred during training Can you show your dataset tree directory? Thank you (the following is my structure according to the document)
---CornerNet-Lite
------data
----------coco
---------------images
---------------------trainval2014
---------------------------------train2014.zip
---------------------minival2014
---------------------------------val2014.zip
---------------------testdev2017
---------------------------------test2017.zip

run python train.py CornerNet_Saccade --workers=1

File "train.py", line 55, in prefetch_data
data, ind = sample_data(system_config, db, ind, data_aug=data_aug)
File "/test/CornerNet-Lite/core/sample/init.py", line 5, in data_sampling_func
return globals()[sys_configs.sampling_function](sys_configs, db, k_ind, data_aug, debug)
File "/test/CornerNet-Lite/core/sample/cornernet_saccade.py", line 169, in cornernet_saccade
border = [0, image.shape[0], 0, image.shape[1]]
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-1:
Traceback (most recent call last):
File "/opt/conda/envs/CornerNet_Lite/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/opt/conda/envs/CornerNet_Lite/lib/python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "train.py", line 59, in prefetch_data
raise e
File "train.py", line 55, in prefetch_data
data, ind = sample_data(system_config, db, ind, data_aug=data_aug)
File "/test/CornerNet-Lite/core/sample/init.py", line 5, in data_sampling_func
return globals()[sys_configs.sampling_function](sys_configs, db, k_ind, data_aug, debug)
File "/test/CornerNet-Lite/core/sample/cornernet_saccade.py", line 169, in cornernet_saccade
border = [0, image.shape[0], 0, image.shape[1]]
AttributeError: 'NoneType' object has no attribute 'shape'
setting learning rate to: 0.00025
training start...
start prefetching data...
shuffling indices...
Traceback (most recent call last):
File "train.py", line 55, in prefetch_data
data, ind = sample_data(system_config, db, ind, data_aug=data_aug)
File "/test/CornerNet-Lite/core/sample/init.py", line 5, in data_sampling_func
return globals()[sys_configs.sampling_function](sys_configs, db, k_ind, data_aug, debug)
File "/test/CornerNet-Lite/core/sample/cornernet_saccade.py", line 169, in cornernet_saccade
border = [0, image.shape[0], 0, image.shape[1]]
AttributeError: 'NoneType' object has no attribute 'shape'
Process Process-2:
Traceback (most recent call last):
File "/opt/conda/envs/CornerNet_Lite/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/opt/conda/envs/CornerNet_Lite/lib/python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "train.py", line 59, in prefetch_data
raise e
File "train.py", line 55, in prefetch_data
data, ind = sample_data(system_config, db, ind, data_aug=data_aug)
File "/test/CornerNet-Lite/core/sample/init.py", line 5, in data_sampling_func
return globals()[sys_configs.sampling_function](sys_configs, db, k_ind, data_aug, debug)
File "/test/CornerNet-Lite/core/sample/cornernet_saccade.py", line 169, in cornernet_saccade
border = [0, image.shape[0], 0, image.shape[1]]
AttributeError: 'NoneType' object has no attribute 'shape'

@ybai62868
Copy link

Not *.zip but *.jpg. And you also need create a folder named annotations which should contains instance_train/val{}.json for your training and testing in the coco dir.

@cwjhx
Copy link

cwjhx commented Apr 25, 2019

the following is my structure according to the document
+CornerNet-Lite
+data
+coco
+images
+trainval2014
+ *.jpg
+minival2014
+ *.jpg
+testdev2017
+ *.jpg
+annotations
-instances_trainval2014.json
-instances_minival2014.json
-instances_testdev2017.json
but I met the same problem.

@yangkai12
Copy link

i met the same issue,how to solve it? thanks

@ybai62868
Copy link

The reason why you meet this issue is that your model can't read the image successful. So carefully check the xxx.py in core/dbs. The original repo has no bug with that problem and I also successfully train the CornerNet-Lite on my own dataset. The only drawback is that the training speed is so slow :<

@shengmingkai
Copy link

i met the same issue,how to solve it? thanks

do you hava solve it? i met the same issue.my structure is like yours.

@SeeeeShiwei
Copy link

do you hava solve it?

@qutrino
Copy link

qutrino commented May 13, 2019

I had the same problem, and found the workaround of it.

  • trainval2014 <- jpgs from train2014.zip + val2014.zip
  • minival2014 <- jpgs from val2014.zip
  • testdev2017 <- jpgs from test2017.zip

@WIll-Xu35
Copy link

Hi all, I met the same problem here. I only modified the gpu number and the rest of the codes are not touched.

It seems that the code is combining wrong pairs of directory and image image. For example, combining test directory with val image name, resulting in a wrong image file path.

@ZCDu
Copy link

ZCDu commented Jun 3, 2019

I need help.I also meet this problem. Trying all the suggestions above,I can not get the true. ''NoneType' object has no attribute 'shape'' is being here whatever i do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants