GithubHelp home page GithubHelp logo

zerocodepro / detvisgui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chien-hung/detvisgui

0.0 0.0 0.0 21.91 MB

This is a GUI for easily visualizing detection results .

License: MIT License

Python 100.00%

detvisgui's Introduction

DetVisGUI

UPDATE

2021/04/17 : Add save all images function.

2021/01/05 : Support json format for det_file.

2020/12/08 : Support inference model and directly show the results on GUI.


Introuction

This is a lightweight GUI for visualizing the mmdetection results. It could display detection results with different threshold dynamically, and would be convenient for verifying detection results and groundtruth.

alt tag

Video with text description : https://www.youtube.com/watch?v=4imQyECTik0 (The command in the video is for the master branch. Please reference the following example.)

Dependencies

-- mmdetection -- tqdm

Code

Clone this repository.

git clone -b mmdetection https://github.com/Chien-Hung/DetVisGUI.git
cd DetVisGUI

Demo

I sample a small part of COCO and VOC2007 dataset, running mmdetection for getting detection result(*.pkl) and use these files for demo.

python DetVisGUI.py ${CONFIG_FILE} [--det_file ${RESULT_FILE}] [--stage ${STAGE}] [--output ${SAVE_DIRECTORY}]

Arguments:

  • CONFIG_FILE: Config file of mmdetction.

Optional Arguments:

  • RESULT_FILE: Filename of the output results in pickle / json format.
  • STAGE: The stage [train / val / test] of the result file, default is 'val'.
  • SAVE_DIRECTORY: The directory for saving display images, default is 'output'.

Display the validation results of COCO segmentation:

$ python DetVisGUI.py configs/mask_rcnn_r50_fpn_1x.py --det_file results/mask_rcnn_r50_fpn_1x/val_results.pkl

Display the test results of COCO segmentation(no groundtruth):

$ python DetVisGUI.py configs/mask_rcnn_r50_fpn_1x.py --det_file results/mask_rcnn_r50_fpn_1x/test_results.pkl --stage test

Display the validation results of COCO detection:

$ python DetVisGUI.py configs/cascade_rcnn_r50_fpn_1x.py --det_file results/cascade_rcnn_r50_c4_1x/val_results.pkl

Display the test results of COCO detection(no groundtruth):

$ python DetVisGUI.py configs/cascade_rcnn_r50_fpn_1x.py --det_file results/cascade_rcnn_r50_c4_1x/test_results.pkl --stage test

Display the test results of Pascal VOC(no groundtruth):

$ python DetVisGUI.py configs/ssd512_voc.py --det_file results/ssd512_voc/test_results.pkl --stage test

Display the validation results of COCO segmentation by json output file:

$ python DetVisGUI.py configs/mask_rcnn_r50_fpn_1x.py --det_file results/mask_rcnn_r50_fpn_1x/val_results.segm.json

Display the validation results of COCO detection by json output file:

$ python DetVisGUI.py configs/mask_rcnn_r50_fpn_1x.py --det_file results/mask_rcnn_r50_fpn_1x/val_results.bbox.json

Display the COCO bounding box groundtruth:

$ python DetVisGUI.py configs/mask_rcnn_r50_fpn_1x.py

Directly Inference model on GUI

If you want to inference model and directly show the results on GUI, please run the following command. For running the example, you need to download faster_rcnn_r50_fpn_1x_coco / mask_rcnn_r50_fpn_1x_coco checkpoints from mmdetection (the configs is prepared in this repo), and place checkpoints in the DetVisGUI folder.

python DetVisGUI_test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} ${TEST_IMAGES_FOLDER} [--device ${DEVICE}]

Arguments:

  • CONFIG_FILE: Config file of mmdetction.
  • CHECKPOINT_FILE: Trained model checkpoint.
  • TEST_IMAGES_FOLDER: Test images folder path.

Optional Arguments:

  • DEVICE: cpu or cuda, default is cuda.

Display the faster rcnn results:

$ python DetVisGUI_test.py configs/faster_rcnn_r50_fpn_1x_coco.py ./faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth data/test_images

Display the mask rcnn results:

$ python DetVisGUI_test.py configs/mask_rcnn_r50_fpn_1x_coco.py ./mask_rcnn_r50_fpn_1x_coco_20200205-d4b0c5d6.pth data/test_images

Hotkeys

KEY ACTION
↑ , ↓ change image.
← , → change score threshold.
ctrl + ← , → change IoU threshold.
s save displayed image in output folder.
q colse this GUI.

result(.pkl) format

alt tag

detvisgui's People

Contributors

chien-hung avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.