Update README.md
This commit is contained in:
committed by
GitHub
parent
a172492c8f
commit
5f1791032d
@@ -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 <pth-model-fil> <labels-file>
|
||||
```
|
||||
## 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 <network-rt-file> <path-to-video> <kind-of-network> <number-of-classes>
|
||||
```
|
||||
where
|
||||
* ```<network-rt-file>``` is the rt file generated by a test
|
||||
* ```<<path-to-video>``` is the path to a video file or a camera input
|
||||
* ```<kind-of-network>``` is the type of network. Thee types are currently supported: ```y``` (YOLO family), ```c``` (CenterNet family) and ```m``` (MobileNet-SSD family)
|
||||
* ```<number-of-classes>```is the number of classes the network is trained on
|
||||
N.b. By default it is used FP32 inference
|
||||
|
||||

|
||||
## 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 <network-rt-file> <path-to-video> <kind-of-network> <number-of-classes> <output-type>
|
||||
```
|
||||
where
|
||||
* ```<network-rt-file>``` is the rt file generated by a test
|
||||
* ```<<path-to-video>``` is the path to a video file or a camera input
|
||||
* ```<kind-of-network>``` is the type of network. Thee types are currently supported: ```y``` (YOLO family), ```c``` (CenterNet family) and ```m``` (MobileNet-SSD family)
|
||||
* ```<number-of-classes>```is the number of classes the network is trained on
|
||||
N.b. By default it is used FP32 inference
|
||||
* ```<output-type>``` 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.
|
||||
|
||||

|
||||
|
||||
## mAP demo
|
||||
|
||||
To compute mAP, precision, recall and f1score, run the map_demo.
|
||||
|
||||
Reference in New Issue
Block a user