Thanks to visit codestin.com
Credit goes to github.com

Skip to content

0YJ/TomatoMAP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

logo

TomatoMAP: Tomato Multi-Angle Multi-Pose Dataset for Fine-Grained Phenotyping

A Novel Dataset for Tomato Fine-Grained Phenotyping

Homepage arXiv Paper GitHub Code Dataset Visitor


TomatoMAP is a novel dataset generated from our multi camera array based on findability, accessibility, interoperability, and reusability (FAIR). The data generation and annotation take two years with multiple domain experts. TomatoMAP includes three subsets, TomatoMAP-Cls, TomatoMAP-Det and TomatoMAP-Seg for 50 BBCH classification, 7 main area detection, and 10 classes instance segmentation for fine-grained phenotyping. The dataset has also unique 3D modeling potential for further research.

If you need any help, submit a ticket via GitHub Issues.

πŸ“œ License

  • TomatoMAP dataset is released under CC BY 4.0. Commercial use requires permission.
  • TomatoMAP code space is released under Apache 2.0.

πŸ“’ Updates

  • 15.07.2025: Paper available on arXiv
  • 18.07.2025 Full dataset release on e!DAL
  • 18.07.2025 Submit to Nature
  • 23.07.2025 Code repo public

🌠 Coming Soon

  • Claim e!DAL DOI
  • TomatoMAP builder on Colab
  • User friendly Web UI demo
  • Update homepage

✨ Getting Started

Please check code subfolder for more details. Or click:

Expand details

Requirements

We suggest using conda for env management.

git clone https://github.com/0YJ/TomatoMAP.git
cd TomatoMAP
conda env create --file environment.yml
conda activate TomatoMAP
cd code

We use notebook as TomatoMAP builder (script version coming soon).

jupyter notebook

Using fine-tuned parameters for training your own model:

cp det/best_hyperparameters.yaml ./

# unzip TomatoMAP dataset you downloaded from our e!DAL repo under code/ folder

Then follow the guide under TomatoMAP_builder.ipynb to finish the dataset setup.

Project Structure

TomatoMAP/
β”œβ”€β”€ main.py                # Main entry
β”œβ”€β”€ README.md              # Introduction
β”œβ”€β”€ requirements.txt       # Dependencies
β”‚
β”œβ”€β”€ avh/                   # AI vs Human Analysis
β”‚
β”œβ”€β”€ seg/                   # Segmentation package
β”‚
β”œβ”€β”€ cls/                   # Classifier
β”‚
β”œβ”€β”€ det/                   # Detection package
β”‚   β”œβ”€β”€ TomatoMAP-Det.yaml     # YOLo training settings
β”‚   └── best_hyperparameters.yaml     # Fine-tuned hyperparameters
β”‚
β”œβ”€β”€ trainers/              # Training modules
β”‚   β”œβ”€β”€ cls_trainer.py     # Classification trainer
β”‚   β”œβ”€β”€ det_trainer.py     # Detection trainer
β”‚   └── seg_trainer.py     # Segmentation trainer
β”‚
β”œβ”€β”€ datasets/              # Dataset handling
β”‚   β”œβ”€β”€ cls_dataset.py     # Classification dataset
β”‚   └── seg_dataset.py     # Segmentation dataset utilities
β”‚
β”œβ”€β”€ models/                # Model definitions
β”‚   β”œβ”€β”€ cls_models.py      # Classification models
β”‚   └── seg_hooks.py       # Segmentation training hooks
β”‚
β”œβ”€β”€ utils/                 # Utility functions
β”‚   β”œβ”€β”€ common.py          # Common utilities
β”‚   β”œβ”€β”€ visualization.py   # Visualization tools
β”‚   └── isat2coco.py       # Format converter for Seg
β”‚
└── outputs/              # Training outputs (created automatically)
    β”œβ”€β”€ cls/              # Classification results
    β”œβ”€β”€ det/              # Detection results
    └── seg/              # Segmentation results

Usage

Classification Training

Train a classification model on TomatoMAP-Cls dataset:

# default training with MobileNetV3-Large
python main.py cls --data-dir ./TomatoMAP/TomatoMAP-Cls --epochs 100

