Code and data for segmentation of granular material images using synthetic data and deep learning
Description
This SyntheticSoil project is a Unity-based pipeline designed to procedurally generate and annotate realistic granular soil images from granulometric data. It enables the simulation of soil samples based on real-world particle size distributions (PSDs), their segmentation via Unity Perception, and their conversion to standard annotation formats (COCO, Pascal VOC) for training deep learning models such as Mask R-CNN. --- ## π Repository Structure ``` SyntheticSoilProject/ β βββ 0_AnnotationSyntheticSoil/ # Unity project to generate and annotate soil images (top + bottom views) β version A (original project used in the article) βββ 1_solo2coco/ # Converts Unity SOLO annotations to COCO format using pysolotools βββ 2_polygon_vers_rle/ # Converts polygon annotations (x,y) to COCO RLE format βββ 3_json2xml/ # Converts COCO JSON annotations to Pascal VOC (XML) βββ 4_GrainSegNet/ # GrainSegNet model (training & inference code, checkpoints, evaluation scripts) βββ 5_SyntheticSoil/ # Unity project to generate high-resolution images without annotation β *version B (alternate codebase used in article) βββ 6_Annexes/ # Additional examples, outputs and test files β βββ 0_AnnotationSyntheticSoil/ # Example scene's images β βββ 1_Example_of_solo_data/ # Example outputs from the annotation Unity project (images, masks, SOLO JSON) β βββ 2_Example_of_SyntheticSoil_Images/ Example RGB images and instance masks β βββ 3_Test_GrainSegNet/ Example test outputs and evaluation of GrainSegNet β βββ Real_granular_material.JPG Example real sample photograph β βββ Some_granulo_desired.txt Example PSD text file with desired granulometry βββ 7_BuildSyntheticSoil/ Builder version containing the full set of particle models used by the author (pre-processed prefabs) βββ README.md ```
Files
Institutions
- Ecole de technologie superieure