# Datasets
## Table of Contents
- [LLS LaserScan Dataset](#lls-laserscan-dataset)
- [Pix4D (MobileWheat3D) Dataset](#pix4d-mobilewheat3d-dataset)
    - [Location](#location-1)
    - [Folder structure](#folder-structure-1)
- [WheatVol3D Volume Regression Dataset](#wheatvol3d-volume-regression-dataset)
    - [Location](#location-2)
    - [Folder structure](#folder-structure-2)


## LLS LaserScan Dataset
The LLS laser scan dataset is used for training and validation of the 3D Instance Segmentation WheatFormer3D models.
We do not own the rights to share this data which lie with the original authors. If explicit permission is granted by them
we can share the data on request. Please reach out to original authors for this:
```
Virlet, N., Sabermanesh, K., Sadeghi-Tehran, P., Hawkesford, M.J.: 
Field scanalyzer: An automated robotic field phenotyping platform for detailed crop monitoring. Funct Plant Biol 44(1), 143–153 (2016)
```





## Pix4D (MobileWheat3D) Dataset
The data was captured on 14th
139 of June 2023 in a part of a wheat field in ripening stage
(approximately an area of 10.8 m2). 187 images were captured with an iPhone-14 (Apple Inc.). Pix4DCatch app together with the iPhone’s LiDAR information and a Vidoc rover for GPS localization were used. The images, LiDAR and GPS information were processed with Pix4DMatic Software. 2,010 wheat heads were manually annotated.

This dataset is not directly used for training but the "cross-sensor replace" augmentation.

### Location

### Folder structure

`Handy_segments_mm` folder contains the processed indiviual wheatheads used for the *Replace* augmentation.

```
data  
└── Pix4D  
    └── training                           // Original data
        ├── readme_iphone_Trainingsdata.txt                        
    └── Handy_segments_mm                  // Wheat instances, zero centered, millimeter scale.
        ├── aehre_0.npy 
        ├── aehre_1.npy 
        ├── ...
        ├── aehre_2009.npy
```


## WheatVol3D Volume Regression Dataset

Multiple wheat heads of various sizes are sampled and reference volumes are measured
using high resolution 3D models. The 3D capturing setup consists of a rotating platform
where the wheat head is placed, a reference object for determining the scale and a
camera system. This way, high-resolution images of individual wheat heads were
captured. We use Agisoft 162 Metashape (St. Petersburg, Russia) for SfM-based 3D
reconstruction. The scale is calculated using the reference objects. Metashape provides
the volume estimate based on the mesh of the reconstructed point cloud. We refer to
these wheat head point clouds as Indoor samples. These volume measures are used as
reference volumes. In addition to the In-door scans, we also want the point clouds of
correspondingwheat heads from the field. To this end, for each wheat head we locate and
segment it from point cloud of the filed plot 
that it comes from. The point clouds for these field plots were reconstructed using
images from a camera array. We refer to these wheat head point clouds as In-field
samples. The volume range spans from  ~1.6 - 8.4 cubic centimeters.


### Location


### Folder structure

The directories inside `volume_regression_dataset` represent data collection date with sub-directories i.e 1, 2, 3
representing plot ids and colors represent wheat head identifier.

> NOTE: Not all dates have all plots and colors. For example: `20250709` only has plot 1.

> NOTE: Only samples from`20250711` have corresponding point clouds from in-field scans.

> NOTE: The scale factor from in-field to indoor scans is 0.042.

Inside each wheat head directory i.e. the color directories, there are 3 files:
1. `Measure_Area-Volume.txt`: Contains area and volume from mesh in metashape.
2. `model.obj`: The mesh file. The scale is in meters.
3. `model-poisson-disk-10000-scale-1.npy`: Point cloud of 1000 points sampled from `model.obj` using Poisson Disk  method. The coordinate system was also changed for z-axis to point up. The scale is in meters.
4. `<color>.ply`: This file is optional and contains corresponding point cloud from in-field scan. The scale is not in meters. Multiple the coordinates by `0.042` to comvert it to meters.
```
data  
└── volume_regression_dataset
    └── 20250709
        └── 1
            └── black
                ├── Measure_Area-Volume.txt
                ├── model-poisson-disk-10000-scale-1.npy
                ├── model.obj
            └── blue
                ├── Measure_Area-Volume.txt
                ├── model-poisson-disk-10000-scale-1.npy
                ├── model.obj
            └── green
                ├── ..
            └── red
                ├── ..
            └── white
                ├── ..
            └── yellow
                ├── ..
    └── 20250711
        └── 1
        └── 2
        └── 3
    └── 20250722
        └── 1
        └── 2
        └── 3
```


Please cite the original paper when using the dataset:

# TODO: Add citation

Contact:
ashutosh.singh@igd-r.fraunhofer.de
sarah.hoppe@igd-r.fraunhofer.de