This is going to describe all of processes, start from very begining to the end of process.
Command line to convert .shp to .geojson link to install
- input: subdistrict.shp
- output: subdistrict.geojson
For example,
ogr2ogr -f GeoJSON output.geojson input.shp
image_retreival/polygon_to_points.py
- input: subdistrict.geojson, province, district, and subdist
- output: points/coordinate of subdistrict
image_retreival/get_village_points.py
- input: points of subdistrict
- output: points of village
image_retreival/GSV_loader.py
- input: points of village
- output: street view images
- input: street view images
- output: features vector (.csv)
image_segmentation.py
- input: google street view images
- output: segmented image
image_recognition.py
- input: street view and segmented images
- output: top-5 classification results (.csv)
- input: features (.csv)
- output: classification results (.csv)
** Example of classification results **
Image name | 1st result | 1st score | 2nd result | 2nd score | 3rd result | 3rd score | 4th result | 4th score | 5th result | 5th score |
---|---|---|---|---|---|---|---|---|---|---|
8.076112623778412-98.83164102093671-240-2016-03-12-Pavement | pot, flowerpot | 0.22256 | sundial | 0.0321534 | mortar | 0.0310492 | caldron, cauldron | 0.0249833 | Dutch oven | 0.0229676 |
8.078046220141706-98.85250783470164-240_2016-03-8-Fence | greenhouse | 0.28458 | steel arch bridge | 0.0468726 | worm fence | 0.0316026 | valley, vale | 0.0296596 | seashore, coast | 0.015028 |
feature_vector/feature_vector_classification.py
- input: classificatino results (.csv)
- output: geojson (.js)
GSV/../../../visulization.py
- input: geojson (.js)
- output: map visualization
Assuming you have installed all of require libraries in Installing, simply run
python data_collection.py --province PROVINCE --district DISTRICT --subdist SUBDIST --village VILLAGE
python image_recognition.py --province PROVINCE --district DISTRICT --subdist SUBDIST --village VILLAGE
python image_segmentation.py --province PROVINCE --district DISTRICT --subdist SUBDIST --village VILLAGE
python feature_vector_classification.py --province PROVINCE --district DISTRICT --subdist SUBDIST --village VILLAGE