Dataset Viewer
Auto-converted to Parquet Duplicate
filename
stringlengths
29
37
class_id
int64
0
0
x_center
float64
0
1
y_center
float64
0
0.99
width
float64
0
0.29
height
float64
0.01
0.78
1010s1121s3002-2s5001-1-301.txt
0
0.614583
0.77037
0.195833
0.311111
1010s1121s3002-2s5001-1-301.txt
0
0.372917
0.616667
0.15
0.351852
1060a1000s1110s4001-2s5001-1-211.txt
0
0.558333
0.491667
0.025
0.046296
1060a1000s1110s4001-2s5001-1-211.txt
0
0.527083
0.484259
0.054167
0.068519
1060a1000s1110s4001-2s5001-1-211.txt
0
0.555208
0.421296
0.072917
0.046296
1060a1000s1110s4001-2s5001-1-211.txt
0
0.290625
0.367593
0.03125
0.053704
1060a1000s1110s4001-2s5001-1-211.txt
0
0.56875
0.367593
0.045833
0.035185
1060a1000s1110s4001-2s5001-1-211.txt
0
0.632292
0.523148
0.21875
0.612963
1060a1000s1110s4001-2s5001-1-211.txt
0
0.280729
0.422222
0.034375
0.059259
1060a1000s1110s4001-2s5001-1-211.txt
0
0.476042
0.287037
0.03125
0.059259
1060a1000s1110s4001-2s5001-1-211.txt
0
0.476042
0.29537
0.027083
0.038889
1060a1000s1110s4001-2s5001-1-211.txt
0
0.476042
0.515741
0.01875
0.087037
1060a1000s1110s4001-2s5001-1-211.txt
0
0.585417
0.282407
0.029167
0.031482
1060a1000s1110s4001-2s5001-1-211.txt
0
0.551042
0.457407
0.05625
0.048148
1060a1000s1110s4001-2s5001-1-211.txt
0
0.476042
0.327778
0.03125
0.055556
1060a1000s1110s4001-2s5001-1-211.txt
0
0.322396
0.55
0.180208
0.52963
1060a1000s1110s4001-2s5001-1-211.txt
0
0.51875
0.378704
0.029167
0.098148
1060a1000s1110s4001-2s5001-1-211.txt
0
0.61875
0.387963
0.0625
0.194444
1060a1000s1110s4001-2s5001-1-211.txt
0
0.572917
0.263889
0.0375
0.031482
1060a1000s1110s4001-2s5001-1-211.txt
0
0.561458
0.410185
0.060417
0.027778
1060a1000s1110s4001-2s5001-1-211.txt
0
0.558333
0.437963
0.05
0.031482
1060a1000s1110s4001-2s5001-1-211.txt
0
0.585417
0.484259
0.0375
0.053704
1060a1000s1110s4001-2s5001-1-211.txt
0
0.5625
0.319444
0.05
0.035185
1060a1000s1110s4001-2s5001-1-211.txt
0
0.561458
0.524074
0.077083
0.114815
1060a1000s1110s4001-2s5001-1-211.txt
0
0.558333
0.29537
0.025
0.035185
1060a1000s1110s4001-2s5001-1-211.txt
0
0.551042
0.337963
0.05625
0.042593
1060a1000s1110s4001-2s5001-1-211.txt
0
0.589583
0.322222
0.020833
0.040741
1060a1000s1110s4001-2s5001-1-211.txt
0
0.561458
0.389815
0.060417
0.035185
1060a1000s1110s4001-2s5001-1-211.txt
0
0.484375
0.271296
0.014583
0.027778
1050s1132a1110s3003-5s5001-2-16.txt
0
0.09987
0.462037
0.085677
0.253704
1050s1132a1110s3003-5s5001-2-16.txt
0
0.897917
0.44537
0.1125
0.257407
1050s1132a1110s3003-5s5001-2-16.txt
0
0.816667
0.477778
0.1
0.325926
1050s1132a1110s3003-5s5001-2-16.txt
0
0.178906
0.508333
0.119271
0.309259
1050s1132a1110s3003-5s5001-2-16.txt
0
0.660417
0.42963
0.1625
0.318519
1050s1132a1110s3003-5s5001-2-16.txt
0
0.310417
0.421296
0.125
0.224074
1050s1132a1110s3003-5s5001-2-16.txt
0
0.914583
0.44537
0.070833
0.25
1050s1132a1110s3003-5s5001-2-16.txt
0
0.491667
0.49537
0.1
0.446296
1050s1132a1110s3003-5s5001-2-526.txt
0
0.820833
0.477778
0.1
0.325926
1050s1132a1110s3003-5s5001-2-526.txt
0
0.178646
0.508333
0.123958
0.309259
1050s1132a1110s3003-5s5001-2-526.txt
0
0.660417
0.42963
0.1625
0.318519
1050s1132a1110s3003-5s5001-2-526.txt
0
0.31875
0.383796
0.125
0.358333
1050s1132a1110s3003-5s5001-2-526.txt
0
0.09987
0.465741
0.08776
0.261111
1050s1132a1110s3003-5s5001-2-526.txt
0
0.902083
0.44537
0.104167
0.257407
1050s1132a1110s3003-5s5001-2-526.txt
0
0.490625
0.463889
0.102083
0.42037
1050s1132a1110s3004-2s5310-1-841.txt
0
0.69375
0.415278
0.1875
0.658333
1050s1132a1110s3004-2s5310-1-841.txt
0
0.275521
0.417593
0.219792
0.616667
1010s1121s2001-2s5101-1-166.txt
0
0.445833
0.037789
0.016667
0.043866
1010s1121s2001-2s5101-1-166.txt
0
0.134896
0.121296
0.017708
0.059259
1010s1121s2001-2s5101-1-166.txt
0
0.777083
0.709259
0.1625
0.351852
1010s1121s2001-2s5101-1-166.txt
0
0.34375
0.855556
0.233333
0.125926
1010s1121s2001-2s5101-1-166.txt
0
0.398958
0.668519
0.09375
0.322222
1010s1121s2001-2s5101-1-166.txt
0
0.519792
0.26412
0.085417
0.368056
1010s1121s2001-2s5101-1-166.txt
0
0.111198
0.287037
0.079688
0.207407
1010s1121s2001-2s5101-1-166.txt
0
0.028874
0.707407
0.051628
0.237037
1010s1121s2001-2s5101-1-166.txt
0
0.825
0.421296
0.108333
0.335185
1010s1121s2001-2s5101-1-166.txt
0
0.529167
0.637037
0.1
0.362963
1010s1121s2001-2s5101-1-166.txt
0
0.097917
0.588889
0.10625
0.42963
1010s1121s2001-2s5101-1-166.txt
0
0.209115
0.707407
0.194271
0.237037
1010s1121s2001-2s5101-1-166.txt
0
0.483333
0.047512
0.095833
0.06331
1010s1121s2001-2s5101-1-166.txt
0
0.011336
0.612963
0.017432
0.077778
1010s1121s2001-2s5101-1-166.txt
0
0.508333
0.048206
0.05
0.063773
1010s1121s2001-2s5101-1-166.txt
0
0.095052
0.366667
0.053646
0.074074
1010s1121s2001-2s5101-1-166.txt
0
0.1875
0.536111
0.104167
0.312963
1010s1121s2001-2s5101-1-166.txt
0
0.19401
0.263426
0.153646
0.25463
1010s1121s2001-2s5101-1-166.txt
0
0.060905
0.451852
0.112565
0.222222
1010s1121s2001-2s5101-1-166.txt
0
0.775
0.250926
0.116667
0.257407
1010s1121s2001-2s5101-1-166.txt
0
0.149479
0.090278
0.051042
0.115741
1010s1121s2001-2s5101-1-166.txt
0
0.414583
0.222917
0.066667
0.31713
1010s1121s2001-2s5101-1-166.txt
0
0.588542
0.544444
0.139583
0.333333
1010s1121s2001-2s5101-1-166.txt
0
0.359375
0.468519
0.114583
0.396296
1010s1121s2001-2s5101-1-166.txt
0
0.739583
0.461111
0.1875
0.196296
1020s1121s2003-1s5001-1-1126.txt
0
0.714583
0.590741
0.1625
0.181481
1020s1121s2003-1s5001-1-1126.txt
0
0.3375
0.341667
0.070833
0.172222
1020s1121s2003-1s5001-1-1126.txt
0
0.567708
0.375
0.164583
0.190741
1020s1121s2003-1s5001-1-1126.txt
0
0.691667
0.258796
0.05
0.171296
1020s1121s2003-1s5001-1-1126.txt
0
0.557292
0.508333
0.077083
0.257407
1020s1121s2003-1s5001-1-1126.txt
0
0.219792
0.72963
0.097917
0.311111
1020s1121s2003-1s5001-1-1126.txt
0
0.295312
0.781481
0.188542
0.274074
1020s1121s2003-1s5001-1-1126.txt
0
0.298438
0.316667
0.065625
0.192593
1020s1121s2003-1s5001-1-1126.txt
0
0.727083
0.812963
0.204167
0.188889
1020s1121s2003-1s5001-1-1126.txt
0
0.683333
0.412037
0.158333
0.168519
1020s1121s2003-1s5001-1-1126.txt
0
0.3375
0.203704
0.0625
0.111111
1020s1121s2003-1s5001-1-1126.txt
0
0.7375
0.659259
0.158333
0.148148
1020s1121s2003-1s5001-1-1126.txt
0
0.429167
0.015387
0.016667
0.033579
1020s1121s2003-1s5001-1-1126.txt
0
0.704167
0.478704
0.15
0.094444
1020s1121s2003-1s5001-1-1126.txt
0
0.40625
0.012028
0.025
0.024787
1050s1132a1110s3003-5s5001-6-211.txt
0
0.090234
0.437037
0.066406
0.22963
1050s1132a1110s3003-5s5001-6-211.txt
0
0.080469
0.468519
0.049479
0.174074
1050s1132a1110s3003-5s5001-6-211.txt
0
0.307292
0.415741
0.097917
0.25
1050s1132a1110s3003-5s5001-6-211.txt
0
0.804167
0.491667
0.075
0.342593
1050s1132a1110s3003-5s5001-6-211.txt
0
0.914583
0.490741
0.079167
0.27037
1050s1132a1110s3003-5s5001-6-211.txt
0
0.152604
0.421296
0.109375
0.312963
1050s1132a1110s3003-5s5001-6-211.txt
0
0.652083
0.399074
0.129167
0.312963
1050s1132a1110s3003-5s5001-6-211.txt
0
0.454167
0.44537
0.091667
0.390741
1060a1000s1110s4001-2s5001-1-196.txt
0
0.585417
0.305556
0.0375
0.07037
1060a1000s1110s4001-2s5001-1-196.txt
0
0.535417
0.47963
0.0625
0.077778
1060a1000s1110s4001-2s5001-1-196.txt
0
0.585417
0.282407
0.029167
0.031482
1060a1000s1110s4001-2s5001-1-196.txt
0
0.632292
0.523148
0.21875
0.612963
1060a1000s1110s4001-2s5001-1-196.txt
0
0.290625
0.381481
0.03125
0.074074
1060a1000s1110s4001-2s5001-1-196.txt
0
0.476042
0.515741
0.01875
0.094444
End of preview. Expand in Data Studio

