facebookresearch / Detectron

FAIR's research platform for object detection research, implementing popular algorithms like Mask R-CNN and RetinaNet.
Apache License 2.0
26.22k stars 5.45k forks source link

Extracting output image from pickle - Coco model inference #912

Closed benkmoore closed 5 years ago

benkmoore commented 5 years ago

How do I produce images from the pickle file produced when I run;

python2.7 test_net.py --cfg e2e_mask_rcnn_R-101-FPN_2x.yaml TEST. WEIGHTS https://dl.fbaipublicfiles.com/detectron/35861858/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_2x.yaml.02_32_51.SgT4y1cO/output/train/coco_2014_train:coco_2014_valminusminival/generalized_rcnn/model_final.pkl NUM_GPUS 1

I cant interpret the chunk of data produced

Detailed steps to reproduce

`import pickle

pkl_file = open('detection_range_1_5.pkl',encoding='iso-8859-1') images = pickle.load(pkl_file) print(images) pkl_file.close()`

System information

Any help would be great, thanks

benkmoore commented 5 years ago

Solved: Used your visualize_results.py file

Example

python2.7 visualize_results.py --detections detection_range_0_10.pkl --first 5