Views
No views yet
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.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.transformers library for object detection tasks.1from transformers import AutoImageProcessor, AutoModelForObjectDetection
2from PIL import Image
3import requests
4import torch
5
6# Load an example image (for illustration, consider using a fisheye image for actual use)
7url = "http://images.cocodataset.org/val2017/000000039769.jpg" # Replace with your fisheye image URL or path
8image = Image.open(requests.get(url, stream=True).raw)
9
10# Load the image processor and model
11image_processor = AutoImageProcessor.from_pretrained("mcity-data-engine/fisheye8k_hustvl_yolos-base")
12model = AutoModelForObjectDetection.from_pretrained("mcity-data-engine/fisheye8k_hustvl_yolos-base")
13
14# Preprocess the image
15inputs = image_processor(images=image, return_tensors="pt")
16
17# Perform inference
18with torch.no_grad():
19 outputs = model(**inputs)
20
21# Post-process the outputs (bounding boxes and class logits)
22target_sizes = torch.tensor([image.size[::-1]])
23results = image_processor.post_process_object_detection(outputs, threshold=0.7, target_sizes=target_sizes)[0]
24
25# Print detected objects
26print(f"Detected objects in the image:")
27for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
28 print(
29 f" - {model.config.id2label[label.item()]} with confidence {round(score.item(), 3)} "
30 f"at bounding box coordinates [x_min, y_min, x_max, y_max]: {box.tolist()}"
31 )Bus, Bike, Car, Pedestrian, and Truck.| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.9357 | 1.0 | 5288 | 2.7182 |
| 1.8095 | 2.0 | 10576 | 2.6559 |
| 1.6565 | 3.0 | 15864 | 2.5114 |
| 1.5912 | 4.0 | 21152 | 2.6875 |
| 1.6169 | 5.0 | 26440 | 2.7796 |
| 1.5075 | 6.0 | 31728 | 2.6514 |
| 1.4073 | 7.0 | 37016 | 2.7649 |
| 1.3617 | 8.0 | 42304 | 2.6653 |
1@article{bogdoll2025mcitydataengine,
2 title={Mcity Data Engine},
3 author={Bogdoll, Daniel and Anata, Rajanikant Patnaik and Stevens, Gregory},
4 journal={GitHub. Note: https://github.com/mcity/mcity_data_engine},
5 year={2025}
6}