SAM3 Pseudo-Labels for Pig Monitoring (Based on PigLife)

No Images Included (Copyright Restrictions)

Due to the copyright and licensing restrictions of the original PigLife dataset by UIUC, this repository DOES NOT contain any original images. This dataset provides only the pseudo-labels (annotations) generated by the Segment Anything Model 3 (SAM3) in YOLO format.

To use these annotations, you must legally acquire the original images directly from the official PigLife portal and pair them using our provided structure.

Pre-Trained YOLOv8 Models

If you don't want to train a model from scratch, we have published YOLOv8 models trained on this dataset. Download the Trained Models Here

SAM3 Training Pipeline

Dataset Summary

This repository hosts the official pseudo-labels for our paper:

SAM3-Assisted Training of Lightweight YOLO Models for Precision Pig Farming
Marcos Vinicius Mendes Faria, Thiago Borges Pereira, Isabella C. F. S. Condotta, Thiago Meireles Paixão, and Francisco de Assis Boldt. (2026)
arXiv: arXiv:2605.25860 | GitHub: mvmfaria/sam3-pseudo-label-pig-yolo

This project provides high-quality pseudo-labels for pig detection and segmentation, generated using SAM3 on the widely used PigLife dataset. Since manual annotation of dense livestock environments is prohibitively expensive, we leverage SAM3 to generate robust pseudo-masks and bounding boxes.


