You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I trained a model on a single class (human heads-for object detection), and now when running the testing script I'm having problems with filtering boxes.
The log attached below narrows down the problem to: this line where the region scores are gathered. However, I think it's because of the way sigmoid is used to obtain them in the first place, which works well for many classes but in my one-class detection, it fails .
Do you have any advice on this matter?
Log below:
Traceback (most recent call last):
File "test.py", line 105, in
test(testing_db, args.cfg_file, args.split, args.testiter, args.debug, args.no_flip, args.suffix)
File "test.py", line 67, in test
testing(db, cfg_file , nnet, result_dir, debug=debug, no_flip = no_flip)
File "/home/ubuntu/CPNDet/code/test/coco.py", line 342, in testing
return globals()[system_configs.sampling_function](db, cfg_file, nnet, result_dir, debug=debug, no_flip=no_flip)
File "/home/ubuntu/CPNDet/code/test/coco.py", line 238, in kp_detection
dets = decode_func(nnet, images, K, no_flip, ae_threshold=ae_threshold, kernel=nms_kernel, image_idx = image_idx)
File "/home/ubuntu/CPNDet/code/test/coco.py", line 62, in kp_decode
detections = nnet.test([images], ae_threshold=ae_threshold, K=K, no_flip = no_flip, kernel=kernel, image_idx = image_idx)
File "/home/ubuntu/CPNDet/code/nnet/py_factory.py", line 115, in test
return self.model(*xs, **kwargs)
File "/home/ubuntu/CPNDet/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/ubuntu/CPNDet/code/nnet/py_factory.py", line 33, in forward
return self.module(*xs, **kwargs)
File "/home/ubuntu/CPNDet/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/ubuntu/CPNDet/code/models/py_utils/HG52.py", line 452, in forward
return self._test(*xs, **kwargs)
File "/home/ubuntu/CPNDet/code/models/py_utils/HG52.py", line 433, in _test
_filter_bboxes(ht_boxes, tl_clses, region_scores, grouping_scores, self.gr_threshold)
File "/home/ubuntu/CPNDet/code/models/py_utils/kp_utils.py", line 159, in _filter_bboxes
specific_rscores = region_scores.gather(1, ppos_ht_score_cls[:,1].long()).squeeze()
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)
The text was updated successfully, but these errors were encountered:
Hi,
I trained a model on a single class (human heads-for object detection), and now when running the testing script I'm having problems with filtering boxes.
The log attached below narrows down the problem to: this line where the region scores are gathered. However, I think it's because of the way sigmoid is used to obtain them in the first place, which works well for many classes but in my one-class detection, it fails .
Do you have any advice on this matter?
Log below:
Traceback (most recent call last):
File "test.py", line 105, in
test(testing_db, args.cfg_file, args.split, args.testiter, args.debug, args.no_flip, args.suffix)
File "test.py", line 67, in test
testing(db, cfg_file , nnet, result_dir, debug=debug, no_flip = no_flip)
File "/home/ubuntu/CPNDet/code/test/coco.py", line 342, in testing
return globals()[system_configs.sampling_function](db, cfg_file, nnet, result_dir, debug=debug, no_flip=no_flip)
File "/home/ubuntu/CPNDet/code/test/coco.py", line 238, in kp_detection
dets = decode_func(nnet, images, K, no_flip, ae_threshold=ae_threshold, kernel=nms_kernel, image_idx = image_idx)
File "/home/ubuntu/CPNDet/code/test/coco.py", line 62, in kp_decode
detections = nnet.test([images], ae_threshold=ae_threshold, K=K, no_flip = no_flip, kernel=kernel, image_idx = image_idx)
File "/home/ubuntu/CPNDet/code/nnet/py_factory.py", line 115, in test
return self.model(*xs, **kwargs)
File "/home/ubuntu/CPNDet/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/ubuntu/CPNDet/code/nnet/py_factory.py", line 33, in forward
return self.module(*xs, **kwargs)
File "/home/ubuntu/CPNDet/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/ubuntu/CPNDet/code/models/py_utils/HG52.py", line 452, in forward
return self._test(*xs, **kwargs)
File "/home/ubuntu/CPNDet/code/models/py_utils/HG52.py", line 433, in _test
_filter_bboxes(ht_boxes, tl_clses, region_scores, grouping_scores, self.gr_threshold)
File "/home/ubuntu/CPNDet/code/models/py_utils/kp_utils.py", line 159, in _filter_bboxes
specific_rscores = region_scores.gather(1, ppos_ht_score_cls[:,1].long()).squeeze()
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)
The text was updated successfully, but these errors were encountered: