Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,13 +1,36 @@
|
|
| 1 |
-
# OCR Dataset (YOLO Format)
|
| 2 |
|
| 3 |
-
Images resized to 50%
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
## Statistics
|
| 6 |
|
| 7 |
-
| Split | Images |
|
| 8 |
-
|-------|--------|
|
| 9 |
-
| Train | 9,018 |
|
| 10 |
-
| Val
|
| 11 |
|
| 12 |
## 23 Classes
|
| 13 |
|
|
@@ -37,28 +60,15 @@ Images resized to 50% of original for faster training and smaller download.
|
|
| 37 |
| 21 | 공간_기타 |
|
| 38 |
| 22 | 공간_엘리베이터 |
|
| 39 |
|
| 40 |
-
##
|
| 41 |
-
|
| 42 |
-
```python
|
| 43 |
-
from huggingface_hub import snapshot_download
|
| 44 |
-
|
| 45 |
-
# Download
|
| 46 |
-
path = snapshot_download(repo_id="packshotter/blueprint-dataset", repo_type="dataset")
|
| 47 |
-
|
| 48 |
-
# Train YOLOv8
|
| 49 |
-
from ultralytics import YOLO
|
| 50 |
-
model = YOLO('yolov8n.pt')
|
| 51 |
-
model.train(data=f"{path}/data.yaml", epochs=100, imgsz=640)
|
| 52 |
-
```
|
| 53 |
-
|
| 54 |
-
## Structure
|
| 55 |
|
| 56 |
```
|
| 57 |
-
|
|
|
|
| 58 |
├── images/
|
| 59 |
-
│ ├── train/
|
| 60 |
-
│ └── val/
|
| 61 |
└── labels/
|
| 62 |
-
├── train/
|
| 63 |
└── val/
|
| 64 |
```
|
|
|
|
| 1 |
+
# Blueprint OCR Dataset (YOLO Format)
|
| 2 |
|
| 3 |
+
Images resized to 50% resolution for faster training and smaller download size.
|
| 4 |
+
|
| 5 |
+
## Quick Start
|
| 6 |
+
|
| 7 |
+
```python
|
| 8 |
+
from huggingface_hub import hf_hub_download
|
| 9 |
+
import zipfile
|
| 10 |
+
|
| 11 |
+
# Download
|
| 12 |
+
zip_path = hf_hub_download(
|
| 13 |
+
repo_id="packshotter/blueprint-dataset",
|
| 14 |
+
filename="blueprint-dataset.zip",
|
| 15 |
+
repo_type="dataset"
|
| 16 |
+
)
|
| 17 |
+
|
| 18 |
+
# Extract
|
| 19 |
+
with zipfile.ZipFile(zip_path, 'r') as z:
|
| 20 |
+
z.extractall('.')
|
| 21 |
+
|
| 22 |
+
# Train with YOLOv8
|
| 23 |
+
from ultralytics import YOLO
|
| 24 |
+
model = YOLO('yolov8n.pt')
|
| 25 |
+
model.train(data='ocr_yolo_half/data.yaml', epochs=100, imgsz=640)
|
| 26 |
+
```
|
| 27 |
|
| 28 |
## Statistics
|
| 29 |
|
| 30 |
+
| Split | Images |
|
| 31 |
+
|-------|--------|
|
| 32 |
+
| Train | 9,018 |
|
| 33 |
+
| Val | 1,129 |
|
| 34 |
|
| 35 |
## 23 Classes
|
| 36 |
|
|
|
|
| 60 |
| 21 | 공간_기타 |
|
| 61 |
| 22 | 공간_엘리베이터 |
|
| 62 |
|
| 63 |
+
## Structure (after extraction)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
```
|
| 66 |
+
ocr_yolo_half/
|
| 67 |
+
├── data.yaml # YOLO config
|
| 68 |
├── images/
|
| 69 |
+
│ ├── train/ # 9,018 images (1754x2481)
|
| 70 |
+
│ └── val/ # 1,129 images
|
| 71 |
└── labels/
|
| 72 |
+
├── train/ # YOLO format .txt
|
| 73 |
└── val/
|
| 74 |
```
|