3DPotatoTwin
Potato dataset with paired RGB, RGBD, and 3D reconstructed models, can be used for image to 3D and shape completetion tasks
1. Downloads
It is recommended to using huggingface-cli
to download this datasets to your local computer.
make sure you have at least 150GB free space and huggingface-cli installed on your computer
huggingface-cli download HowcanoeWang/3DPotatoTwin --repo-type dataset --local-dir /your/path/to/save/dataset
Then, you can run the following python code to unzip all zipped files at your local computer, any python version > 3.6 should work. This script will also remove zip file after unzipping to free up disk spaces:
$ cd /path/to/this/dataset
$ python unzip.py
After executing the unzip script, the dataset is in the following folder structure
2. Folder structure
1_rgbd
This folder contains 3 subfolders with the source of RGBD imaging of potato tubers scrolling on the conveyer. Including RGB and detph images and 3D point cloud data.
1_rgbd
|-- 0_camera_intrinsics
| |-- realsense_d405_camera_intrinsic.json
| |-- realsense_d405_settings_harvester.json
|-- 1_image
| |-- 2R2-8
| | |-- 2R2-8_depth_098.png
| | |-- 2R2-8_rgb_098.png
| | |-- ...
| |-- ...
|-- 2_pcd
| |-- 2R2-8
| | |-- 2R2-8_pcd_098.ply
| | |-- ...
| |-- ...
0_camera_intrinsics
the Intel RealSense RGBD camera settings and interal parameters
1_image
Contains the RGB and depth images. The files are named according to [potato-id]_[data-type]_[ycoord].[extension]
. Note that the ycoord is the y-coordinate of the center of the bounding box (bbc) of the annotated potato tuber in reversed order: [img_height - y_bbc]
.
The RGB images have an alpha channel with the mask annotation. To extract the RGB and mask channels individually please use this code:
import cv2
rgba = cv2.imread("./1_rgbd/1_image/2R2-8/2R2-8_rgb_098.png", cv2.IMREAD_UNCHANGED)
rgb = rgba[:,:,:-1]
mask = rgba[:,:,-1]
Also, it is a time-series data with potato tuber scrolling from the bottom to the top of converyer.
2_pcd
the converted 3D point cloud from RGBD scans on converyer
2_sfm
This folder contains 4 subfolders with the source of close-range RGB reconstruction for potato tubers on rotation table and photo studio.
2_sfm/
|-- 0_image/
| |-- 2R1-1/
| | |-- 000/
| | | |-- DSC_000_20230921_0956229427.jpg
| | | |-- ...
| | |-- 001/
| | |-- 002/
| |-- ...
|-- 0_masks/
| |-- 2R1-1/
| | |-- 000/
| | | |-- DSC_000_20230921_0956229427.png
| | | |-- ...
| | |-- 001/
| | |-- 002/
| |-- ...
|-- 0_metashape.projects
| |-- 1R_Group0.psx
| |-- 1R_Group0.files
| |-- ...
| |-- 05_export_models.xml
|-- 1_mesh
| |-- 2R2-8
| | |-- 2R2-8.jpg
| | |-- 2R2-8.mtl
| | |-- 2R2-8.obj
| |-- ...
|-- 2_pcd
| |-- 2R2-8
| | |-- 2R2-8_10000.ply
| | |-- 2R2-8_20000.ply
| | |-- 2R2-8_30000.ply
| |-- ...
0_image
The raw RGB images taken by 3 DSLR cameras on rotation table for close-range 3D reconstruction.
For each potato tuber, 3 camera views were grouped into subfoders 000
, 001
, 002
.
0_masks
The masks to filter out backgrounds for 3D reconstruction, providing faster and more reliable photo alignment and better output quality.
These are simple computer vision colorspace threshold segmenetation, just rough masks rather than perfect segmentation masks.
0_metashape.projects
Agisoft Metashape reconstruction projects, which contain useful SfM-MVS meta information like camera pose and internal parameters.
We grouped 50 potatos for each projects, for the ease of data management and batch processing, for example,05_export_models.xml
is a Metashape batch script for model exporting.
For camera pose information, they are availabe at: *.files/[chunk_id]/chunks.zip/doc.xml
. For camera internal information, they are available at *.files/[chunk_id]/0/frame.zip/doc.xml
. For more details, pleach check Metashape official documentation.
Considering using EasyIDP
for parsing previous camera parameters easily.
Use $ pip install easyidp
to install this tool to your python environment first.
>>> import easyidp as idp
>>> ms = idp.Metashape(r"./2_SfM/2_metashape.projects/1R_Group0.psx")
>>> ms
<'1R_Group0.psx' easyidp.Metashape object with 40 active chunks>
id label
---- -------
-> 0 R1-1
1 R1-10
2 R1-2
... ...
38 R4-7
39 R4-9
>>> ms.open_chunk("R4-9") # switch to chunk/potato 'R4-9'
>>> ms.photos # show the list of all photos
<easyidp.Container> with 72 items
[0] 000-DSC_000_2745
<easyidp.reconstruct.Photo object at 0x7a7c1db35df0>
[1] 000-DSC_000_2748
<easyidp.reconstruct.Photo object at 0x7a7b04064490>
...
[70] 002-DSC_002_2812
<easyidp.reconstruct.Photo object at 0x7a7affb1fa00>
[71] 002-DSC_002_2814
<easyidp.reconstruct.Photo object at 0x7a7affb1fe80>
>>> ms.photos[0].label
'000-DSC_000_2745'
>>> ms.photos[0].transform
array([[ 0.15930206, -0.12569926, 0.97919485, -3.02706453],
[-0.46709831, -0.88341351, -0.03741308, -0.01090792],
[ 0.86973675, -0.45142028, -0.1994435 , -2.61149946],
[ 0. , 0. , 0. , 1. ]])
Abovementioned transform matrix applies to metashape local coordinate, please check Metashape documents for more details.
Current EasyIDP version only supports parsing the transformation matrix (docs). In some cases, the rotation, position and location are missing in Metashape xml files thus not implemented this feature.
To use the transformation from RGBD point cloud to close-range SfM 3D models, please refer to
3_pair/tmatrix
listed below.
1_mesh
The reconstructed close-range high-quality 3D meshes for potato tubers. The meshes can be visualized in Open3D:
>>> import open3d as o3d
>>> mesh = o3d.io.read_triangle_mesh("./2_sfm/1_mesh/2R2-8/2R2-8.obj", enable_post_processing=True, print_progress=False)
>>> o3d.visualization.draw_geometries([mesh], window_name="mesh")
2_pcd
The downsampled point clouds of these meshes (containing 10000, 20000, and 30000 points respectively).
3_pair
This folder contains 1 subfolder with the transformation matrices to overlay the partial point cloud with the 3D mesh. Please refer to the transform.py
file for more details.
The ground_truth.csv
is the measured tuber traits, the volumes are measured by drainage method.
The non-perfect.txt
records the not perfect matching, please excluded them to traing any machine learning products.
3. Citation Information
Please cite our publication if this dataset helped your research:
@article{BLOK2025109673,
title = {High-throughput 3D shape completion of potato tubers on a harvester},
author = {Pieter M. Blok and Federico Magistri and Cyrill Stachniss and Haozhou Wang and James Burridge and Wei Guo},
journal = {Computers and Electronics in Agriculture},
volume = {228},
pages = {109673},
year = {2025},
issn = {0168-1699},
doi = {https://doi.org/10.1016/j.compag.2024.109673},
url = {https://www.sciencedirect.com/science/article/pii/S0168169924010640},
keywords = {Potato, Deep learning, RGB-D, 3D shape completion, Structure-from-Motion},
}
- Downloads last month
- 19