How to Reconstruct the Dataset

Since we cannot distribute the images, follow these steps to use our labels:

  1. Download Original Images: Request and download the PigLife dataset from the official PigLife portal.
  2. Download Our Labels: Clone this Hugging Face repository to get the YOLO-format .txt annotation files.
  3. Merge Data: Place the downloaded images in an images/ folder and our labels in a labels/ folder. Ensure the filenames exactly match (e.g., frame_001.jpg needs to match frame_001.txt).

Pipeline: How SAM3 Pseudo-Labels Were Generated

  1. Initial Prompts:
    • Foundation Model: We employed the open-vocabulary Segment Anything Model 3 (facebook/sam3) via Hugging Face transformers evaluated with torch.bfloat16 precision on GPU.
    • Text Prompting: The model was prompted zero-shot using the open-vocabulary text query "pig".
  2. Refinement & Filtering:
    • Confidence Thresholding: Model predictions were post-processed through instance segmentation, filtering detections below a confidence threshold of $\tau = 0.40$ (CONFIDENCE_THRESHOLD = 0.4) to discard uncertain or noisy segmentations.
    • Intermediate COCO Representation: Filtered bounding box coordinates ([x_min, y_min, width, height]), areas, and categories were structured into standard COCO JSON format (instances_train.json, instances_val.json, instances_test.json).
  3. Format Conversion:
    • COCO to YOLO: Using Ultralytics' dataset converter (convert_coco), annotations were converted into normalized YOLO TXT format: <class_id> <x_center> <y_center> <width> <height>.
    • Dataset Organization: Ground-truth files were categorized into respective train/, val/, and test/ splits accompanied by the official dataset.yaml.

