Skip to content
This repository was archived by the owner on Aug 22, 2024. It is now read-only.

Commit b1fc629

Browse files
committed
update training section with example output and explanation
1 parent 3b9b3ff commit b1fc629

File tree

1 file changed

+39
-3
lines changed

1 file changed

+39
-3
lines changed

README.md

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ to the `./samples` folder:
4040
6. Use `tools/mergevec.py` to merge the samples in `./samples` into one file:
4141

4242
python ./tools/mergevec.py -v samples/ -o samples.vec
43-
43+
4444
Note: If you get the error `struct.error: unpack requires a string argument of length 12`
4545
then go into your **samples** directory and delete all files of length 0.
4646

@@ -52,8 +52,44 @@ OpenCV, and save the results to `./classifier`:
5252
-numNeg 600 -w 80 -h 40 -mode ALL -precalcValBufSize 1024\
5353
-precalcIdxBufSize 1024
5454

55-
8. Wait until the process is finished (which takes a long time — a couple of
56-
days probably, depending on the computer you have and how big your images are).
55+
After starting the training program it will print back its parameters and then start training. Each stage will print out some analysis as it is trained:
56+
57+
```
58+
===== TRAINING 0-stage =====
59+
<BEGIN
60+
POS count : consumed 1000 : 1000
61+
NEG count : acceptanceRatio 600 : 1
62+
Precalculation time: 11
63+
+----+---------+---------+
64+
| N | HR | FA |
65+
+----+---------+---------+
66+
| 1| 1| 1|
67+
+----+---------+---------+
68+
| 2| 1| 1|
69+
+----+---------+---------+
70+
| 3| 1| 1|
71+
+----+---------+---------+
72+
| 4| 1| 1|
73+
+----+---------+---------+
74+
| 5| 1| 1|
75+
+----+---------+---------+
76+
| 6| 1| 1|
77+
+----+---------+---------+
78+
| 7| 1| 0.711667|
79+
+----+---------+---------+
80+
| 8| 1| 0.54|
81+
+----+---------+---------+
82+
| 9| 1| 0.305|
83+
+----+---------+---------+
84+
END>
85+
Training until now has taken 0 days 3 hours 19 minutes 16 seconds.
86+
```
87+
88+
Each row represents a feature that is being trained and contains some output about its HitRatio and FalseAlarm ratio. If a training stage only selects a few features (e.g. N = 2) then its possible something is wrong with your training data.
89+
90+
At the end of each stage the classifier is saved to a file and the process can be stopped and restarted. This is useful if you are tweaking a machine/settings to optimize training speed.
91+
92+
8. Wait until the process is finished (which takes a long time — a couple of days probably, depending on the computer you have and how big your images are).
5793

5894
9. Use your finished classifier!
5995

0 commit comments

Comments
 (0)