loading coco data, 48 imgs without annos are removed
0413 10:50:27 PM ----- Pretrained: Load model state from ./configs/detr_resnet50
0413 10:50:27 PM ----- Start Validating
/home/wsx/anaconda3/lib/python3.6/site-packages/pycocotools/cocoeval.py:507: DeprecationWarning: object of type <class 'numpy.float64'> cannot be safely interpreted as an integer.
self.iouThrs = np.linspace(.5, 0.95, np.round((0.95 - .5) / .05) + 1, endpoint=True)
/home/wsx/anaconda3/lib/python3.6/site-packages/pycocotools/cocoeval.py:508: DeprecationWarning: object of type <class 'numpy.float64'> cannot be safely interpreted as an integer.
self.recThrs = np.linspace(.0, 1.00, np.round((1.00 - .0) / .01) + 1, endpoint=True)
/home/wsx/anaconda3/lib/python3.6/site-packages/paddle/fluid/dygraph/math_op_patch.py:253: UserWarning: The dtype of left and right variables are not the same, left dtype is paddle.float32, but right dtype is paddle.bool, the right dtype will convert to paddle.float32
format(lhs_dtype, rhs_dtype, lhs_dtype))
Traceback (most recent call last):
File "main_single_gpu.py", line 413, in <module>
main()
File "main_single_gpu.py", line 355, in main
debug_steps=config.REPORT_FREQ)
File "main_single_gpu.py", line 219, in validate
coco_evaluator.update(res)
File "/home/wsx/0A_DATA/DETR/coco_eval.py", line 34, in update
coco_dt = COCO.loadRes(self.coco_gt, results) if results else COCO()
File "/home/wsx/anaconda3/lib/python3.6/site-packages/pycocotools/coco.py", line 308, in loadRes
if type(resFile) == str or type(resFile) == unicode:
NameError: name 'unicode' is not defined
Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/wsx/anaconda3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/wsx/anaconda3/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/wsx/anaconda3/lib/python3.6/site-packages/paddle/fluid/dataloader/dataloader_iter.py", line 213, in _thread_loop
self._thread_done_event)
File "/home/wsx/anaconda3/lib/python3.6/site-packages/paddle/fluid/dataloader/fetcher.py", line 121, in fetch
data.append(self.dataset[idx])
File "/home/wsx/0A_DATA/DETR/coco.py", line 92, in __getitem__
image, target = self._transforms(image, target)
File "/home/wsx/0A_DATA/DETR/transforms.py", line 349, in __call__
image, target = t(image, target)
File "/home/wsx/0A_DATA/DETR/transforms.py", line 349, in __call__
image, target = t(image, target)
File "/home/wsx/0A_DATA/DETR/transforms.py", line 304, in __call__
return T.to_tensor(image), target
File "/home/wsx/anaconda3/lib/python3.6/site-packages/paddle/vision/transforms/functional.py", line 82, in to_tensor
return F_pil.to_tensor(pic, data_format)
File "/home/wsx/anaconda3/lib/python3.6/site-packages/paddle/vision/transforms/functional_pil.py", line 77, in to_tensor
img = paddle.to_tensor(np.array(pic, copy=False))
File "<decorator-gen-134>", line 2, in to_tensor
File "/home/wsx/anaconda3/lib/python3.6/site-packages/paddle/fluid/wrapped_decorator.py", line 25, in __impl__
return wrapped_func(*args, **kwargs)
File "/home/wsx/anaconda3/lib/python3.6/site-packages/paddle/fluid/framework.py", line 228, in __impl__
), "We only support '%s()' in dynamic graph mode, please call 'paddle.disable_static()' to enter dynamic graph mode." % func.__name__
AssertionError: We only support 'to_tensor()' in dynamic graph mode, please call 'paddle.disable_static()' to enter dynamic graph mode.