Datasets:
File size: 8,567 Bytes
d5265eb 02dc1a8 d5265eb 2dd9b82 b18bb92 5551de4 82e9e63 3881ca9 0e199a3 2bebb3d a571127 460ad73 2bebb3d a571127 f4815d7 4bf0b15 f4815d7 a571127 2bebb3d a571127 2bebb3d 88e35b7 2bebb3d 2615ff3 2bebb3d a571127 82e9e63 2bebb3d 891775c 460ad73 891775c 460ad73 82e9e63 7b6d8b6 82e9e63 2bebb3d 82e9e63 acdbd32 460ad73 acdbd32 5f0259e acdbd32 82e9e63 2bebb3d d31dfd2 2bebb3d 82e9e63 b18bb92 | 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 | ---
tags:
- object-detection
- computer-vision
- images
- COCO-format
- medical
- eyes
annotations_creators:
- expert-annotation
- Roboflow
license: cc-by-nc-sa-4.0
task_categories:
- object-detection
language:
- en
- it
pretty_name: Accurate Eyes Detection Dataset
size_categories:
- 10K<n<100K
source_datasets:
- Roboflow Datasets
task_ids:
- face-detection
dataset_info:
- dataset_info.json
---
# <span style="font-size: 2.5em; font-weight: bold;">Accurate Eyes Detection Dataset</span>
# <span style="font-size: 1.5em; font-weight: bold;">Dataset Description</span>
This COCO dataset is designed for real-time "precise eye detection" task under various conditions. It contains highly accurate bounding box annotations, manually retraced with **Roboflow** to ensure maximum precision.
## **Dataset Splits**
This dataset is intentionally provided as a **single training split** containing all 72,317 examples. This design choice allows researchers to:
- Create custom split ratios tailored to their specific needs.
- Ensure different random seeds don't lead to overlapping examples between studies.
- Implement cross-validation strategies more flexibly.
You are responsible for creating appropriate validation and test splits using the provided training data. We recommend using 70-80% for training, 10-15% for validation, and 10-15% for testing, depending on your requirements.
# <span style="font-size: 1.5em; font-weight: bold;">Key features</span>
- 72,317 high-resolution images (640×640 pixels, JPG format) featuring close-up eyes, people's faces, and real-life scenes with varying complexity and number of faces.
- All bounding boxes have been **completely re-annotated manually** with **Roboflow** to ensure maximum accuracy.
- Annotations provided in **ready-to-use COCO format** for easy integration with most object detection frameworks.
- **Single Training Split:** The dataset is provided as a single training split to allow maximum flexibility in creating custom train/validation/test splits for different research needs.
- <u>Various Image acquisition conditions</u>:
- Single person (1 or 2 eyes), whole people, groups, ...
- Open and closed eyes.
- Diversity of lighting and poses.
# <span style="font-size: 1.5em; font-weight: bold;">Repository File Structure</span>
The repository contains the following files. The standard structure for a COCO dataset on Hugging Face is automatically created when loaded.
```text
Eyes-Detection/
├── README.md # This dataset card
├── dataset_info.json # Dataset metadata for Hugging Face
├── annotations.coco.json # Annotations in COCO format
├── images.zip # All images in a single compressed archive
├── README.dataset.txt # Marginal info
└── LICENSE # The CC BY-NC-SA 4.0 license file
```
# <span style="font-size: 1.5em; font-weight: bold;">Loading the Dataset with Hugging Face 🤗</span>
This dataset is in COCO format and can be easily loaded using the <u>datasets library</u> distributed by HuggingFace.
**Important Notes:**
- **Single Split:** This dataset contains only a **training split** (`train`). You will need to create your own validation and test splits programmatically.
- **Images:** The images are provided in a compressed ZIP file (`images.zip`).
- **Automatic Extraction:** The `load_dataset` function will automatically extract images from the `images.zip` file.
## **Example Code**:
```python
from datasets import load_dataset
from sklearn.model_selection import train_test_split
import numpy as np
# Load the entire dataset as the training split
dataset = load_dataset("AndreaPorri/Eyes-Detection")
full_train_dataset = dataset['train'] # This contains all 72,317 examples
# It is NECESSARY to create a three-part division (training/validation/testing, to obtain and verify results reliably) and keep the test set completely separate from other data during model development and hyperparameter tuning.
# First split: 80% train, 20% temp (for val+test)
first_split = full_train_dataset.train_test_split(test_size=0.2, seed=42)
# Second split: split temp into 50% validation, 50% test (10% each of total)
second_split = first_split['test'].train_test_split(test_size=0.5, seed=42)
final_dataset = {
'train': first_split['train'],
'validation': second_split['train'],
'test': second_split['test']
}
```
**Note**: When using <u>load_dataset</u>, the extracted images will be cached in the ~/.cache/huggingface/datasets directory, creating the standard folder structure expected by the **COCO loader**.
## **For Advanced Usage (Manual Extraction or COCO Tools):**
If you prefer to handle the extraction manually or use the annotations directly with other libraries:
1. <u>Manual Extraction</u>:
Download and extract images.zip to a folder. You can then use the data_dir parameter:
```python
dataset = load_dataset("AndreaPorri/Eyes-Detection", data_dir="path/to/extracted_images")
```
2. <u>Using COCO Annotations Directly</u>:
The annotations.coco.json file follows the standard COCO format and can be used with libraries like torchvision or pycocotools.
```python
from torchvision.datasets import CocoDetection
import torchvision.transforms as transforms
coco_dataset = CocoDetection(
root='path/to/extracted_images',
annFile='path/to/annotations.coco.json',
transform=transforms.ToTensor()
)
```
# <span style="font-size: 1.5em; font-weight: bold;">Preprocessing e Augmentation applied</span>
1. **<u>Preprocessing</u>**:
- Auto-orientation (with EXIF orientation stripping).
- Resize to 640x640 (Stretch).
2. **<u>Data Augmentation</u>** (create 7 versions for each image):
- Random crop: 0-30% of the image.
- Random rotation: ±15 degrees.
- Random shear: ±15° horizontal/vertical.
- Brightness adjustment: ±25%.
- Exposure adjustment: ±15%.
- Gaussian blur: up to 1.2px.
- Salt and pepper noise: 0.3% of pixels.
- Cutout: 7 boxes, each with a size of 2%.
# <span style="font-size: 1.5em; font-weight: bold;">Original Datasets of Origin</span>
This dataset was created based on:
1. **EyeCon Dataset** - https://app.roboflow.com/andreap/eyecon-eaux0-oykgj/1
2. **Eyes Detection Dataset** - https://app.roboflow.com/andreap/eyes_detection-bupne/1
# <span style="font-size: 1.5em; font-weight: bold;">Expected Uses</span>
- Real-time eye detection.
- Part of an Eye-Tracking pipeline for computer vision applications.
- Academic research.
- Research for medical applications.
# <span style="font-size: 1.5em; font-weight: bold;">Limitations and Ethical Considerations</span>
- The dataset contains <u>images of faces</u>.
- Use permitted <u>only for non-commercial purposes</u>.
- It is the user's responsibility to ensure ethical use in compliance with privacy laws.
# <span style="font-size: 1.5em; font-weight: bold;">License - CC BY-NC-SA 4.0</span>
1. **<u>What you can do</u>**:
- Share - copy and redistribute the material.
- Adapt - remix, transform, and create derivative works.
- Use for research, study, and non-commercial projects.
2. **<u>Mandatory conditions</u>**:
- Attribution - You must give appropriate credit, provide a link to the license, and indicate if changes were made.
- NonCommercial - You may not use the material for commercial purposes.
- ShareAlike - If you remix, transform, or create derivative works, you must distribute your contributions under the **same license** as the original.
3. **<u>Example of attribution</u>**:
"Accurate Eyes Detection Dataset" by AndreaPorri is licensed under CC BY-NC-SA 4.0
Dataset source: https://huggingface.co/datasets/AndreaPorri/Eyes-Detection
# <span style="font-size: 1.5em; font-weight: bold;">Disclaimer</span>
The user is responsible for the ethical and legal use of this dataset. <u>The creator assumes no responsibility for any improper use</u>.
# <span style="font-size: 1.5em; font-weight: bold;">Contacts</span>
For questions or additional information:
- Email: andrea.porri@student.unisi.it
# <span style="font-size: 1.5em; font-weight: bold;">Citation</span>
If you use this dataset in your research, please cite it as:
```bibtex
@dataset{accurate_eyes_detection_2025,
author = {Andrea Porri},
title = {Accurate Eyes Detection Dataset},
year = {2025},
publisher = {Hugging Face},
version = {2.0},
license = {CC BY-NC-SA 4.0},
url = {https://huggingface.co/datasets/AndreaPorri/Eyes-Detection}
} |