-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_model
executable file
·39 lines (28 loc) · 1.1 KB
/
setup_model
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
#!/bin/bash
dataset_path="data/s2g1_dataset/images"
start=`date +%s`
echo ""
echo "ENSURE ENV ACTIVATION"
source ~/anaconda3/etc/profile.d/conda.sh
conda activate imagesearch
echo ""
echo "EXTRACT HUE AND SATURATION HISTOGRAMS"
python src/index_hue_sat.py --dataset $dataset_path --hs-db model/hs-db.hdf5
echo ""
echo "INDEX FEATURES"
python src/index_features.py --dataset $dataset_path --features-db model/features.hdf5 --approx-images 1000 --feature-detector GFTT --extractor BRISK
echo ""
echo "CLUSTER FEATURES"
python src/cluster_features.py --features-db model/features.hdf5 --codebook model/vocab.cpickle --clusters 512 --percentage 0.25
echo ""
echo "EXTRACT BOVW"
python src/extract_bovw.py --features-db model/features.hdf5 --codebook model/vocab.cpickle --bovw-db model/bovw.hdf5
echo ""
echo "TRAIN LBP MODEL"
python src/train_lbp.py --input $dataset_path
echo ""
echo "TRAIN BOVW MODEL"
python src/train_model.py --dataset $dataset_path --features-db model/features.hdf5 --bovw-db model/bovw.hdf5 --model model/model.cpickle
end=`date +%s`
runtime=$((end-start))
echo "Setup took $runtime seconds"