few-shot-object-detection icon indicating copy to clipboard operation
few-shot-object-detection copied to clipboard

TypeError: '>' not supported between instances of 'NoneType' and 'int'

Open Fyzde opened this issue 1 year ago • 2 comments

when i run "python tools/train_net.py --num-gpus 1
--config-file configs/PascalVOC-detection/split1/faster_rcnn_R_101_base1.yaml"

TypeError: '>' not supported between instances of 'NoneType' and 'int'

Fyzde avatar Sep 25 '23 04:09 Fyzde

Traceback (most recent call last): File "/home/fyz/anaconda3/envs/pytorch1.13.1/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/fyz/anaconda3/envs/pytorch1.13.1/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/fyz/few-shot-object-detection/tools/train_net.py", line 113, in launch( File "/home/fyz/tools/detectron2/detectron2/engine/launch.py", line 84, in launch main_func(*args) File "/home/fyz/few-shot-object-detection/tools/train_net.py", line 105, in main trainer = Trainer(cfg) File "/home/fyz/few-shot-object-detection/fsdet/engine/defaults.py", line 305, in init data_loader = self.build_train_loader(cfg) File "/home/fyz/few-shot-object-detection/fsdet/engine/defaults.py", line 496, in build_train_loader return build_detection_train_loader(cfg) File "/home/fyz/tools/detectron2/detectron2/config/config.py", line 208, in wrapped return orig_func(**explicit_args) File "/home/fyz/tools/detectron2/detectron2/data/build.py", line 549, in build_detection_train_loader return build_batch_data_loader( File "/home/fyz/tools/detectron2/detectron2/data/build.py", line 339, in build_batch_data_loader data_loader = torchdata.DataLoader( File "/home/fyz/anaconda3/envs/pytorch1.13.1/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 243, in init assert prefetch_factor > 0 TypeError: '>' not supported between instances of 'NoneType' and 'int'

Fyzde avatar Sep 25 '23 07:09 Fyzde

Hii, Check your dataset and ensure that the necessary data, such as annotations or labels, is present and correctly formatted. If data is missing or improperly labeled, it can lead to None values in critical places.

pinnintipraneethkumar avatar Dec 25 '23 07:12 pinnintipraneethkumar