CenterNet icon indicating copy to clipboard operation
CenterNet copied to clipboard

python train.py

Open wudi00 opened this issue 6 years ago • 18 comments

when I use python train.py CenterNet-104 to train the model, there is such error Traceback (most recent call last): File "train.py", line 43, in prefetch_data data, ind = sample_data(db, ind, data_aug=data_aug) File "/media/disk/wudi/CenterNet/sample/coco.py", line 200, in sample_data return globals()[system_configs.sampling_function](db, k_ind, data_aug, debug) File "/media/disk/wudi/CenterNet/sample/coco.py", line 100, in kp_detection image, detections = random_crop(image, detections, rand_scales, input_size, border=border) File "/media/disk/wudi/CenterNet/sample/utils.py", line 57, in random_crop image_height, image_width = image.shape[0:2] AttributeError: 'NoneType' object has no attribute 'shape' whe does the error happen? how to avoid this error? Thanks

wudi00 avatar May 15 '19 05:05 wudi00

@wudi00 Hi, I think your trainval2014 dataset may not contain the 35k images in val2014.zip. The trainval2014 dataset consists of all images in train2014.zip and 35k images in val2014.zip for training. You can copy all images in val2014.zip to train2014 and rename it as trainval2014.

Duankaiwen avatar May 15 '19 07:05 Duankaiwen

@Duankaiwen Hi, I want to train my dataset, and where shouled I modify in the code?

wudi00 avatar May 22 '19 13:05 wudi00

hi,i have the same problem。 how do you solve it?

nuist-xinyu avatar May 30 '19 01:05 nuist-xinyu

@nuist-xinyu The solution follows the answers given by the author above.

wudi00 avatar May 30 '19 02:05 wudi00

is your download the trainval2014 and val2014 from author given?

nuist-xinyu avatar May 30 '19 05:05 nuist-xinyu

What is the version of your cuda?

nuist-xinyu avatar May 31 '19 11:05 nuist-xinyu

Yes, I download the trainval2014 and val2014 according to the readme. I use cuda 10.0

wudi00 avatar May 31 '19 11:05 wudi00

I have the same problem with you. but whatever i choose cuda9 or 10 ,still don‘t training

nuist-xinyu avatar May 31 '19 11:05 nuist-xinyu

Check the file path again, The trainval2014 dataset consists of all images in train2014.zip and 35k images in val2014.zip for training.

wudi00 avatar May 31 '19 11:05 wudi00

I downloaded the training set and validation set from the address given by the author and merged them together. Can you tell me how big your training set is?

nuist-xinyu avatar May 31 '19 11:05 nuist-xinyu

123,287 项,共 20.1 GB this is mine

nuist-xinyu avatar May 31 '19 11:05 nuist-xinyu

You can copy all images in val2014.zip to train2014 and rename it as trainval2014.

wudi00 avatar May 31 '19 11:05 wudi00

Friends, do you mind giving me your training set?

nuist-xinyu avatar May 31 '19 12:05 nuist-xinyu

I just copied the image in the verification set directly to the training set.

nuist-xinyu avatar May 31 '19 12:05 nuist-xinyu

sorry, my data is not in my computer. copy all images in val2014.zip to train2014 and rename it as trainval2014.

wudi00 avatar May 31 '19 12:05 wudi00

ok thank you

nuist-xinyu avatar May 31 '19 12:05 nuist-xinyu

What version of graphics card do you use?

nuist-xinyu avatar Jun 01 '19 12:06 nuist-xinyu

@wudi00 Hi, I think your trainval2014 dataset may not contain the 35k images in val2014.zip. The trainval2014 dataset consists of all images in train2014.zip and 35k images in val2014.zip for training. You can copy all images in val2014.zip to train2014 and rename it as trainval2014.

i do this but still i get this error.how can i solve it?

frvmsv avatar Oct 09 '19 11:10 frvmsv