# options
python main.py cls \
    --data-dir ./TomatoMAP/TomatoMAP-Cls \
    --model mobilenet_v3_large \
    --epochs 100 \
    --batch-size 32 \
    --lr 1e-4 \
    --img-size 640 640 \
    --patience 5 \
    --output-dir outputs/cls/experiment1

Available models:

  • mobilenet_v3_large (default)
  • mobilenet_v3_small
  • mobilenet_v2
  • resnet18

Detection Training

Train a YOLO model on TomatoMAP-Det dataset:

# default training with YOLO11-Large
python main.py det --data-config ./det/TomatoMAP-Det.yaml --epochs 500

# options
python main.py det \
    --data-config ./det/TomatoMAP-Det.yaml \
    --model yolo11l.pt \
    --epochs 500 \
    --img-size 640 \
    --batch-size 4 \
    --patience 10 \
    --device 0 \
    --output-dir outputs/det/experiment1 \
    --hyperparams ./det/best_hyperparameters.yaml

Segmentation Training

Train a Mask R-CNN FPN based model on TomatoMAP-Seg dataset:

# training
python main.py seg train \
    --data-dir ./TomatoMAP/TomatoMAP-Seg \
    --model COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml \
    --epochs 100 \
    --lr 0.0001 \
    --batch-size 4 \
    --patience 5

# evaluation
python main.py seg eval \
    --data-dir ./TomatoMAP/TomatoMAP-Seg \
    --model-path model_best.pth \
    --output-dir outputs/seg

# visualization
python main.py seg vis \
    --data-dir ./TomatoMAP/TomatoMAP-Seg \
    --model-path model_best.pth \
    --n 5 \
    --output-dir outputs/seg

# dataset information
python main.py seg info --data-dir ./TomatoMAP/TomatoMAP-Seg

# analyze object size (small, big, middle)
python main.py seg analyze --data-dir ./TomatoMAP/TomatoMAP-Seg

Available models:

  • COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml
  • COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml
  • COCO-InstanceSegmentation/mask_rcnn_R_101_FPN_3x.yaml
  • COCO-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_3x.yaml

Dataset Preparation

Classification Dataset Structure

TomatoMAP-Cls/
β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ BBCH class1/
β”‚   β”‚   β”œβ”€β”€ img1.jpg
β”‚   β”‚   └── ...
β”‚   └── BBCH class2/
β”‚       └── ...
β”œβ”€β”€ val/
β”‚   └── ...
└── test/
    └── ...

Detection Dataset Structure

TomatoMAP-Det/
β”œβ”€β”€ images
└── labels

Segmentation Dataset Structure

TomatoMAP-Seg/
β”œβ”€β”€ images/               # All images
β”‚   β”œβ”€β”€ img1.JPG
β”‚   └── ...
β”œβ”€β”€ labels/               # All labels in COCO format
    β”œβ”€β”€ isat.yaml         # Label and class configuration
    └── img1.json

🀝 Acknowledgements

This project is powered by the de.NBI Cloud within the German Network for Bioinformatics Infrastructure (de.NBI) and ELIXIR-DE (Research Center JΓΌlich and W-de.NBI-001, W-de.NBI-004, W-de.NBI-008, W-de.NBI-010, W-de.NBI-013, W-de.NBI-014, W-de.NBI-016, W-de.NBI-022), Ultralytics YOLO, Meta Detectron2, ISAT, and LabelStudio. Thanks to JetBrains for supporting us with licenses for their tools.

JetBrains logo.

🌟 Citation

If you use TomatoMAP in your research and think our project is useful, please cite:

@misc{zhang2025tomatomultianglemultiposedataset,
      title={Tomato Multi-Angle Multi-Pose Dataset for Fine-Grained Phenotyping}, 
      author={Yujie Zhang and Sabine Struckmeyer and Andreas Kolb and Sven Reichardt},
      year={2025},
      eprint={2507.11279},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2507.11279}, 
}


@dataset{tomatomap,
  title={TomatoMAP: Tomato Multi-Angle Multi-Pose Dataset for Fine-Grained Phenotyping},
  author={Yujie Zhang and Sabine Struckmeyer and Andreas Kolb and Sven Reichardt},
  journal={e!DAL-Plant Genomics and Phenomics Research Data Repository (PGP)},
  year={2025}
}

About

TomatoMAP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published