File size: 7,072 Bytes
d238266
 
 
 
 
 
 
 
 
 
 
 
 
 
f61d280
 
 
 
 
 
3cfccbc
f61d280
d238266
 
3cfccbc
f61d280
3cfccbc
f61d280
3ee8ada
ebe9320
 
 
d238266
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cf66cbd
d238266
 
 
 
 
 
 
 
 
f61d280
d238266
f61d280
 
8827708
 
d238266
f61d280
d238266
f61d280
 
8827708
f61d280
d238266
 
 
 
 
f61d280
 
 
 
 
 
d238266
3cfccbc
d238266
f61d280
 
 
 
 
991fbda
3cfccbc
991fbda
f61d280
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d238266
f61d280
 
d238266
 
 
 
 
f61d280
d238266
 
 
 
 
f61d280
 
 
 
 
d238266
f61d280
3cfccbc
f61d280
 
 
 
 
 
 
d238266
f61d280
d238266
f61d280
d238266
f61d280
d238266
f61d280
 
 
 
 
 
 
d238266
f61d280
d238266
f61d280
d238266
f61d280
 
 
 
 
d238266
f61d280
d238266
f61d280
 
 
 
 
d238266
991fbda
d238266
f61d280
d238266
f61d280
 
 
 
 
d238266
f61d280
d238266
f61d280
 
 
d238266
f61d280
3cfccbc
f61d280
3cfccbc
f61d280
3cfccbc
 
f61d280
 
 
 
 
 
 
 
 
3cfccbc
d238266
f61d280
d238266
f61d280
d238266
 
 
f61d280
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
---
annotations_creators: []
language: en
license: mit
size_categories:
- n<1K
task_categories:
- image-classification
task_ids: []
pretty_name: bo-dataset
tags:
- fiftyone
- image
- image-classification
- transfer-learning
- vgg16
- binary-classification
- computer-vision
- pets
- dogs
overwrite: true
dataset_summary: 'Binary classification dataset for identifying Bo (Barack Obama''s Portuguese Water Dog) versus other pets. This FiftyOne dataset contains 169 samples and was created for demonstrating transfer learning with VGG16.'
---


# Dataset Card for bo-dataset

