-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathistruzioni.txt
43 lines (30 loc) · 3.55 KB
/
istruzioni.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
# git clone https://github.com/ralzakark/keras-YOLOv3-model-set.git
# small code changes
# import del progetto PyCharm e installazione moduli
pip install -r requirements.txt
# dataset json generator
cd .\dataset_generator_babylon\
START /B start.bat
# JSON to JPG and annotations
python json_to_dataset.py
# Generate anchors
python tools/misc/kmeans.py --annotation_file ./data/annotation.train --cluster_number 9 --anchors_file ./configs/yolo3_my_anchors.txt --model_image_size 416x416
# Train 1st step ~20 epoch
python train.py --multiscale --anchors_path ./configs/yolo3_my_anchors.txt --data_shuffle --optimizer rmsprop --model_type yolo3_darknet --weights_path ./weights/darknet53.h5 --freeze_level 1 --annotation_file ./data/annotation.train --val_annotation_file ./data/annotation.val --classes_path ./data/class_map --batch_size 8 --eval_online --eval_epoch_interval 5 --save_eval_checkpoint
# Train 2nd step
python train.py --init_epoch X --data_shuffle --optimizer rmsprop --model_type yolo3_darknet --weights_path ./logs/000/xxx.h5 --freeze_level 2 --annotation_file ./data/annotation.train --val_annotation_file ./data/annotation.val --classes_path ./data/class_map --batch_size 16 --eval_online --eval_epoch_interval 1 --save_eval_checkpoint
# Evaluation (not working)
python eval.py --model_path=./logs/000/ep002-loss12.012-val_loss13.169.h5 --anchors_path=./configs/yolo3_anchors.txt --classes_path=./data/class_map --model_image_size=416x416 --eval_type=VOC --iou_threshold=0.5 --conf_threshold=0.001 --annotation_file=./data/annotation.test --save_result
# Test w/ best model
python yolo.py --model_type yolo3_darknet --weights_path=./logs/000/ep043-loss6.301-val_loss5.574-mAP95.971.h5 --anchors_path=configs/yolo3_anchors.txt --classes_path=./data/class_map --model_image_size=416x416 --image
python yolo.py --model_type yolo3_darknet --weights_path=./logs/000/ep043-loss6.301-val_loss5.574-mAP95.971.h5 --anchors_path=configs/yolo3_my_anchors.txt --classes_path=./data/class_map --model_image_size=416x416 --input video.mp4
# tensoboard
tensorboard --logdir ./logs/000
############## to be tested enhance & multiscale
# Train 1st step ~20 epoch
python train.py --enhance_augment mosaic --multiscale --data_shuffle --optimizer rmsprop --model_type yolo3_darknet --weights_path ./weights/darknet53.h5 --freeze_level 1 --annotation_file ./data/annotation.train --val_annotation_file ./data/annotation.val --classes_path ./data/class_map --batch_size 16 --eval_online --eval_epoch_interval 1 --save_eval_checkpoint
# Train 2nd step
python train.py --enhance_augment mosaic --multiscale --init_epoch 35 --data_shuffle --optimizer rmsprop --model_type yolo3_darknet --weights_path ./logs/000/ep015-loss5.527-val_loss5.691-mAP95.746.h5 --freeze_level 2 --annotation_file ./data/annotation.train --val_annotation_file ./data/annotation.val --classes_path ./data/class_map --batch_size 16 --eval_online --eval_epoch_interval 1 --save_eval_checkpoint
python train.py --multiscale --init_epoch 41 --data_shuffle --optimizer rmsprop --model_type yolo3_darknet --weights_path ./logs/000/ep037-loss11.818-val_loss5.754-mAP95.956.h5 --freeze_level 1 --annotation_file ./data/annotation.train --val_annotation_file ./data/annotation.val --classes_path ./data/class_map --batch_size 8 --eval_online --eval_epoch_interval 1 --save_eval_checkpoint
logs\000\ep006-loss8.630-val_loss10.194.h5
python yolo.py --model_type yolo3_darknet --weights_path=./logs\000\ep006-loss8.630-val_loss10.194.h5 --anchors_path=configs/yolo3_my_anchors.txt --classes_path=./data/class_map --model_image_size=416x416 --image