Performance Baselines (COCO Metrics)

Object detection performance on the test set comparing models trained on Human Annotations vs. SAM 3 Pseudo-labels, as well as the SAM 3 Zero-shot baseline:

Supervision / Annotation Model Params (M) Inf. Forward (ms) Inf. Pipeline (ms) mAP (50:95) AP₅₀ AP₇₅ AP_M AP_L
Human Annotated YOLOv8n 3.2 5.70 9.29 88.1 98.9 95.7 67.5 89.0
Human Annotated YOLOv8s 11.2 6.10 9.51 90.6 99.0 96.9 72.1 91.4
Human Annotated YOLOv8m 25.9 14.70 15.43 91.7 99.0 97.8 75.2 92.5
SAM 3 Generated (Ours) YOLOv8n 3.2 5.70 10.13 76.7 93.3 86.4 27.8 78.1
SAM 3 Generated (Ours) YOLOv8s 11.2 6.10 10.37 78.7 93.5 87.7 32.1 80.1
SAM 3 Generated (Ours) YOLOv8m 25.9 14.70 16.71 79.4 93.6 88.2 30.6 80.8
Zero-shot Baseline SAM 3 ~850 1197.18 1242.53 80.7 93.6 88.4 26.9 82.4

Key takeaway: Models trained on SAM 3 pseudo-labels retain up to 98.4% of SAM 3's zero-shot detection performance (79.4 vs 80.7 mAP, and identical 93.6% AP₅₀) while reducing latency from ~1,242 ms to 10–16 ms (over 70× – 120× speedup).


Limitations

  • Pseudo-Label Noise: The labels were generated by a foundation model (SAM3), not human experts. Some false positives or missed occluded pigs may exist.
  • No Images: The dataset viewer will only show annotation metadata, not the images themselves.

Citation

If you use these pseudo-labels or models in your research, please cite our paper:

@misc{faria2026sam3assistedtraininglightweightyolo,
      title={SAM3-Assisted Training of Lightweight YOLO Models for Precision Pig Farming}, 
      author={Marcos Vinicius Mendes Faria and Thiago Borges Pereira and Isabella C. F. S. Condotta and Thiago Meireles Paixão and Francisco de Assis Boldt},
      year={2026},
      eprint={2605.25860},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2605.25860}, 
}
Downloads last month
74

Paper for marcosvmf/sam3-piglife-labels