Instructions to use mcity-data-engine/fisheye8k_hustvl_yolos-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mcity-data-engine/fisheye8k_hustvl_yolos-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("object-detection", model="mcity-data-engine/fisheye8k_hustvl_yolos-base")# Load model directly from transformers import AutoImageProcessor, AutoModelForObjectDetection processor = AutoImageProcessor.from_pretrained("mcity-data-engine/fisheye8k_hustvl_yolos-base") model = AutoModelForObjectDetection.from_pretrained("mcity-data-engine/fisheye8k_hustvl_yolos-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Improve model card: Add pipeline tag, detailed description, and usage
#3
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,36 +1,82 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
license: apache-2.0
|
| 4 |
-
base_model: hustvl/yolos-base
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
-
datasets:
|
| 8 |
-
- Voxel51/fisheye8k
|
| 9 |
model-index:
|
| 10 |
- name: fisheye8k_hustvl_yolos-base
|
| 11 |
results: []
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
-
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 15 |
-
should probably proofread and complete it, then remove this comment. -->
|
| 16 |
-
|
| 17 |
# fisheye8k_hustvl_yolos-base
|
| 18 |
|
| 19 |
-
This model is a fine-tuned version of [hustvl/yolos-base](https://huggingface.co/hustvl/yolos-base)
|
|
|
|
| 20 |
It achieves the following results on the evaluation set:
|
| 21 |
- Loss: 2.6653
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
## Model description
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
## Intended uses & limitations
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
## Training and evaluation data
|
| 32 |
|
| 33 |
-
|
| 34 |
|
| 35 |
## Training procedure
|
| 36 |
|
|
@@ -48,17 +94,16 @@ The following hyperparameters were used during training:
|
|
| 48 |
|
| 49 |
### Training results
|
| 50 |
|
| 51 |
-
| Training Loss | Epoch | Step
|
| 52 |
-
|:-------------:|:-----:|:----
|
| 53 |
-
| 1.9357
|
| 54 |
-
| 1.8095
|
| 55 |
-
| 1.6565
|
| 56 |
-
| 1.5912
|
| 57 |
-
| 1.6169
|
| 58 |
-
| 1.5075
|
| 59 |
-
| 1.4073
|
| 60 |
-
| 1.3617
|
| 61 |
-
|
| 62 |
|
| 63 |
### Framework versions
|
| 64 |
|
|
@@ -67,4 +112,15 @@ The following hyperparameters were used during training:
|
|
| 67 |
- Datasets 3.2.0
|
| 68 |
- Tokenizers 0.21.0
|
| 69 |
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: hustvl/yolos-base
|
| 3 |
+
datasets:
|
| 4 |
+
- Voxel51/fisheye8k
|
| 5 |
library_name: transformers
|
| 6 |
license: apache-2.0
|
|
|
|
| 7 |
tags:
|
| 8 |
- generated_from_trainer
|
|
|
|
|
|
|
| 9 |
model-index:
|
| 10 |
- name: fisheye8k_hustvl_yolos-base
|
| 11 |
results: []
|
| 12 |
+
pipeline_tag: object-detection
|
| 13 |
---
|
| 14 |
|
|
|
|
|
|
|
|
|
|
| 15 |
# fisheye8k_hustvl_yolos-base
|
| 16 |
|
| 17 |
+
This model is a fine-tuned version of [hustvl/yolos-base](https://huggingface.co/hustvl/yolos-base) for object detection, specifically adapted for intelligent transportation systems. It was developed as part of the [Mcity Data Engine](https://github.com/mcity/mcity_data_engine) project, presented in the paper [Mcity Data Engine: Iterative Model Improvement Through Open-Vocabulary Data Selection](https://huggingface.co/papers/2504.21614).
|
| 18 |
+
|
| 19 |
It achieves the following results on the evaluation set:
|
| 20 |
- Loss: 2.6653
|
| 21 |
|
| 22 |
+
## Paper
|
| 23 |
+
This model was presented in the paper [Mcity Data Engine: Iterative Model Improvement Through Open-Vocabulary Data Selection](https://huggingface.co/papers/2504.21614).
|
| 24 |
+
|
| 25 |
+
## Project Page & Code
|
| 26 |
+
- Project Page: [https://mcity.github.io/mcity_data_engine/](https://mcity.github.io/mcity_data_engine/)
|
| 27 |
+
- GitHub Repository: [https://github.com/mcity/mcity_data_engine](https://github.com/mcity/mcity_data_engine)
|
| 28 |
+
|
| 29 |
## Model description
|
| 30 |
|
| 31 |
+
The `fisheye8k_hustvl_yolos-base` model leverages the YOLOS (You Only Look at One Sequence) architecture, a vision transformer for object detection. This model has been specifically fine-tuned on the Fisheye8K dataset to enhance the detection of vehicles (Bus, Bike, Car, Truck) and pedestrians from fisheye camera imagery, which is common in intelligent transportation systems. Its development focuses on improving performance for rare and novel classes through an open-vocabulary data selection process within the Mcity Data Engine framework.
|
| 32 |
|
| 33 |
## Intended uses & limitations
|
| 34 |
|
| 35 |
+
This model is intended for object detection in contexts related to Intelligent Transportation Systems (ITS), particularly with fisheye camera data. It is optimized for detecting road users such as `Bus`, `Bike`, `Car`, `Pedestrian`, and `Truck`. Its application is primarily within the iterative data selection and model training processes facilitated by the Mcity Data Engine to identify long-tail classes of interest.
|
| 36 |
+
|
| 37 |
+
Limitations: The model's performance might be optimized for specific fisheye camera distortions and may not generalize directly to standard camera views without further fine-tuning. Users should be aware that the model's performance on very rare or highly out-of-distribution classes is subject to the continuous data curation and model refinement strategies employed by the Mcity Data Engine.
|
| 38 |
+
|
| 39 |
+
## How to use
|
| 40 |
+
|
| 41 |
+
You can use this model directly with the Hugging Face `transformers` library for object detection tasks.
|
| 42 |
+
|
| 43 |
+
```python
|
| 44 |
+
from transformers import AutoImageProcessor, AutoModelForObjectDetection
|
| 45 |
+
from PIL import Image
|
| 46 |
+
import requests
|
| 47 |
+
import torch
|
| 48 |
+
|
| 49 |
+
# Load an example image (for illustration, consider using a fisheye image for actual use)
|
| 50 |
+
url = "http://images.cocodataset.org/val2017/000000039769.jpg" # Replace with your fisheye image URL or path
|
| 51 |
+
image = Image.open(requests.get(url, stream=True).raw)
|
| 52 |
+
|
| 53 |
+
# Load the image processor and model
|
| 54 |
+
image_processor = AutoImageProcessor.from_pretrained("mcity-data-engine/fisheye8k_hustvl_yolos-base")
|
| 55 |
+
model = AutoModelForObjectDetection.from_pretrained("mcity-data-engine/fisheye8k_hustvl_yolos-base")
|
| 56 |
+
|
| 57 |
+
# Preprocess the image
|
| 58 |
+
inputs = image_processor(images=image, return_tensors="pt")
|
| 59 |
+
|
| 60 |
+
# Perform inference
|
| 61 |
+
with torch.no_grad():
|
| 62 |
+
outputs = model(**inputs)
|
| 63 |
+
|
| 64 |
+
# Post-process the outputs (bounding boxes and class logits)
|
| 65 |
+
target_sizes = torch.tensor([image.size[::-1]])
|
| 66 |
+
results = image_processor.post_process_object_detection(outputs, threshold=0.7, target_sizes=target_sizes)[0]
|
| 67 |
+
|
| 68 |
+
# Print detected objects
|
| 69 |
+
print(f"Detected objects in the image:")
|
| 70 |
+
for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
|
| 71 |
+
print(
|
| 72 |
+
f" - {model.config.id2label[label.item()]} with confidence {round(score.item(), 3)} "
|
| 73 |
+
f"at bounding box coordinates [x_min, y_min, x_max, y_max]: {box.tolist()}"
|
| 74 |
+
)
|
| 75 |
+
```
|
| 76 |
|
| 77 |
## Training and evaluation data
|
| 78 |
|
| 79 |
+
This model was fine-tuned on the [Voxel51/fisheye8k](https://huggingface.co/datasets/Voxel51/fisheye8k) dataset. This dataset is a crucial component of the iterative model improvement process facilitated by the Mcity Data Engine, focusing on ITS-relevant objects. The specific classes detected by this model are: `Bus`, `Bike`, `Car`, `Pedestrian`, and `Truck`.
|
| 80 |
|
| 81 |
## Training procedure
|
| 82 |
|
|
|
|
| 94 |
|
| 95 |
### Training results
|
| 96 |
|
| 97 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
| 98 |
+
|:-------------:|:-----:|:----:|:---------------:|
|
| 99 |
+
| 1.9357 | 1.0 | 5288 | 2.7182 |
|
| 100 |
+
| 1.8095 | 2.0 | 10576 | 2.6559 |
|
| 101 |
+
| 1.6565 | 3.0 | 15864 | 2.5114 |
|
| 102 |
+
| 1.5912 | 4.0 | 21152 | 2.6875 |
|
| 103 |
+
| 1.6169 | 5.0 | 26440 | 2.7796 |
|
| 104 |
+
| 1.5075 | 6.0 | 31728 | 2.6514 |
|
| 105 |
+
| 1.4073 | 7.0 | 37016 | 2.7649 |
|
| 106 |
+
| 1.3617 | 8.0 | 42304 | 2.6653 |
|
|
|
|
| 107 |
|
| 108 |
### Framework versions
|
| 109 |
|
|
|
|
| 112 |
- Datasets 3.2.0
|
| 113 |
- Tokenizers 0.21.0
|
| 114 |
|
| 115 |
+
## Citation
|
| 116 |
+
|
| 117 |
+
If you use the Mcity Data Engine in your research, feel free to cite the project:
|
| 118 |
+
|
| 119 |
+
```bibtex
|
| 120 |
+
@article{bogdoll2025mcitydataengine,
|
| 121 |
+
title={Mcity Data Engine},
|
| 122 |
+
author={Bogdoll, Daniel and Anata, Rajanikant Patnaik and Stevens, Gregory},
|
| 123 |
+
journal={GitHub. Note: https://github.com/mcity/mcity_data_engine},
|
| 124 |
+
year={2025}
|
| 125 |
+
}
|
| 126 |
+
```
|