-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
38 lines (33 loc) · 1.52 KB
/
Makefile
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
cur_dir := "$(shell pwd)"
wider_name :=WIDERfacedet
wider_dir := /media/pinnacle/ext1/data/face/WIDER
caffe_dir := /media/pinnacle/ext1/workspace/caffe
lmdb_pyscript := $(caffe_dir)/scripts/create_annoset.py
caffe_exec := $(caffe_dir)/build/tools/caffe
# WIDER
wider_xml:
cd $(wider_dir) && \
cd WIDER_train && \
mkdir -p -v xml && \
cd ../WIDER_val && \
mkdir -p -v xml && \
cd $(cur_dir) && \
python ./scripts/make_wider_xml.py $(wider_dir)/ WIDER_train/xml/ WIDER_val/xml/
wider_lmdb: wider_xml
python $(lmdb_pyscript) --anno-type=detection --label-map-file=$(wider_dir)/labelmap.prototxt \
--min-dim=0 --max-dim=0 --resize-width=0 --resize-height=0 --check-label --encode-type=jpg --encoded \
--redo \
$(wider_dir) $(wider_dir)/trainval.txt $(wider_dir)/WIDER_train/lmdb/wider_train_lmdb \
./data; \
python $(lmdb_pyscript) --anno-type=detection --label-map-file=$(wider_dir)/labelmap.prototxt \
--min-dim=0 --max-dim=0 --resize-width=0 --resize-height=0 --check-label --encode-type=jpg --encoded \
--redo \
$(wider_dir) $(wider_dir)/test.txt $(wider_dir)/WIDER_val/lmdb/wider_test_lmdb \
./data \
# TRAIN finetune with pretrained model
train:
$(caffe_exec) train -solver solver_train.prototxt -weights model/ssdfacedet_iter_9000.caffemodel 2>&1 | \
tee `cat solver_train.prototxt | grep snapshot_prefix | grep -o \".* | tr -d \"`_log.txt
resume:
$(caffe_exec) train -solver solver_train.prototxt -snapshot `cat snapshot.txt` 2>&1 | \
tee -a `cat solver_train.prototxt | grep snapshot_prefix | grep -o \".* | tr -d \"`_log.txt