-
Notifications
You must be signed in to change notification settings - Fork 0
/
Commands.txt
37 lines (23 loc) · 1.64 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
### 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
# Detect Persons on Webcam
python detect_video.py --weights ./checkpoints/yolov4-416 --size 416 --model yolov4 --video 0 --output ./detections/webcam_video.mp4 --count --person