-
Notifications
You must be signed in to change notification settings - Fork 1
/
JRS_DetectCommand.txt
53 lines (25 loc) · 1.4 KB
/
JRS_DetectCommand.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
Look in the following file and make sure there is one class per line
C:\Users\jshea\Desktop\ML\MachineControlByObjectDetection\data\classes\obj.names
Start at the Anaconda prompt and enter the following:
conda activate yolov4-gpu
Change to the following directory:
cd C:\Users\jshea\Desktop\ML\MachineControlByObjectDetection
Put your weights file in the following directory:
C:\Users\jshea\Desktop\ML\MachineControlByObjectDetection\data
Rename your weights file to the following:
custom.weights
Convert YOLOv4 to TensorFlow before running detector:
python save_model.py --weights ./data/custom.weights --output ./checkpoints/custom-416 --input_size 416 --model yolov4
Run detector against sample video input.
All defaults are used.
Relay will be used if inserted into USB port.
python JRS_DetectorSorter.py
Run detector against webcam input.
In this case selecting webcam input from webcam at index 0.
Score is set to 1/2 sensitivity. (.1 is most sensitive.) (.9 least sensitive)
Count flag sends relay status info to the console along with info about objects detected.
Output flag sends a video of detected objects to disk.
Relay will be used if inserted into USB port.
python JRS_DetectorSorter.py --video 0 --score .5 --count --output ./detections/results.avi
See all the options with the following command.
python JRS_DetectorSorter.py --help