mahyarnajibi / SNIPER

SNIPER / AutoFocus is an efficient multi-scale object detection training / inference algorithm
Other
2.69k stars 450 forks source link

custom dataset train error #118

Open wonnjae opened 5 years ago

wonnjae commented 5 years ago

Hi. I've tried demo image and found out that this SNIPER works very well. I want to train this model with my own dataset. Before trying, I wanted to check whether this training process works ok and I made a small datasets consists of 5 same images named, a1.jpg, a2.jpg, a3.jpg, a4.jpg, a5.jpg And set annotation file as below which is in the same format to that of COCO. However, error occurs when I run python main_train.py #################### /home/wonjae/SNIPER/configs/faster/default_configs.py:171: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. exp_config = edict(yaml.load(f)) loading annotations into memory... Done (t=0.00s) creating index... index created! num_images 5 COCO_train2014 gt roidb loaded from ./data/cache/COCO_train2014_gt_roidb.pkl append flipped images to roidb loading annotations into memory... Done (t=0.00s) creating index... index created! num_images 5 COCO_val2014 gt roidb loaded from ./data/cache/COCO_val2014_gt_roidb.pkl append flipped images to roidb filtered 2138 roidb entries: 246574 -> 244436 add bounding box regression targets bbox target means: [[0. 0. 0. 0.] [0. 0. 0. 0.]] [0. 0. 0. 0.] bbox target stdevs: [[0.1 0.1 0.2 0.2] [0.1 0.1 0.2 0.2]] [0.1 0.1 0.2 0.2] Creating Iterator with 244436 Images Total number of extracted chips: 955682 Done! Traceback (most recent call last): File "main_train.py", line 82, in threads=config.TRAIN.NUM_THREAD, pad_rois_to=400) File "lib/iterators/MNIteratorE2E.py", line 36, in init super(MNIteratorE2E, self).init(roidb, config, batch_size, threads, nGPUs, pad_rois_to, False) File "lib/iterators/MNIteratorBase.py", line 33, in init self.get_batch() File "lib/iterators/MNIteratorE2E.py", line 105, in get_batch self.batch = self._get_batch() File "lib/iterators/MNIteratorE2E.py", line 193, in _get_batch processed_list = processed_list.get() File "/home/wonjae/anacondas/envs/py27/lib/python2.7/multiprocessing/pool.py", line 572, in get raise self._value TypeError: 'NoneType' object has no attribute 'getitem'

###################### It seems that there are many others suffering from same problem. I've tried the posted replies but it does not worksTT. If anyone succeded in running his/her own datasets, can you please send the annotation file so that I can check out whether I am setting the annotation file right? By the way, I've tried number of process/ number of thread to 8,4 but it did not work. I will be looking forward for your reply.

fzp8656342 commented 5 years ago

Hi, have you solved this issue? I have encounter the same problem.

ddt2014 commented 5 years ago

me too, the exactly same with you

fzp8656342 commented 5 years ago

Have you tried train with coco or voc dataset?

On Wed, May 15, 2019 at 18:50 ddt2014 notifications@github.com wrote:

me too, the exactly same with you

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mahyarnajibi/SNIPER/issues/118?email_source=notifications&email_token=AGJ4ZABGAGKXMZOQBABBEWTPVPTFXA5CNFSM4HE23BP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVOI45I#issuecomment-492605045, or mute the thread https://github.com/notifications/unsubscribe-auth/AGJ4ZAEEWEEGM3WIN435FWLPVPTFXANCNFSM4HE23BPQ .