Prerequirements: Python (was tested for > 3.9) and Pip
git clone <repository_url>
pip install virtualenv
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
Install Google Cloud CLI for GEE to work without docker: see https://cloud.google.com/sdk/docs/install
Install fiftyone Desktop to use the desktop version - this is only necessery if you want to visualize the resulting COCO dataset with the fiftyone app.
pip install "fiftyone[desktop]"
cd src
python modules/main.py
-> Create a new python file within the src/modules/config folder -> specifiy the variables -> to simplify, copy the code from another config file (e.g. Example_Config_lighthouses_Sweden.py)
All variables have to be set
- query (string)
-
A valid NODE ONLY query in Open street map. Test under the following link: https://overpass-turbo.eu/
-
Example: All Lighthouse nodes in Sweden
[out:json];
area["ISO3166-1"="SE"]["admin_level"="2"]->.searchArea;
(
node["man_made"="lighthouse"](area.searchArea);
);
out body;
-> if you are starting a new project - set all to true
- get_OSM_nodes (boolean)
If System should request Node data from OSM
- download_img (boolean)
if the satellite images are to be downloaded with Google Earth Engine
- convert_s2 (boolean)
if the satellite tif bands should be converted to GeoTif and PNG images
- create_dataset (boolean)
if a coco dataset should be created from the png images
- Image_Size (int)
Specify the size of the Image to be downloaded in meters
- Object_Size (int)
Specify the size of the Objects that are supposed to be labelled in meters
- filename (string)
Filename for Image Consistency
- element_name (string)
Name of the Object to be labelled
- remove (boolean)
if the image folder should be removed if there is one
- n_of_scene (int)
ow many images in total do you want to download (set to 0 if all available should be downloaded)
- n_images (int)
from how many different dates the images are supposed to be downloaded
- cloud_percentage (double)
[0-1] how big the maximum cloud fraction should be present within an image
- variability_threshhold (int)
how big the allowed color variablility is within the image (can be set to exclude image borders and sensor mistakes)
- start_dates ([string])
FORMAT: ['2019-01-01'] - yyyy-mm-dd - start dates for the image request
- end_dates ([string])
FORMAT: ['2019-12-01'] - yyyy-mm-dd - end dates for the image request
- csv_file_path (string)
filepath for saving coordinates from OSM
- filePath (string)
filepath for saving the buffered coordinates after coordinate search
- get_way_centers (boolean)
if you use way centers - still in testing
- make_bounding_box_image (boolean)
if you want to create an image of the bounding boxes needed for the search
- bounding_box_image_path (string)
where you want to save it
docker build -t satellite_osm_dataset .
docker run -i -t satellite_osm_dataset