Demo Training Data Project: Difference between revisions
No edit summary |
|||
Line 8: | Line 8: | ||
==Train Dataset== | ==Train Dataset== | ||
Demo Train Dataset is a project that contains shapes of foliage, drawn as [[area]]s on top of a | Demo Train Dataset is a project that contains shapes of foliage, drawn as [[area]]s on top of a [[Satellite Overlay]]. These areas, in combination with satellite images, can be exported as a dataset for training a [https://github.com/matterport/Mask_RCNN Mask R-CNN model]. Such a model can then be applied to a different project location to detect foliage. A specific use-case is detecting foliage on private property, such as gardens and private yards. | ||
<gallery> | <gallery> | ||
File:Demo_train_dataset_foliage_areas.png|Individual foliage areas | File:Demo_train_dataset_foliage_areas.png|Individual foliage areas |
Revision as of 13:41, 28 January 2025
The Demo Train Dataset project is available for all users and can be found in the main menu under Edit projects. This project does not count towards your license.
This project is intended for people who are working in fields such as AI, remote sensing, data analysis, and urban planning.
This project showcases a method in the Tygron Platform to export a dataset for training a Mask R-CNN model..
The demo is a working project in which a number of areas are drawn, using a satellite overlay as underlay. These areas are marked with specific attributes, making it easy to export them as a training or test set using an export option in the Tygron Platform.
Train Dataset
Demo Train Dataset is a project that contains shapes of foliage, drawn as areas on top of a Satellite Overlay. These areas, in combination with satellite images, can be exported as a dataset for training a Mask R-CNN model. Such a model can then be applied to a different project location to detect foliage. A specific use-case is detecting foliage on private property, such as gardens and private yards.
-
Individual foliage areas
-
Satellite Overlay serving as input for images
In order to train a Mask R-CNN model, we need to obtain two datasets, one for training and one for testing. A dataset consists of a list of numbered files, with the number representing the data entry number. Each data entry consists of the following files:
- An input image, as a PNG
- A mask image, as a PNG, containing gray values, where each gray value represents a unique identifiable feature.
- A label text file containing the classes of the identifiable features, where each class is identified with an integer number (larger than 0).
- Optional: A text file containing the bounding-box pixel numbers; min x, min y, max x, max y, for each identifiable feature in the input image.
-
Input image, in this case an image exported using the Satellite Overlay
-
Mask image with each unique feature identified by a gray value.
-
Class labels
-
Bounding box coordinates
The Tygron Platform allows users to export datasets. The Demo Train Dataset Project is set up to contain two separate sets of Areas to export; One set of Areas with the attribute TRAIN_FOLIAGE and one with the attribute TEST_FOLIAGE. Each set can be exported with an Overlay. Since both sets are drawn based on a Satellite Overlay named Original Satellite, we will use that Overlay.
Export a dataset
This how-to explains how to generate an AI Training Data using the Tygron Platform. This data can be used to train your own AI model.
- Open a project in editor mode using the Tygron Client Application
- Optionally add a Satellite Overlay. This overlay will be used to export train images for the dataset.
- Determine what [item] type will be used to export a dataset for. For example areas drawn on top of the satellite overlay.
- Select the Export Geo Data option in the Ribbon bar popup of the selected item type. For example: Hover over Areas and select Export Geo Data
- Under Format, select the option AI Training Data
- Optionally filter the selected items using the general filter and the attribute filter options
- For the Overlay, select the preferred Overlay, for example the Satellite Overlay.
- The image size can increased, as long as the amount of expected features within the image does not exceed the maximum amount of 250.
- The stride can be kept at 50%
- Click on the Export Files button
- Select a suitable folder for the generated dataset.
- Wait until the dataset is fully generated.
How-to's
See also
Train your own model
A Tygron AI Suite is available at github. This repository contains the necessary files to configure a Conda environment to train a new Mask R-CNN AI model.
Anaconda Navigator will be used to manage a Conda environment and run Jupyter Notebooks with python.
Example notebooks provided in the repository can be used as a basis to train your own model.
- If you are not familiar with github, you can download the zip containing all the files that you need. Otherwise, clone the git repository
- Optionally unzip and open the folder containing the downloaded files; the local repository.
- Download and install Anaconda Navigator.
- Open the Anaconda Navigator application
- Select the tab Environments and click on the Import button. This will download all necessary dependencies and may take a while.
- Select the file "tygronai.yml" from the local repository of the tygron-ai-suite. This file will automatically setup the environment needed to open, edit and execute the Jupyter Notebooks.
- Once configured, select the Home tab
- Open either the JupyterLab or Jupyter Notebook application. You might need to install it first by click on the install button.
- A browser will open with the selected application.
- Browse to the folder of the tygron-ai-suite repository and select the "example_config.ipynb".
- Adjust the following parameters:
trainDirectory = "PATH TO TRAIN FILES"
testDirectory = "PATH TO TEST FILES"
to the folders containing the exported datasets. See how to export AI datasets for more information. - Press the double arrow button named Restart kernel and execute all cells to run the Jupyter Notebook. See the images below of what to expect.
- Eventually an ONNX file will be created.