Detectron: write detection results?

Created on 26 Jan 2018  路  5Comments  路  Source: facebookresearch/Detectron

Hi, Where should I look into if I want to write detection results to a txt file?

Also, why did you choose PDF as default output format?

thank you for your work.

Most helpful comment

I created a simple fork that writes all bounding boxes to a json file, for example.

https://github.com/Mastergalen/Detectron/blob/master/tools/infer_simple.py

All 5 comments

When running on a dataset (i.e. using test_net.py), detections will be written to a pkl file as well as a json file in the COCO API results format. These can be found under cfg.OUTPUT_DIR + '/test/'. The infer_simple.py tool outputs to pdf because it's the preferable format for including visualizations in papers (you can maintain text, masks, and human skeletal "bones", etc. in a vector format). Of course it is trivial to change the format if you prefer something else. If you wish to output to a text format of your design, you will need to read around the code a bit to understand how things are stored internally, but it's not hard to figure out. You may start with the visualization code as a pointer.

I created a simple fork that writes all bounding boxes to a json file, for example.

https://github.com/Mastergalen/Detectron/blob/master/tools/infer_simple.py

may be somebody know how to change infer_simple.py for output format wiil be jpg?

@EgorAntonovich in vis.py script in ../detectron/lib/utils change output_name in def vis_one_image() by removing the extension at the end.

good

Was this page helpful?
0 / 5 - 0 ratings