foodseg103-eval
A Large-Scale Benchmark for Food Image Segmentation — Xiongwei Wu et al. (2021) (arXiv:2105.05409, 2021)
What this evaluates
Evaluates fine-grained semantic segmentation and ingredient localization in food images. It probes a model's ability to handle pixel-wise mask prediction under high appearance variability, long-tailed class distributions, and cross-domain generalization to unseen cuisines.
Datasets
- FoodSeg103 — total 7118; splits: train (4983), test (2135)
Metrics
mIoU(primary) — range: [0, 1]- Mean Intersection over Union across all 103 ingredient classes. Computed as the average of IoU per class, where IoU = true positives / (true positives + false positives + false negatives).
Input / output format
Input: RGB food images (typically resized to 2049×1024 and cropped to 768×768 during training) with pixel-wise ground truth masks labeling 103 fine-grained ingredient classes.
Output: Pixel-wise segmentation mask of the same spatial dimensions as the input image, where each pixel is assigned an ingredient class label (0–102).
Scoring recipe
def compute_miou(pred_masks, gt_masks, num_classes=103):
ious = []
for c in range(num_classes):
pred_c = (pred_masks == c)
gt_c = (gt_masks == c)
intersection = np.logical_and(pred_c, gt_c).sum()
union = np.logical_or(pred_c, gt_c).sum()
ious.append(intersection / union if union > 0 else 1.0)
return np.mean(ious)
Common pitfalls
- The 7:3 train/test split is image-level random, which may cause data leakage if image IDs are not strictly separated.
- Cross-domain evaluation on the Asian food subset (FoodSeg154) only evaluates 62 overlapping classes for baseline comparisons, but 112 classes when fine-tuned, requiring careful metric reporting alignment.
- ReLeM variants (LSTM vs Transformer) and backbone choices (ResNet-50 vs ViT-16/B) significantly impact mIoU, so ablation must match these configurations exactly.
Evidence (verbatim from paper)
We randomly divide FoodSeg103 dataset into two splits: training set and testing set, according to the 7:3 ratio. Our training set contains 4,983 images with 29,530 ingredient masks, while testing set contains 2,135 images with 12,567 ingredient masks. The experiment results of CCNet, FPN and SeTR on FoodSeg103 are shown in Table [3].
| Methods | mIoU | mAcc | Model Size |
Citation
@misc{wu2021foodseg103,
title={A Large-Scale Benchmark for Food Image Segmentation},
author={Xiongwei Wu et al. (2021)},
year={2021},
note={arXiv:2105.05409}
}
- arXiv: 2105.05409