Datasets:
license: cc-by-4.0
dataset_info:
features:
- name: image
dtype: image
- name: file_name
dtype: string
- name: total_count
dtype: int64
- name: num_classes
dtype: int64
- name: class_names
sequence: string
- name: class_counts
sequence: int64
- name: class_descriptions
sequence: string
- name: objects
struct:
- name: bbox
sequence:
sequence: float64
- name: category
sequence: int64
- name: global_category_id
sequence: int64
configs:
- config_name: default
data_files:
- split: train
path: parquet_data/train-*
- split: validation
path: parquet_data/val-*
- split: test
path: parquet_data/test-*
tags:
- counting
- synthetic
- computer-vision
- open-vocabulary
- segmentation
pretty_name: MixCount
task_categories:
- image-classification
- object-detection
The MixCount Dataset: Bridging the Data Gap for Open-Vocabulary Object Counting
Corentin Dumery* · Niki Amini-Naieni* · Shervin Naini · Pascal Fua
EPFL · University of Oxford · Northwestern University · (* equal contribution)
Usage
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from datasets import load_dataset
# Load the streaming dataset
dataset = load_dataset("CorentinDumery/MixCount", split="train", streaming=True)
example = next(iter(dataset))
# Print image-level metadata
print(f"Total Count: {example['total_count']}")
print(f"Number of Classes: {example['num_classes']}\n")
for name, count, desc in zip(example['class_names'], example['class_counts'], example['class_descriptions']):
print(f" - {name}: {count} instance(s)")
print(f" Description: {desc}")
# Extract object and class data
objects = example['objects']
class_names = example['class_names']
# Set up the plot
fig, ax = plt.subplots(1, figsize=(10, 8))
ax.imshow(example['image'])
# Extract lists, falling back to None if global_category_id isn't in the parquet yet
bboxes = objects['bbox']
local_categories = objects['category']
global_categories = objects.get('global_category_id', [None] * len(bboxes))
# Draw bounding boxes and labels
for bbox, local_idx, global_id in zip(bboxes, local_categories, global_categories):
x, y, w, h = bbox
# Color based on the local index so instances of the same class share a color
color = plt.colormaps['tab20'](local_idx % 20)
# Format the label string
if global_id is not None:
label_name = f"{class_names[local_idx]} (Global ID: {global_id})"
else:
label_name = f"{class_names[local_idx]}"
# Draw Bounding Box
rect = patches.Rectangle(
(x, y), w, h,
linewidth=2,
edgecolor=color,
facecolor='none',
)
ax.add_patch(rect)
# Draw Text Label above the bounding box
ax.text(
x, y - 5,
label_name,
color='white',
fontsize=8,
bbox=dict(facecolor=color, edgecolor='none', alpha=0.8)
)
plt.axis('off')
plt.tight_layout()
plt.show()
Overview
Object counting models often struggle in mixed-object scenes. Common failure modes include:
- (a) Distinguishing visually similar objects (e.g. big marbles in PairTally)
- (b) Recognizing self-similar components as a single entity (e.g. counting pairs of sunglasses rather than lenses)
- (c) Ignoring repetitive background patterns and focusing on the queried object class
MixCount combines the scale of synthetic datasets with the photorealism of real-world 3D captures while targeting these failure modes. Training on MixCount yields about 20% lower error on recent open-vocabulary counting benchmarks.
Dataset overview
| FSC-147 | PairTally | MCAC | MixCount | |
|---|---|---|---|---|
| Multiple object types per image | ✓ | ✓ | ✓ | |
| Fine-grained text prompts | ✓ | ✓ | ||
| External visual exemplars | ✓ | |||
| Segmentation & bounding boxes | ✓ | ✓ | ||
| # images | 6,135 | 681 | 20K | 58,000 |
| # object classes | 147 | 98 | 343 | 1,522 |
Visual & text inputs. Multiple visual exemplars per object (external crops and in-scene crops at different scales), together with short, concise, and detailed text descriptions for flexible open-vocabulary counting prompts.
Dense annotations. Pixel-perfect counting supervision plus instance and class segmentations, bounding boxes, depth, and normal maps.
Automatic generator. Objects, distractors, environment, and camera placement are sampled procedurally to create photorealistic training scenes from high-quality real-world captures of objects, materials, and lighting.
See the project page and paper for additional details.
Citation
@article{dumery2026mixcount,
title = {The MixCount Dataset: Bridging the Data Gap for Open-Vocabulary Object Counting},
author = {Dumery, Corentin and Amini-Naieni, Niki and Naini, Shervin and Fua, Pascal},
journal = {arXiv preprint arXiv:2605.18063},
year = {2026}
}
Acknowledgements
We thank DTC, VasTextures, LavalIndoor, and PolyHaven, as well as the Blender Foundation. We also thank Andrew Zisserman for insightful discussions. This work is partially funded by the Swiss National Science Foundation, an AWS Studentship, the Reuben Foundation, a Qualcomm Innovation Fellowship (mentors: Dr Farhad Zanjani and Dr Davide Abati), and the AIMS CDT program at the University of Oxford.