diff --git a/README.md b/README.md index 7f1016d..576a0f1 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,10 @@ M. Verucchi, L. Bartoli, F. Bagni, F. Gatti, P. Burgio and M. Bertogna, "Real-Ti - [2)Export weights for DLA34 and ResNet101](#2export-weights-for-dla34-and-resnet101) - [3)Export weights for CenterNet](#3export-weights-for-centernet) - [4)Export weights for MobileNetSSD](#4export-weights-for-mobilenetssd) - - [Run the demo](#run-the-demo) + - [How to convert weights](#how-to-convert-weights) - [FP16 inference](#fp16-inference) - [INT8 inference](#int8-inference) + - [Run the demo](#run-the-demo) - [mAP demo](#map-demo) - [Existing tests and supported networks](#existing-tests-and-supported-networks) - [References](#references) @@ -113,26 +114,8 @@ cd pytorch-ssd conda env create -f env_mobv2ssd.yml python run_ssd_live_demo.py mb2-ssd-lite ``` -## Run the demo -To run the an object detection demo follow these steps (example with yolov3): -``` -rm yolo3_fp32.rt # be sure to delete(or move) old tensorRT files -./test_yolo3 # run the yolo test (is slow) -./demo yolo3_fp32.rt ../demo/yolo_test.mp4 y -``` -In general the demo program takes 4 parameters: -``` -./demo -``` -where -* `````` is the rt file generated by a test -* ```<``` is the path to a video file or a camera input -* `````` is the type of network. Thee types are currently supported: ```y``` (YOLO family), ```c``` (CenterNet family) and ```m``` (MobileNet-SSD family) -* ``````is the number of classes the network is trained on -N.b. By default it is used FP32 inference - -![demo](https://user-images.githubusercontent.com/11562617/72547657-540e7800-388d-11ea-83c6-49dfea2a0607.gif) +## How to convert weights ### FP16 inference @@ -187,6 +170,29 @@ rm yolo3_fp32.rt # be sure to delete(or move) old tensorRT fil ./test_rtinference yolo3_fp32.rt 4 # test with a batch size of 4 ``` +## Run the demo + +To run the an object detection demo follow these steps (example with yolov3): +``` +rm yolo3_fp32.rt # be sure to delete(or move) old tensorRT files +./test_yolo3 # run the yolo test (is slow) +./demo yolo3_fp32.rt ../demo/yolo_test.mp4 y # add parameter y for yolo. c for CNET & m for Mobilenet. +./demo yolo3_fp32.rt ../demo/yolo_test.mp4 y 1 #if number of classes not 80. Add class number parameter. +``` +In general the demo program takes 5 parameters: +``` +./demo +``` +where +* `````` is the rt file generated by a test +* ```<``` is the path to a video file or a camera input +* `````` is the type of network. Thee types are currently supported: ```y``` (YOLO family), ```c``` (CenterNet family) and ```m``` (MobileNet-SSD family) +* ``````is the number of classes the network is trained on +N.b. By default it is used FP32 inference +* `````` benchmark or save_result. Adding benchmark will not show opencv detection video allowing demo to be run from command line and providing performance results without showing the video results. Adding save_result will save output of detection to results.mp4. + +![demo](https://user-images.githubusercontent.com/11562617/72547657-540e7800-388d-11ea-83c6-49dfea2a0607.gif) + ## mAP demo To compute mAP, precision, recall and f1score, run the map_demo.