Jisnu Kalita commited on
Commit ·
4f69e23
0
Parent(s):
initial commit
Browse files- .gitignore +21 -0
- .python-version +1 -0
- README.md +0 -0
- main.py +32 -0
- pyproject.toml +15 -0
- uv.lock +0 -0
.gitignore
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Python-generated files
|
| 2 |
+
__pycache__/
|
| 3 |
+
*.py[oc]
|
| 4 |
+
build/
|
| 5 |
+
dist/
|
| 6 |
+
wheels/
|
| 7 |
+
*.egg-info
|
| 8 |
+
|
| 9 |
+
# Virtual environments
|
| 10 |
+
.venv
|
| 11 |
+
|
| 12 |
+
#system_bloat
|
| 13 |
+
.DS_Store
|
| 14 |
+
|
| 15 |
+
#miscellaneous
|
| 16 |
+
dataset
|
| 17 |
+
data
|
| 18 |
+
docker-compose.yml
|
| 19 |
+
ls-data
|
| 20 |
+
mydata
|
| 21 |
+
garbage-classification
|
.python-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
3.12
|
README.md
ADDED
|
File without changes
|
main.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from pathlib import Path
|
| 2 |
+
|
| 3 |
+
from ultralytics import YOLO
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
DATASET_YAML = Path(__file__).parent / "dataset" / "dataset.yaml"
|
| 7 |
+
RUNS_DIR = Path(__file__).parent / "runs"
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
def train():
|
| 11 |
+
model = YOLO("yolo11n.pt")
|
| 12 |
+
|
| 13 |
+
results = model.train(
|
| 14 |
+
data=str(DATASET_YAML),
|
| 15 |
+
epochs=50,
|
| 16 |
+
imgsz=640,
|
| 17 |
+
batch=16,
|
| 18 |
+
project=str(RUNS_DIR),
|
| 19 |
+
name="pothole",
|
| 20 |
+
exist_ok=True,
|
| 21 |
+
)
|
| 22 |
+
|
| 23 |
+
print(f"Training complete. Results saved to: {results.save_dir}")
|
| 24 |
+
return results
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
def main():
|
| 28 |
+
train()
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
if __name__ == "__main__":
|
| 32 |
+
main()
|
pyproject.toml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[project]
|
| 2 |
+
name = "pothole-detection"
|
| 3 |
+
version = "0.1.0"
|
| 4 |
+
description = "Add your description here"
|
| 5 |
+
readme = "README.md"
|
| 6 |
+
requires-python = ">=3.12"
|
| 7 |
+
dependencies = [
|
| 8 |
+
"kaggle>=2.0.0",
|
| 9 |
+
"ultralytics>=8.4.33",
|
| 10 |
+
]
|
| 11 |
+
|
| 12 |
+
[tool.uv.workspace]
|
| 13 |
+
members = [
|
| 14 |
+
"dataset",
|
| 15 |
+
]
|
uv.lock
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|