File size: 2,161 Bytes
1cec2a4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7a8f832
1cec2a4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
task_categories:
- object-detection
- image-segmentation
tags:
- yolo
- railway
- security
- surveillance
- yolov8
pretty_name: RailRakshak Security Dataset
size_categories:
- 1K<n<10K
---

# πŸš„ RailRakshak: Railway Threat Detection Dataset

![YOLOv8](https://img.shields.io/badge/Format-YOLOv8-blue)
![Task](https://img.shields.io/badge/Task-Object%20Detection%20%26%20Segmentation-green)

## πŸ“– Dataset Description


### 🎯 Supported Tasks
- **Track Segmentation:** Pixel-wise masks of the railway track (Safe Zone).
- **Threat Detection:** Bounding boxes for obstacles on the track.

## πŸ“‚ Dataset Structure
Due to the large number of small files, the dataset is provided as a **single ZIP archive** (`dataset.zip`) to ensure fast downloads and bypass Git LFS rate limits.

**⚠️ You must unzip the file after downloading.**

### Directory Layout (After Unzipping)
```bash
dataset/
β”œβ”€β”€ railway_dataset/
β”‚   β”œβ”€β”€Rail-DB/
β”œβ”€β”€ railway_seg
β”‚   β”œβ”€β”€ train/    
β”‚   └── raildb_raw/        
β”œβ”€β”€ samples/
β”‚   β”œβ”€β”€ test.mp4        
β”‚   └── Test2.mp4        
└── output/             # EMPTY DIRECTORY 

```

## πŸš€ How to Use

### Option 1: Direct Download

1. Go to the **"Files and versions"** tab.
2. Download `dataset.zip`.
3. Unzip it locally:
```bash
unzip dataset.zip

```

### Option 2: Python (Hugging Face Hub)

You can download and unzip programmatically using Python:

```python
from huggingface_hub import hf_hub_download
import zipfile

# Download
path = hf_hub_download(
    repo_id="YOUR_USERNAME/RailRakshak-Track-Detection-Data",
    filename="dataset.zip",
    repo_type="dataset"
)

# Unzip
with zipfile.ZipFile(path, 'r') as zip_ref:
    zip_ref.extractall("./railrakshak_data")

print("βœ… Dataset downloaded and extracted!")

```

### Option 3: Training with YOLOv8

Once unzipped, you can train immediately:

```bash
yolo task=segment mode=train model=yolov8n-seg.pt data=./railrakshak_data/data.yaml epochs=100 imgsz=640

```

---

## ✍️ Citation

If you use this dataset, please cite the **RailRakshak Hackathon Project**.

*Created by [RAT]*

---