facebookresearch / maskrcnn-benchmark

Fast, modular reference implementation of Instance Segmentation and Object Detection algorithms in PyTorch.
MIT License
9.29k stars 2.5k forks source link

ValueError: Buffer dtype mismatch, expected 'uint8_t' but got 'int' #1201

Open MaYiLong1998 opened 4 years ago

MaYiLong1998 commented 4 years ago

❓ Questions and Help

When I execute python3 tools/test_net.py --config-file configs/e2e_mask_rcnn_R_101_FPN_1x.yaml

Traceback (most recent call last): File "tools/test_net.py", line 114, in main() File "tools/test_net.py", line 108, in main output_folder=output_folder, File "/home/qian/mayilong/maskrcnn-benchmark/maskrcnn_benchmark/engine/inference.py", line 120, in inference extra_args) File "/home/qian/mayilong/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/evaluation/init.py", line 22, in evaluate return coco_evaluation(args) File "/home/qian/mayilong/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/evaluation/coco/init.py", line 23, in coco_evaluation expected_results_sigma_tol=expected_results_sigma_tol, File "/home/qian/mayilong/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/evaluation/coco/coco_eval.py", line 47, in do_coco_evaluation coco_results["segm"] = prepare_for_coco_segmentation(predictions, dataset) File "/home/qian/mayilong/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/evaluation/coco/coco_eval.py", line 137, in prepare_for_coco_segmentation for mask in masks File "/home/qian/mayilong/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/evaluation/coco/coco_eval.py", line 137, in for mask in masks File "/home/qian/anaconda3/lib/python3.6/site-packages/pycocotools-2.0-py3.6-linux-x86_64.egg/pycocotools/mask.py", line 82, in encode return _mask.encode(bimask) File "pycocotools/_mask.pyx", line 137, in pycocotools._mask.encode ValueError: Buffer dtype mismatch, expected 'uint8_t' but got 'int'

Traceback (most recent call last): File "tools/test_net.py", line 114, in main() File "tools/test_net.py", line 108, in main output_folder=output_folder, File "/home/qian/mayilong/maskrcnn-benchmark/maskrcnn_benchmark/engine/inference.py", line 120, in inference extra_args) File "/home/qian/mayilong/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/evaluation/init.py", line 22, in evaluate return coco_evaluation(args) File "/home/qian/mayilong/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/evaluation/coco/init.py", line 23, in coco_evaluation expected_results_sigma_tol=expected_results_sigma_tol, File "/home/qian/mayilong/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/evaluation/coco/coco_eval.py", line 47, in do_coco_evaluation coco_results["segm"] = prepare_for_coco_segmentation(predictions, dataset) File "/home/qian/mayilong/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/evaluation/coco/coco_eval.py", line 137, in prepare_for_coco_segmentation for mask in masks File "/home/qian/mayilong/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/evaluation/coco/coco_eval.py", line 137, in for mask in masks File "/home/qian/anaconda3/lib/python3.6/site-packages/pycocotools-2.0-py3.6-linux-x86_64.egg/pycocotools/mask.py", line 82, in encode return _mask.encode(bimask) File "pycocotools/_mask.pyx", line 137, in pycocotools._mask.encode ValueError: Buffer dtype mismatch, expected 'uint8_t' but got 'int'

I don't know what caused this error, I need some help.

jefferywu19 commented 4 years ago

I got the same error. Do you figure that out?