]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - jacinto-ai/caffe-jacinto.git/blobdiff - data/WIDER_FACE/create_data.sh
Issue 490 fixed (FP16 support for SSD train)
[jacinto-ai/caffe-jacinto.git] / data / WIDER_FACE / create_data.sh
diff --git a/data/WIDER_FACE/create_data.sh b/data/WIDER_FACE/create_data.sh
new file mode 100755 (executable)
index 0000000..6563538
--- /dev/null
@@ -0,0 +1,31 @@
+cur_dir=$(cd $( dirname ${BASH_SOURCE[0]} ) && pwd )
+root_dir=$cur_dir/../..
+
+cd $root_dir
+export PYTHONPATH=$PYTHONPATH:python
+
+redo=1
+#data_root_dir="$HOME/data"
+data_root_dir="$root_dir/data"
+dataset_name="WIDER_FACE"
+mapfile="$root_dir/data/$dataset_name/labelmap_wider.prototxt"
+
+echo $mapfile
+
+anno_type="detection"
+db="lmdb"
+min_dim=0
+max_dim=0
+width=0
+height=0
+label_type="txt"
+
+extra_cmd="--encode-type=jpg --encoded"
+if [ $redo ]
+then
+  extra_cmd="$extra_cmd --redo"
+fi
+for subset in train
+do
+  python $root_dir/scripts/create_annoset.py --anno-type=$anno_type --label-type=$label_type --label-map-file=$mapfile --min-dim=$min_dim --max-dim=$max_dim --resize-width=$width --resize-height=$height --check-label $extra_cmd $data_root_dir/$dataset_name $root_dir/data/$dataset_name/$subset.txt $data_root_dir/$dataset_name/$db/$dataset_name"_"$subset"_"$db examples/$dataset_name
+done