This is a [FiftyOne](https://github.com/voxel51/fiftyone) dataset with 169 samples designed for binary classification of Bo (Barack Obama's Portuguese Water Dog) versus other pets.

![Bo Dataset](bo_dataset.png)


## Installation

If you haven't already, install FiftyOne:

```bash
pip install -U fiftyone
```

## Usage

```python
import fiftyone as fo
from fiftyone.utils.huggingface import load_from_hub

# Load the dataset
# Note: other available arguments include 'max_samples', etc
dataset = load_from_hub("Voxel51/bo_or_not")

# Launch the App
session = fo.launch_app(dataset)
```

## Dataset Details

### Dataset Description

This dataset contains images for binary classification between Bo (Barack Obama's Portuguese Water Dog) and other pets (cats and dogs). The dataset was created to demonstrate transfer learning techniques using a pre-trained VGG16 model. Bo was a Portuguese Water Dog who lived in the White House during Barack Obama's presidency.

- **Curated by:** Antonio Rueda-Toicen ([email protected])
- **Language(s):** en
- **License:** MIT
- **Source code to produce the FiftyOne dataset:** [Colab Notebook](https://colab.research.google.com/drive/1XFoKgM_WQ9l2WgK6aS5GLFGc8uv0cdGB)

### Dataset Sources

- **Original Data Source:** [Presidential Doggy Door - Kaggle](https://www.kaggle.com/datasets/drvnmanju/presidential-doggy-door)
- **Tutorial Implementation:** [Google Colab Notebook](https://colab.research.google.com/drive/1XFoKgM_WQ9l2WgK6aS5GLFGc8uv0cdGB)
  - [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1XFoKgM_WQ9l2WgK6aS5GLFGc8uv0cdGB)
- **Alternative Access:** [Google Drive](https://drive.google.com/drive/folders/1EU1ujeNtvsaKAIeyS7J8BDFC60iHvwi1?usp=drive_link)

## Uses

### Direct Use

This dataset is intended for:
- Binary image classification tasks
- Transfer learning demonstrations
- Computer vision education and tutorials
- Experimenting with pre-trained models like VGG16
- Learning FiftyOne dataset management and visualization

### Out-of-Scope Use

This dataset should not be used for:
- Production security systems
- Real-world pet identification systems
- Commercial applications without proper validation
- Any application requiring high accuracy pet identification

## Dataset Structure

The dataset contains 169 images split across three sets:
- **Training set:** 50% of original training data
- **Validation set:** 50% of original training data  
- **Test set:** Independent test images

### Data Fields

- `filepath`: Path to the image file
- `ground_truth`: Classification label ("bo" or "not_bo")
- `tags`: Dataset split indicators ("train", "validation", "test")
- `vgg16-imagenet-predictions`: Original VGG16 ImageNet predictions
- `vgg16-imagenet-embeddings`: Feature embeddings from VGG16
- `fine_tuned_vgg16_prediction`: Fine-tuned model predictions (test set only)

### Label Distribution

- **bo**: Images of Bo (Barack Obama's Portuguese Water Dog)
- **not_bo**: Images of other pets (cats and dogs)

## Dataset Creation

### Curation Rationale

This dataset was created to demonstrate transfer learning concepts using a real-world scenario where a computer vision system needs to identify a specific individual (Bo) among other similar animals. The task simulates a security application while providing an engaging educational example.

### Source Data

#### Data Collection and Processing

The images were collected and organized into a binary classification structure:
- Images of Bo were labeled as "bo"
- Images of other pets (cats and dogs) were labeled as "not_bo"
- Data was split into training/validation and test sets
- Images were processed using standard computer vision preprocessing techniques

#### Data Augmentation

The training process includes augmentation techniques:
- Affine transformations (translation, scaling, rotation)
- Elastic deformations
- Perspective transformations
- Horizontal flipping
- Brightness and contrast adjustments
- Random grayscale conversion

#### Who are the source data producers?

The dataset was curated by Antonio Rueda-Toicen for educational purposes as part of FiftyOne documentation and tutorials.

### Model Training Details

The dataset includes results from transfer learning using:
- **Base Model:** VGG16 pre-trained on ImageNet
- **Architecture Modification:** Replaced final classifier for binary classification
- **Training Strategy:** Froze base VGG16 layers, trained only new classifier layers
- **Loss Function:** Binary Cross Entropy with Logits
- **Optimizer:** Adam (lr=0.003)
- **Training Epochs:** 10 epochs with early stopping

## Technical Implementation

### Preprocessing Pipeline

Images are processed using:
- Conversion to RGB format
- Resizing to 256x256 pixels
- Center cropping to 224x224 pixels
- Normalization with ImageNet statistics (mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])

### Evaluation Metrics

The model performance is evaluated using:
- Binary classification accuracy
- Confusion matrix
- Per-class precision and recall
- FiftyOne's built-in evaluation tools

## Bias, Risks, and Limitations

### Limitations

- Small dataset size (169 samples) limits generalization
- Limited to specific breeds and individuals
- May not generalize to other Portuguese Water Dogs
- Training data may not represent full diversity of pet appearances
- Designed for educational purposes, not production use

### Potential Biases

- Dataset may be biased toward specific lighting conditions, angles, or image quality
- Limited representation of pet diversity
- Potential overfitting due to small dataset size

### Recommendations

Users should be aware that this dataset is primarily educational and should not be used for production applications without significant additional validation and testing. The small size makes it unsuitable for robust real-world applications.

## Citation

**BibTeX:**
```bibtex
@misc{rueda_toicen_2024_bo_dataset,
  author = {Rueda-Toicen, Antonio},
  title = {Bo or Not Bo: Binary Classification with Transfer Learning},
  year = {2024},
  url = {https://colab.research.google.com/drive/1XFoKgM_WQ9l2WgK6aS5GLFGc8uv0cdGB},
  note = {FiftyOne educational dataset}
}
```


## Dataset Card Authors

Antonio Rueda-Toicen ([email protected])

## Dataset Card Contact

For questions about this dataset, please contact Antonio Rueda-Toicen at [email protected] or visit the [FiftyOne documentation](https://docs.voxel51.com/).