chengchunhsu / EveryPixelMatters

Implementation of ECCV 2020 paper "Every Pixel Matters: Center-aware Feature Alignment for Domain Adaptive Object Detector"
Other
164 stars 21 forks source link

ValueError: bbox should have 2 dimensions, got 1 #3

Closed mamunir closed 3 years ago

mamunir commented 4 years ago

After loading model log contains information below. Can you please see what's the query? It was running on actual dataset, but on custom data, it is producing this error. Thanks

loading annotations into memory... Done (t=0.20s) creating index... index created! 2020-09-26 17:28:51,585 fcos_core.trainer INFO: Start training Traceback (most recent call last): File "tools/train_net_da.py", line 480, in main() File "tools/train_net_da.py", line 469, in main model = train(cfg, args.local_rank, args.distributed) File "tools/train_net_da.py", line 361, in train arguments, File "/home/akhtar/EveryPixelMatters/fcos_core/engine/trainer.py", line 128, in do_train in enumerate(zip(data_loader_source, data_loader_target), start_iter): File "/home/akhtar/epmatters/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 819, in next return self._process_data(data) File "/home/akhtar/epmatters/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 846, in _process_data data.reraise() File "/home/akhtar/epmatters/lib/python3.7/site-packages/torch/_utils.py", line 385, in reraise raise self.exc_type(msg) ValueError: Caught ValueError in DataLoader worker process 2. Original Traceback (most recent call last): File "/home/akhtar/epmatters/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "/home/akhtar/epmatters/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/akhtar/epmatters/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/akhtar/EveryPixelMatters/fcos_core/data/datasets/sim10k.py", line 46, in getitem target = self.get_groundtruth(index) File "/home/akhtar/EveryPixelMatters/fcos_core/data/datasets/sim10k.py", line 65, in get_groundtruth target = BoxList(anno["boxes"], (width, height), mode="xyxy") File "/home/akhtar/EveryPixelMatters/fcos_core/structures/bounding_box.py", line 27, in init "bbox should have 2 dimensions, got {}".format(bbox.ndimension()) ValueError: bbox should have 2 dimensions, got 1

I HAVE CHECKED SEVERAL TIMES THAT THERE IS NO EMPTY ANNOTATIONS

mamunir commented 3 years ago

I rectify the error. It was a category mismatch in some files. Thanks