Centernet: evalue the COCO object detection error with DLA

Created on 10 Jul 2019  ·  6Comments  ·  Source: xingyizhou/CenterNet

I think the code has a problem(it might be the image read section)

I check the file path, my server memory and GPU(they are OK)

The result can be seen below

==> initializing coco 2017 val data.
loading annotations into memory...
Done (t=0.38s)
creating index...
index created!
Loaded val 5000 samples
Creating model...
loaded ../models/ctdet_coco_dla_2x.pth, epoch 230

coco_dlaTraceback (most recent call last):
File "/disk1/JasonSung/CenterNet/src/test.py", line 128, in
prefetch_test(opt)
File "/disk1/JasonSung/CenterNet/src/test.py", line 70, in prefetch_test
for ind, (img_id, pre_processed_images) in enumerate(data_loader):
File "/disk1/JasonSung/disk1/envs/CenterNet1/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 336, in __next__
return self._process_next_batch(batch)
File "/disk1/JasonSung/disk1/envs/CenterNet1/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch
raise batch.exc_type(batch.exc_msg)

AttributeError: Traceback (most recent call last):
File "/disk1/JasonSung/disk1/envs/CenterNet1/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/disk1/JasonSung/disk1/envs/CenterNet1/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/disk1/JasonSung/CenterNet/src/test.py", line 42, in __getitem__
images[scale], meta[scale] = self.pre_process_func(image, scale)
File "/disk1/JasonSung/CenterNet/src/lib/detectors/base_detector.py", line 38, in pre_process
height, width = image.shape[0:2]

AttributeError: 'NoneType' object has no attribute 'shape'

You can see the annotation is loaded which means the path is OK, i do the everything that author told us and my devices don't have wrong.

Most helpful comment

I find the problem, it is the file path problem(the test2017 val2017 and train2017 should be put on ../data/coco not in the ../data/coco/images) @xingyizhou

All 6 comments

I find the problem, it is the file path problem(the test2017 val2017 and train2017 should be put on ../data/coco not in the ../data/coco/images) @xingyizhou

AttributeError: 'NoneType' object has no attribute 'shape',
When I train has this error..
can you help me ? @VRCMF

@201814476285951 Your could check my last commit, that is the solution

Yeah.
I think so. we don't need to create the 'images' directory
23333

@VRCMF nblity!Thank you!

I haven't created the 'images' directory , however, I still have the same problem.
Anyone can hlep me?

Was this page helpful?
0 / 5 - 0 ratings