CNN training of satellite images for "Detection and tracking barchan dunes using Artificial Intelligence"

Published: 25 March 2024| Version 2 | DOI: 10.17632/v4yntwdnjk.2
Contributors:
Esteban Cunez, Erick Franklin

Description

This is part of the dataset concerning the YOLO training of satellite images (Barchan dunes). In this dataset, you find the "YOLOv8 train" folder that contains the structure and images obtained from HiRISE, CTX global mosaic, Google Earth Pro, and Copernicus. We saved the images with the HiView, Google Earth Pro, and Copernicus software to train a CNN with images of barchan dunes, the "Train Results" folder that contains the figures and weights of YOLO detection of barchan dunes, the "Earth detections" that contains some barchan dune detections on different locations of Earth, the "Mars detections" that contains some barchan dune detections on different locations of Mars, and the "Code Files" that contains the scripts to detect barchan dunes, train a YOLOv8, convert masks to polygons and plot resulting YOLO parameters.

Files

Steps to reproduce

To detect barchan dunes from Satellite images. 1. Download the files and keep the structure and folder names. 2. On your desktop create "Satellite_data" and "output_satellite" folders. 3. Install the YOLOv8 network using the Ubuntu terminal and run the following command pip install -r requirements.txt. 4. Put the images to be detected in the "Satellite_data" folder. Note: All shapes must point upwards to calculate the morphology parameters. 5. Use the script "barchan_dunes_detection_satellite.py" to detect barchan dunes. 6. In this script change the network weights source path "model_path" available in the Results train/weights folder, the input data path "image_path", and the output data path "output_images_path". 7. Modify the output image size (original image size or double image size to improve the image quality) (line 42). 8. Modify the confidence to detect barchan dunes (line 50). 9. Run Python script. 10. Enter the conversion from pixel to meters. 11. The detection results are in the "output_satellite" folder. 12. Review the text file "dataset.txt" with the morphology parameters. 13. To detect inclined barchan dune detect run the script "barchan_dunes_detection_satellite_inclinate.py" and repeat the steps from step 4. To train the YOLOv8 network 1. Download the files and keep the structure and folder names. 2. Install the YOLOv8 network using the Ubuntu terminal and run the following command pip install -r requirements.txt. 3. Create a dataset with a large number of images to be labeled. 4. Label the images using the segmentation method (masks). In the present work, the CVAT online program was used with two classes (Barchan and Not a barchan). Then we download the dataset labeled with the export format segmentation mask 1.1. 5. On your desktop create a "masks" folder with the dataset labeled and "labels" to obtain the polygons mask. 6. Open the script "mask_to_polygons_two_classes.py" and change the paths where your masks are located and where you are going to save the labels. 7. Modify the colors of your masks in the script (lines:24,25,62,63) and run it. 8. In the data/images folder you have to copy your original images and separate 90% dataset to train and 10% to validate. 9. Repeat the same previous step with the labels obtained in step 6 and copy them to the data/labels folder. 10. Configure the "config.yaml" file and change the data, images, and labels paths. 11. Open the script "train.py" and modify the parameters according to your needs, check if the pre-trained weight "yolov8n.pt" (segmentation) is in your work area, and run the script. 12. Finally, you have trained the YOLO network and it's going to save the new weights in the runs folder.

Institutions

Universidade Estadual de Campinas Faculdade de Engenharia Mecanica

Categories

Dune Field, Mars, Convolutional Neural Network, YOLOv7

Funding

Fundação de Amparo à Pesquisa do Estado de São Paulo

2018/14981-7

Fundação de Amparo à Pesquisa do Estado de São Paulo

2021/11470-4

Licence