-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCommands.txt
65 lines (36 loc) · 2.65 KB
/
Commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
### Custom Functions: Count & Print Info ###
conda env create -f conda-cpu.yml
conda activate yolov4-cpu
################################################################################################################
# Convert darknet weights to tensorflow #
# First rename line 14 in ./core/config.py to "coco.names"
## yolov4
python save_model.py --weights ./data/yolov4.weights --output ./checkpoints/yolov4-416 --input_size 416 --model yolov4
# Run yolov4 tensorflow model on single image
# Count the detections
python detect.py --weights ./checkpoints/yolov4-416 --size 416 --model yolov4 --images ./data/images/dog.jpg --count
# Print info
python detect.py --weights ./checkpoints/yolov4-416 --size 416 --model yolov4 --images ./data/images/dog.jpg --count --info
# Multiple images
python detect.py --weights ./checkpoints/yolov4-416 --size 416 --model yolov4 --images "./data/images/Cars.jpg, ./data/images/kite.jpg" --count
# Run yolov4 on video
python detect_video.py --weights ./checkpoints/yolov4-416 --size 416 --model yolov4 --video ./data/video/test_video.mp4 --output ./detections/test_video.mp4 --count
# Crop the detections on video
python detect_video.py --weights ./checkpoints/yolov4-416 --size 416 --model yolov4 --video ./data/video/test_video.mp4 --output ./detections/test_video.mp4 --count --crop
# Run yolov4 on webcam
python detect_video.py --weights ./checkpoints/yolov4-416 --size 416 --model yolov4 --video 0 --output ./detections/webcam_video.mp4 --count
#########################################################################################################################
# License plate detection and recognition
# First rename line 14 in ./core/config.py to "custom.names"
# custom yolov4
python save_model.py --weights ./data/custom.weights --output ./checkpoints/custom-416 --input_size 416 --model yolov4
# Run custom yolov4 tensorflow model
python detect.py --weights ./checkpoints/custom-416 --size 416 --model yolov4 --images ./data/plates/car.jpg
# Run License Plate Recognition on images
python detect.py --weights ./checkpoints/custom-416 --size 416 --model yolov4 --images ./data/plates/car2.jpg --plate
# Run License Plate Recognition on video
python detect_video.py --weights ./checkpoints/custom-416 --size 416 --model yolov4 --video ./data/video/license_plate.mp4 --output ./detections/recognition.mp4 --plate
# Recommended Route
python detect_video.py --weights ./checkpoints/custom-416 --size 416 --model yolov4 --video ./data/video/license_plate.mp4 --output ./detections/recognition.mp4 --crop
# OCR on any image
python detect.py --weights ./checkpoints/yolov4-416 --size 416 --model yolov4 --images ./data/images/dog.jpg --ocr