AndreaPorri commited on
Commit
2bebb3d
·
verified ·
1 Parent(s): 3881ca9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +92 -30
README.md CHANGED
@@ -11,35 +11,86 @@
11
  -----------------------------------------------------------------------
12
 
13
 
14
- # **Dataset Description**
15
  # <span style="font-size: 1.5em; font-weight: bold;">Dataset Description</span>
16
- This COCO dataset is designed for real-time "precise eye detection" under various conditions. It contains highly accurate bounding box annotations, manually retraced to ensure maximum precision.
 
 
17
 
 
 
 
 
 
18
 
19
- # **Loading the Dataset with Hugging Face 🤗**
20
- This dataset is in COCO format and can be easily loaded using the <u>datasets library</u> distributed by HuggingFace.
21
 
22
- **Important Note on Images**:
23
- The images are provided in a compressed <u>ZIP file</u> (**images.zip**). The load_dataset function will automatically handle the extraction for you. You do not need to extract them manually.
24
 
25
- ## **Example Code**:
26
- from datasets import load_dataset
27
- \# Load the dataset (automatically extracts images from the zip file)
28
- dataset = load_dataset("AndreaPorri/Eyes-Detection")
29
 
30
- \# You can now access the training split
31
- train_dataset = dataset['train']
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
 
34
- ## **Key features**
35
  - 72,317 images of close-up eyes, people's faces, and real-life scenes.
36
  - All bounding boxes have been **completely re-annotated manually** on Roboflow to ensure maximum accuracy.
 
 
37
  - <u>Various Image acquisition conditions</u>:
38
  - Single person (1 or 2 eyes), whole people, groups, ...
39
  - Open and closed eyes.
40
  - Diversity of lighting and poses.
41
 
42
- ## **Preprocessing e Augmentation applied**
 
43
 
44
  1. **<u>Preprocessing</u>**:
45
  - Auto-orientation (with EXIF orientation stripping)
@@ -56,17 +107,22 @@ train_dataset = dataset['train']
56
  - Cutout: 7 boxes, each with a size of 2%
57
 
58
 
59
- ## **Dataset Structures**
60
- Eyes-Detection dataset/
61
- ├── README.md
62
- ├── Images
63
- ├── annotations.json
64
- ├── dataset_info.json
65
- ├── README.dataset.txt
66
- ├── LICENSE
 
 
 
 
 
67
 
68
 
69
- ## **License - CC BY-NC-SA 4.0**
70
 
71
  1. **<u>What you can do</u>**:
72
  - Share - copy and redistribute the material
@@ -82,30 +138,36 @@ Eyes-Detection dataset/
82
  "Accurate Eyes Detection Dataset" by AndreaPorri is licensed under CC BY-NC-SA 4.0
83
  Dataset source: https://huggingface.co/datasets/AndreaPorri/Eyes-Detection
84
 
85
- ## **Expected Uses**
 
86
  - Real-time eye detection.
87
  - Part of an Eye-Tracking pipeline for computer vision applications.
88
  - Academic research.
89
  - Research for medical applications.
90
 
91
- ## **Limitations and Ethical Considerations**
 
92
  - The dataset contains <u>images of faces</u>
93
  - Use permitted <u>only for non-commercial purposes</u>
94
  - It is the user's responsibility to ensure ethical use in compliance with privacy laws.
95
 
96
- ## **Original Datasets of Origin**
 
97
  This dataset was created based on:
98
  1. **EyeCon Dataset** - https://app.roboflow.com/andreap/eyecon-eaux0-oykgj/1
99
  2. **Eyes Detection Dataset** - https://app.roboflow.com/andreap/eyes_detection-bupne/1
100
 
101
- ## **Disclaimer**
102
- The user is responsible for the ethical and legal use of this dataset. The creator assumes no responsibility for any improper use.
103
 
104
- ## **Contacts**
 
 
 
 
105
  For questions or additional information:
106
  - Email: andrea.porri@student.unisi.it
107
 
108
- ## **Citazione**
 
109
  If you use this dataset in your research, please cite it as:
110
 
