-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.txt
82 lines (63 loc) · 4.29 KB
/
commands.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Create the needed query and index CSVs
# Run from .../photo-geolocalization/
python3 create_csv.py
--images_path ./delg/workspace/images
--index_path ./delg/workspace/data/index.csv
--query_path ./delg/workspace/data/query.csv
--query_images [image(s)_without_ext]
[optional: --index_images [names]]
[optional: --random_query [count]]
# For WSL
python3 create_csv.py --images_path ./delg/workspace/images --index_path ./delg/workspace/data/index.csv --query_path ./delg/workspace/data/query.csv --query_images 1976_Raesfeld_Schloss_03 --index_images 1976_Alstätte_Kirche_Skt_Maria_Himmelfahrt_01,1976_Raesfeld_Schloss_01,1976_Weseke_Kirche
#--------------------------------------------------------------------
# Run from .../photo-geolocalization/delg/
# Extract feature query
# ACHTUNG: wenn zwischen query und index gewechselt wird auch output_features_dir anpassen
# ACHTUNG: Im Script muss das Bildformat in Zeile 80 angepasst werden. (z.B. tif und jpg)
python3 extract_features.py \
--delf_config_path r50delg_gldv2clean_config.pbtxt \
--images_dir ./data/Borken/image_data \
--index_path ./data/Borken/index.csv \
--query_path ./data/Borken/query.csv \
--image_set query \
--output_features_dir ./results/Borken/features/query
# For WSL
python3 extract_features.py --delf_config_path r50delg_gldv2clean_config.pbtxt --images_dir ./workspace/images --index_path ./workspace/data/index.csv --query_path ./workspace/data/query.csv --image_set query --output_features_dir ./workspace/results/features/query
python3 extract_features.py --delf_config_path r50delg_gldv2clean_config.pbtxt --images_dir ./workspace/images --index_path ./workspace/data/index.csv --query_path ./workspace/data/query.csv --image_set index --output_features_dir ./workspace/results/features/index
#--------------------------------------------------------------------
# Perform retrieval
# Run from .../photo-geolocalization/delg/
python3 perform_retrieval.py \
--index_path ./data/Borken/index.csv \
--query_path ./data/Borken/query.csv \
--query_features_dir ./results/Borken/features/query \
--index_features_dir ./results/Borken/featuresmk /index \
--output_dir ./results/Borken/final
# For WSL
python3 perform_retrieval.py --index_path ./workspace/data/index.csv --query_path ./workspace/data/query.csv --query_features_dir ./workspace/results/features/query --index_features_dir ./workspace/results/features/index --output_dir ./workspace/results/final
#--------------------------------------------------------------------
# Get results txt with location metadata from Landesmuseum Baden JSON file
# Run from .../photo-geolocalization/
# Get all results
python3 get_metadata_results.py \
--results_path 'delg/workspace/results/final/BA 2020-00001-034_Scan01_result.txt'
--json_path delg/workspace/metadata/blmki_bildarchivstaufen.json
# For WSL
python3 get_metadata_results.py --results_path 'delg/workspace/results/final/BA 2020-00001-006_Scan01_result.txt' --json_path delg/workspace/metadata/blmki_bildarchivstaufen.json
# Get the first result
python3 get_metadata_result.py \
--results_path 'delg/workspace/results/final/BA 2020-00001-034_Scan01_result.txt'
--json_path delg/workspace/metadata/blmki_bildarchivstaufen.json
# For WSL
python3 get_metadata_result.py --results_path 'delg/workspace/results/archive/Test-1_20-zufaellige-Bilder/baden/BA 2020-00001-109_Scan01_result.txt' --json_path delg/workspace/metadata/blmki_bildarchivstaufen.json
#--------------------------------------------------------------------
# Create comparison image by using the features.
# Run from .../photo-geolocalization/delg/
python3 match_images.py \
--image_1_path data/TestKiel/foo.jpg \
--image_2_path data/TestKiel/Medienarchiv_2.jpg \
--features_1_path data/TestKiel_features/foo.jpg \
--features_2_path data/TestKiel_features/Medienarchiv_2.jpg \
--output_image TestKielMatch.png
# For WSL
python3 match_images.py --image_1_path ./workspace/images/1978_Wohngebiet_südl._Rhede_04.tif --image_2_path ./workspace/images/1976_Ahaus_Bus-Bahnhof_03.tif --features_1_path ./workspace/results/features/query/1978_Wohngebiet_südl._Rhede_04.delg_local --features_2_path ./workspace/results/features/index/1976_Ahaus_Bus-Bahnhof_03.delg_local --output_image ./workspace/results/match/1978_Wohngebiet_südl._Rhede_04-1976_Ahaus_Bus-Bahnhof_03.png