How datasets and models cooperate in SAFECount
mainThe choice of dataset class and model depends on your specific counting scenario:
| Scenario | Dataset Class | Model Class | Description |
|---|---|---|---|
| FSC147 Style | custom_dataset.py | safecount.py | Support images are parts of the query image, annotated by bounding boxes. |
| Class-specific | custom_exemplar_dataset.py | safecount_exemplar.py | Support images are sampled and fixed, not part of the query image (e.g., CARPK, Mall). |
| Cross-dataset | custom_dataset.py | safecount_crossdataset.py | Pretraining on FSC147 and finetuning on class-specific datasets. |