111
  ```bibtex
 
11
  -----------------------------------------------------------------------
12
 
13
 
 
14
  # <span style="font-size: 1.5em; font-weight: bold;">Dataset Description</span>
15
+ This COCO dataset is designed for real-time "precise eye detection" under various conditions. It contains highly accurate bounding box annotations, manually retraced to ensure maximum precision.
16
+ ## **Dataset Splits**
17
+ This dataset is intentionally provided as a **single training split** containing all 72,317 examples. This design choice allows researchers to:
18
 
19
+ - Create custom split ratios tailored to their specific needs
20
+ - Ensure different random seeds don't lead to overlapping examples between studies
21
+ - Implement cross-validation strategies more flexibly
22
+
23
+ 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.
24
 
 
 
25
 
 
 
26
 
27
+ # <span style="font-size: 1.5em; font-weight: bold;">Loading the Dataset with Hugging Face 🤗</span>
28
+ This dataset is in COCO format and can be easily loaded using the <u>datasets library</u> distributed by HuggingFace.
 
 
29
 
30
+ **Important Notes:**
31
+ - **Single Split:** This dataset contains only a **training split** (`train`). You will need to create your own validation and test splits programmatically.
32
+ - **Images:** The images are provided in a compressed ZIP file (`images.zip`). The `load_dataset` function will automatically handle the extraction for you.
33
+
34
+ ## **Example Code**:
35
+ ```python
36
+ from datasets import load_dataset
37
+ from sklearn.model_selection import train_test_split
38
+ import numpy as np
39
+
40
+ # Load the entire dataset as the training split
41
+ dataset = load_dataset("AndreaPorri/Eyes-Detection")
42
+ full_train_dataset = dataset['train'] # This contains all 72,317 examples
43
+
44
+ # 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.
45
+ # First split: 80% train, 20% temp (for val+test)
46
+ first_split = full_train_dataset.train_test_split(test_size=0.2, seed=42)
47
+
48
+ # Second split: split temp into 50% validation, 50% test (10% each of total)
49
+ second_split = first_split['test'].train_test_split(test_size=0.5, seed=42)
50
+
51
+ final_dataset = {
52
+ 'train': first_split['train'],
53
+ 'validation': second_split['train'],
54
+ 'test': second_split['test']
55
+ }
56
+
57
+ ```
58
+
59
+ **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**.
60
+
61
+ ## **For Advanced Usage (Manual Extraction or COCO Tools):**
62
+ If you prefer to handle the extraction manually or use the annotations directly with other libraries:
63
+ 1. <u>Manual Extraction</u>:
64
+ Download and extract images.zip to a folder. You can then use the data_dir parameter:
65
+ ```python
66
+ dataset = load_dataset("AndreaPorri/Eyes-Detection", data_dir="path/to/extracted_images")
67
+ ```
68
+ 2. <u>Using COCO Annotations Directly</u>:
69
+ The annotations.coco.json file follows the standard COCO format and can be used with libraries like torchvision or pycocotools.
70
+ ```python
71
+ from torchvision.datasets import CocoDetection
72
+ import torchvision.transforms as transforms
73
+
74
+ coco_dataset = CocoDetection(
75
+ root='path/to/extracted_images',
76
+ annFile='path/to/annotations.coco.json',
77
+ transform=transforms.ToTensor()
78
+ )
79
+ ```
80
 
81
 
82
+ # <span style="font-size: 1.5em; font-weight: bold;">Key features</span>
83
  - 72,317 images of close-up eyes, people's faces, and real-life scenes.
84
  - All bounding boxes have been **completely re-annotated manually** on Roboflow to ensure maximum accuracy.
85
+ - Annotations provided in ready-to-use COCO format for easy integration with most object detection frameworks.
86
+ - **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.
87
  - <u>Various Image acquisition conditions</u>:
88
  - Single person (1 or 2 eyes), whole people, groups, ...
89
  - Open and closed eyes.
90
  - Diversity of lighting and poses.
91
 
92
+
93
+ # <span style="font-size: 1.5em; font-weight: bold;">Preprocessing e Augmentation applied</span>
94
 
95
  1. **<u>Preprocessing</u>**:
96
  - Auto-orientation (with EXIF orientation stripping)
 
107
  - Cutout: 7 boxes, each with a size of 2%
108
 
109
 
110
+ # <span style="font-size: 1.5em; font-weight: bold;">Repository File Structure</span>
111
+ The repository contains the following files. The standard structure for a COCO dataset on Hugging Face is automatically created when loaded.
112
+
113
+ ```text
114
+ Eyes-Detection/
115
+ ├── README.md # This dataset card
116
+ ├── dataset_info.json # Dataset metadata for Hugging Face
117
+ ├── annotations.coco.json # Annotations in COCO format
118
+ ├── images.zip # All images in a single compressed archive
119
+ ├── README.dataset.txt # Marginal info
120
+ └── LICENSE # The CC BY-NC-SA 4.0 license file
121
+ ```
122
+
123
 
124
 
125
+ # <span style="font-size: 1.5em; font-weight: bold;">License - CC BY-NC-SA 4.0</span>
126
 
127
  1. **<u>What you can do</u>**:
128
  - Share - copy and redistribute the material
 
138
  "Accurate Eyes Detection Dataset" by AndreaPorri is licensed under CC BY-NC-SA 4.0
139
  Dataset source: https://huggingface.co/datasets/AndreaPorri/Eyes-Detection
140
 
141
+
142
+ # <span style="font-size: 1.5em; font-weight: bold;">Expected Uses</span>
143
  - Real-time eye detection.
144
  - Part of an Eye-Tracking pipeline for computer vision applications.
145
  - Academic research.
146
  - Research for medical applications.
147
 
148
+
149
+ # <span style="font-size: 1.5em; font-weight: bold;">Limitations and Ethical Considerations</span>
150
  - The dataset contains <u>images of faces</u>
151
  - Use permitted <u>only for non-commercial purposes</u>
152
  - It is the user's responsibility to ensure ethical use in compliance with privacy laws.
153
 
154
+
155
+ # <span style="font-size: 1.5em; font-weight: bold;">Original Datasets of Origin</span>
156
  This dataset was created based on:
157
  1. **EyeCon Dataset** - https://app.roboflow.com/andreap/eyecon-eaux0-oykgj/1
158
  2. **Eyes Detection Dataset** - https://app.roboflow.com/andreap/eyes_detection-bupne/1
159
 
 
 
160
 
161
+ # <span style="font-size: 1.5em; font-weight: bold;">Disclaimer</span>
162
+ The user is responsible for the ethical and legal use of this dataset. <u>The creator assumes no responsibility for any improper use</u>.
163
+
164
+
165
+ # <span style="font-size: 1.5em; font-weight: bold;">Contacts</span>
166
  For questions or additional information:
167
  - Email: andrea.porri@student.unisi.it
168
 
169
+
170
+ # <span style="font-size: 1.5em; font-weight: bold;">Citation</span>
171
  If you use this dataset in your research, please cite it as:
172
 
173
  ```bibtex