Skip to content

Commit 0ff4401

Browse files
committed
update README.md
1 parent 616a7d0 commit 0ff4401

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,16 @@ If you want to run yolov3 or yolov3-tiny change ``--model yolov3`` in command
4646
python save_model.py --weights ./data/yolov4.weights --output ./checkpoints/yolov4-416 --input_size 416 --model yolov4 --framework tflite
4747

4848
# yolov4
49-
python convert_tflite.py --weights ./checkpoints/yolov4-416 --output ./data/yolov3-416.tflite
49+
python convert_tflite.py --weights ./checkpoints/yolov4-416 --output ./checkpoints/yolov4-416.tflite
5050

5151
# yolov4 quantize float16
52-
python convert_tflite.py --weights ./checkpoints/yolov4-416 --output ./data/yolov4-416-fp16.tflite --quantize_mode float16
52+
python convert_tflite.py --weights ./checkpoints/yolov4-416 --output ./checkpoints/yolov4-416-fp16.tflite --quantize_mode float16
5353

5454
# yolov4 quantize int8
55-
python convert_tflite.py --weights ./checkpoints/yolov4-416 --output ./data/yolov4-416-int8.tflite --quantize_mode int8 --dataset ./coco_dataset/coco/val207.txt
55+
python convert_tflite.py --weights ./checkpoints/yolov4-416 --output ./checkpoints/yolov4-416-int8.tflite --quantize_mode int8 --dataset ./coco_dataset/coco/val207.txt
56+
57+
# Run demo tflite model
58+
python detect.py --weights ./checkpoints/yolov4-416.tflite --size 416 --model yolov4 --image ./data/kite.jpg --framework tflite
5659
```
5760
Yolov4 and Yolov4-tiny int8 quantization have some issues. I will try to fix that. You can try Yolov3 and Yolov3-tiny int8 quantization
5861
### Convert to TensorRT

detect.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
from tensorflow.compat.v1 import InteractiveSession
1818

1919
flags.DEFINE_string('framework', 'tf', '(tf, tflite, trt')
20-
flags.DEFINE_string('weights', './checkpoints/yolov4-tiny-416',
20+
flags.DEFINE_string('weights', './checkpoints/yolov4-416',
2121
'path to weights file')
2222
flags.DEFINE_integer('size', 416, 'resize images to')
23-
flags.DEFINE_boolean('tiny', True, 'yolo or yolo-tiny')
23+
flags.DEFINE_boolean('tiny', False, 'yolo or yolo-tiny')
2424
flags.DEFINE_string('model', 'yolov4', 'yolov3 or yolov4')
2525
flags.DEFINE_string('image', './data/kite.jpg', 'path to input image')
2626
flags.DEFINE_string('output', 'result.png', 'path to output image')

0 commit comments

Comments
 (0)