File size: 6,641 Bytes
f92b908
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0636406
 
7b40ca3
 
 
0636406
 
 
 
 
 
c04a8aa
0636406
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
434c27d
0636406
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3f3b7d7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
---
tags:
- yolov8n
- object-detection
- computer-vision
- rubber-duck-detection
- hackathon
library_name: yolov8
base_model: ultralytics/yolov8n
datasets:
- Norod78/Rubber-Duck-blip-captions
- linoyts/rubber_ducks
model-index:
- name: YOLOv8n Rubber Duck Detection
  results:
  - task:
      type: object-detection
    dataset:
      name: Custom Rubber Duck Dataset
      type: custom
    metrics:
    - name: Precision
      type: precision
      value: 0.523
    - name: Recall
      type: recall
      value: 0.638
    - name: mAP50
      type: mAP
      value: 0.598
language:
- en
---

# Model Card for YOLOv8n Rubber Duck Detection

NOTE: I DO NOT RECOMMEND USING THIS MODEL AT THIS TIME there is an open discussion around licensing related to the data.  
See [related licensing discussion on the forum](https://discuss.huggingface.co/t/use-of-unlicensed-hf-datasets/138189)

This model is a fine-tuned version of YOLOv8n specifically optimized for rubber duck detection. It was developed after inspiration to improve rubber duck detection on a course setup for the [HackerBot Industries HB 0x01 hackathon](https://www.hackerbot.co/) with the specific goal of detecting coordinates for rubber ducks in live video feeds. 
  
Actual inference time on an RaspberryPi 5 was around 330ms, though the entire process took much longer. More evaluation is necessary to determine if the time to respond is due to other limitations or if a smaller model is justified. 
  
In any case, initial results suggest that this model could enable more accurate navigation within the hackathon course through improved duck location detection capabilities. 

**Demo:** [Rubber Duck Detection Demo Space](https://huggingface.co/spaces/brainwavecollective/duck-duck-go)

## Model Details

### Model Description

- **Developed by:** Daniel Ritchie 
- **Model type:** YOLOv8n (object detection)
- **Language(s):** Python (Computer Vision)
- **License:** MIT
- **Finetuned from model:** YOLOv8n 

### Model Sources
- **Base Model:** [YOLOv8n.pt](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt)
- **Original Datasets:** 
  - [Rubber-Duck-blip-captions](https://huggingface.co/datasets/Norod78/Rubber-Duck-blip-captions) by Norod78
  - [rubber_ducks](https://huggingface.co/datasets/linoyts/rubber_ducks) by linoyts
  

## Uses

### Direct Use
The model is specifically designed for detecting rubber ducks and providing their coordinates. It was developed for a very specific use case within a hackathon context. The teddy bear class was used as a starting point, and was specifically chosen due to its tendency to over-identify objects, which provided a good foundation for detecting rubber ducks. Note that we falesly labelled the ducks as teddy bears and change the class label at inference time. The model does not support any other classes.

### Out-of-Scope Use
This model should not be used for:
- General object detection
- Production environments
- Safety-critical systems
- Any application requiring reliable teddy bear detection (as the original class was modified)

## Bias, Risks, and Limitations

- The model is intentionally overfit to a specific use case
- Increased false positive rate for duck detection
- Modified teddy bear class may no longer reliably detect teddy bears
- Limited to the specific context and image conditions present in the training data
- Not suitable for general-purpose object detection

### Recommendations
Users should be aware that this is a specialized model created for a specific hackathon use case. It should not be used in production environments or for general object detection tasks.

## Evaluation

### Results
The model demonstrated significant improvement during training, as shown in the comparison below:

| Metric    | Initial Performance | Final Performance |
|-----------|-------------------|------------------|
| Precision | 0.006 | 0.523 |
| Recall    | 0.812 | 0.638 |
| mAP50     | 0.089 | 0.598 |
| mAP50-95  | 0.057 | 0.499 |

Initially, the model would enthusiastically label almost anything as a duck (teddy bear), while only finding a few actual ducks - infrequently being correct when it claimed to have found a duck. The improved model is much more discerning: now, when it says it's found a duck, it's more likely to have actually identified a duck. While this training approach reduced overall sensitivity to duck detection, testing in our specific deployment environment showed improved recall under specific circumstances, suggesting better alignment with real-world conditions. This increased reliability, combined with better accuracy in placing bounding boxes around actual ducks, makes the final model much more practical for real-world use. When used in a controlled environmnet the incrase in accuraccy may be offset by the decrease in recall, though environment-specific data would certainly be helpful. Adjustments to hyperparameters provided a wide range of outcomes suggesting significant potential for additional improvement.
### Model Statistics
- Layers: 168
- Parameters: 3,005,843
- GFLOPs: 8.1

## Training Details

### Training Data
The training data was derived from two Hugging Face datasets:
1. [Norod78/Rubber-Duck-blip-captions](https://huggingface.co/datasets/Norod78/Rubber-Duck-blip-captions)
2. [linoyts/rubber_ducks](https://huggingface.co/datasets/linoyts/rubber_ducks)

Data preparation process:
1. Existing labels were stripped
2. Initial automated annotation was performed using YOLOv8x's teddy bear class, but much was left to be desired
3. Manual verification and correction of bounding boxes was performed using CVAT (Computer Vision Annotation Tool)

### Training Procedure

#### Hardware Specifications
- **GPU:** NVIDIA A6000
- **Configuration:** 6 CPU, 48GB RAM/VRAM

## Environmental Impact

Hardware Type: RTX A6000
Hours used: 4 (annotations < 2 minutes, actual training < 10 minutes)
Cloud Provider: IMWT
Compute Region: US Central
Carbon Emitted: 0.5 kg of CO2eq

## Technical Specifications

### Model Architecture and Objective
- Base Architecture: YOLOv8n
- Task: Object Detection
- Specific Focus: Rubber duck detection through modification of teddy bear class

### Compute Infrastructure

#### Hardware
- Single NVIDIA A6000 GPU
- Used for both:
  - Initial automated annotation
  - Model training

## Model Card Contact
For more information about this model, please [contact Daniel by email](https://brainwavecollective.ai/~email-daniel?utm_source=hf&utm_campaign=duckcard) or message the Brain Wave Collective through the [website form](https://brainwavecollective.ai/~form?utm_source=hf&utm_campaign=duckcard).