@@ -24,17 +24,17 @@ Darknet YOLO architectures implemented in Tensorflow and Tensorflow Lite.
2424### 1. Prepare environment
2525
2626```
27- git clone https://github.com/patryklaskowski/Darknet-YOLO-with-Tensorflow.git
28- cd Darknet-YOLO-with-Tensorflow
29- python3 -m venv env
30- source env/bin/activate
31- pip install -U pip
32- pip install -r requirements.txt
27+ git clone https://github.com/patryklaskowski/Darknet-YOLO-with-Tensorflow.git && \
28+ cd Darknet-YOLO-with-Tensorflow && \
29+ python3.7 -m venv env && \
30+ source env/bin/activate && \
31+ python3.7 -m pip install -U pip && \
32+ python3.7 -m pip install -r requirements.txt
3333```
3434
3535### 2. Put ` .weights ` file in ` ./data/ ` folder.
3636
37- File with Darknet YOLO weights that does ** not ** fit in Tensorflow but Darknet .
37+ Darknet YOLOv4 weights to download .
3838
3939<p align =' center ' >
4040 <table border =3 >
@@ -112,7 +112,7 @@ Required flags:
112112- ` --model ` : one of [ 'yolov3', yolov3] ` yolov4 `
113113
114114```
115- python save_model.py --weights ./data/yolov4_licence_plate.weights --output ./checkpoints/license_plate-416 --input_size 416 --model yolov4
115+ python3.7 save_model.py --weights ./data/yolov4_licence_plate.weights --output ./checkpoints/license_plate-416 --input_size 416 --model yolov4
116116```
117117
118118** This creates new folder ` ./checkpoints/license_plate-416 ` that stores ` saved_model.pb ` - actual Tensorflow model.**
@@ -123,8 +123,8 @@ This option is lightweight. This solution trade off speed over accuracy.<br>
123123Great for edge devices such as mobile phones, raspberry pi and others.
124124
125125```
126- python save_model.py --weights ./data/yolov4_licence_plate.weights --output ./checkpoints/license_plate-416 --input_size 416 --model yolov4 --framework tflite
127- python convert_tflite.py --weights ./checkpoints/license_plate-416 --output ./checkpoints/yolov4_license_plate-416.tflite
126+ python3.7 save_model.py --weights ./data/yolov4_licence_plate.weights --output ./checkpoints/license_plate-416 --input_size 416 --model yolov4 --framework tflite
127+ python3.7 convert_tflite.py --weights ./checkpoints/license_plate-416 --output ./checkpoints/yolov4_license_plate-416.tflite
128128```
129129
130130Difference makes ` --framework tflite ` flag.
@@ -143,7 +143,7 @@ Difference makes `--framework tflite` flag.
143143### Detect image
144144
145145```
146- python detect.py --weights ./checkpoints/license_plate-416 --size 416 --model yolov4 --images ./data/images/license_plate.jpg
146+ python3.7 detect.py --weights ./checkpoints/license_plate-416 --size 416 --model yolov4 --images ./data/images/license_plate.jpg
147147```
148148
149149<p align =" center " ><img src =" data/result.png " ></p >
@@ -154,7 +154,7 @@ python detect.py --weights ./checkpoints/license_plate-416 --size 416 --model yo
154154### Detect video
155155
156156```
157- python detect_video.py --weights ./checkpoints/license_plate-416 --size 416 --model yolov4 --video ./data/video/road.mp4 --output ./detections/results.avi
157+ python3.7 detect_video.py --weights ./checkpoints/license_plate-416 --size 416 --model yolov4 --video ./data/video/road.mp4 --output ./detections/results.avi
158158```
159159<p align =" center " ><img src =" data/results.gif " ></p >
160160
@@ -166,13 +166,13 @@ python detect_video.py --weights ./checkpoints/license_plate-416 --size 416 --mo
166166### Detect image
167167
168168```
169- python detect.py --weights ./checkpoints/yolov4_license_plate-416.tflite --size 416 --model yolov4 --images ./data/images/license_plate.jpg --framework tflite
169+ python3.7 detect.py --weights ./checkpoints/yolov4_license_plate-416.tflite --size 416 --model yolov4 --images ./data/images/license_plate.jpg --framework tflite
170170```
171171
172172### Detect video
173173
174174```
175- python detect_video.py --weights ./checkpoints/yolov4_license_plate-416.tflite --size 416 --model yolov4 --video ./data/video/road.mp4 --output ./detections/results.avi --framework tflite
175+ python3.7 detect_video.py --weights ./checkpoints/yolov4_license_plate-416.tflite --size 416 --model yolov4 --video ./data/video/road.mp4 --output ./detections/results.avi --framework tflite
176176```
177177
178178---
@@ -240,5 +240,4 @@ detect_video.py:
240240---
241241
242242## References:
243- - [ hunglc007] ( https://github.com/theAIGuysCode/tensorflow-yolov4-tflite )
244- - [ theAIGuysCode] ( https://github.com/hunglc007/tensorflow-yolov4-tflite )
243+ - [ hunglc007] ( https://github.com/hunglc007/tensorflow-yolov4-tflite )
0 commit comments