Update README.md
Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
This commit is contained in:
@@ -101,10 +101,9 @@ python run_ssd_live_demo.py mb2-ssd-lite <pth-model-fil> <labels-file>
|
||||
|
||||
To run the an object detection demo follow these steps (example with yolov3):
|
||||
```
|
||||
export TKDNN_MODE=FP16 # set the half floating point optimization
|
||||
rm yolo3.rt # be sure to delete(or move) old tensorRT files
|
||||
rm yolo3_FP32.rt # be sure to delete(or move) old tensorRT files
|
||||
./test_yolo3 # run the yolo test (is slow)
|
||||
./demo yolo3.rt ../demo/yolo_test.mp4 y
|
||||
./demo yolo3_FP32.rt ../demo/yolo_test.mp4 y
|
||||
```
|
||||
In general the demo program takes 3 parameters:
|
||||
```
|
||||
@@ -114,11 +113,42 @@ 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)
|
||||
N.b. Using FP16 inference will lead to some errors in the results (first or second decimal).
|
||||
N.b. By default it is used FP32 inference
|
||||
|
||||

|
||||
|
||||
### FP16 inference
|
||||
|
||||
To run the an object detection demo with FP16 inference follow these steps (example with yolov3):
|
||||
```
|
||||
export TKDNN_MODE=FP16 # set the half floating point optimization
|
||||
rm yolo3_FP16.rt # be sure to delete(or move) old tensorRT files
|
||||
./test_yolo3 # run the yolo test (is slow)
|
||||
./demo yolo3_FP16.rt ../demo/yolo_test.mp4 y
|
||||
```
|
||||
N.b. Using FP16 inference will lead to some errors in the results (first or second decimal).
|
||||
|
||||
### INT8 inference
|
||||
|
||||
To run the an object detection demo with INT8 inference follow these steps (example with yolov3):
|
||||
```
|
||||
export TKDNN_MODE=INT8 # set the 8-bit integer optimization
|
||||
|
||||
# image_list.txt contains the list of the absolute paths to the calibration images
|
||||
export TKDNN_CALIB_IMG_PATH=/path/to/calibration/image_list.txt
|
||||
|
||||
# label_list.txt contains the list of the absolute paths to the calibration labels
|
||||
export TKDNN_CALIB_LABEL_PATH=/path/to/calibration/label_list.txt
|
||||
rm yolo3_INT8.rt # be sure to delete(or move) old tensorRT files
|
||||
./test_yolo3 # run the yolo test (is slow)
|
||||
./demo yolo3_INT8.rt ../demo/yolo_test.mp4 y
|
||||
```
|
||||
N.b. Using INT8 inference will lead to some errors in the results (first or second decimal).
|
||||
|
||||
N.b. The network test script is very slow: it call the INT8 calibrator.
|
||||
|
||||
## mAP demo
|
||||
|
||||
To compute mAP, precision, recall and f1score, run the map_demo.
|
||||
|
||||
A validation set is needed. To download COCO_val2017 run (form the root folder):
|
||||
@@ -139,7 +169,7 @@ Example:
|
||||
|
||||
```
|
||||
cd build
|
||||
./map_demo dla34_cnet.rt c ../demo/COCO_val2017/all_labels.txt ../demo/config.yaml
|
||||
./map_demo dla34_cnet_FP32.rt c ../demo/COCO_val2017/all_labels.txt ../demo/config.yaml
|
||||
```
|
||||
|
||||
## Existing tests and supported networks
|
||||
|
||||
Reference in New Issue
Block a user