{"id":23045320,"url":"https://github.com/ariyaarka/prediction-models","last_synced_at":"2025-10-19T17:16:05.035Z","repository":{"id":253600875,"uuid":"843978533","full_name":"AriyaArKa/Prediction-Models","owner":"AriyaArKa","description":"A beginner level prediction models for data science and computer vision","archived":false,"fork":false,"pushed_at":"2025-03-25T19:20:05.000Z","size":4407,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T20:28:39.071Z","etag":null,"topics":["computer-vision","kaggle-dataset","machine-learning","pothole-detection","roboflow-api","yolov8"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AriyaArKa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-18T02:17:05.000Z","updated_at":"2025-03-25T19:20:08.000Z","dependencies_parsed_at":"2024-08-18T04:38:28.153Z","dependency_job_id":null,"html_url":"https://github.com/AriyaArKa/Prediction-Models","commit_stats":null,"previous_names":["ariyaarka/prediction-models"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AriyaArKa%2FPrediction-Models","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AriyaArKa%2FPrediction-Models/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AriyaArKa%2FPrediction-Models/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AriyaArKa%2FPrediction-Models/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AriyaArKa","download_url":"https://codeload.github.com/AriyaArKa/Prediction-Models/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246922232,"owners_count":20855343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","kaggle-dataset","machine-learning","pothole-detection","roboflow-api","yolov8"],"created_at":"2024-12-15T21:19:38.212Z","updated_at":"2025-10-19T17:15:59.987Z","avatar_url":"https://github.com/AriyaArKa.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YOLOv8 Pothole Detection\n\n## Overview\nThis project utilizes YOLOv8 to detect potholes in images and videos. It involves dataset preparation, model training, evaluation, and inference on test data.\n\n## Prerequisites\nEnsure you have the following installed:\n- Python 3.10+\n- PyTorch 2.3.1+cu121\n- NVIDIA GPU with CUDA 12.2 (recommended)\n\n## Installation\n1. Clone the repository (if applicable).\n2. Install required dependencies:\n   ```bash\n   pip install ultralytics==8.0.0 roboflow\n   ```\n3. Check if Ultralytics YOLOv8 is correctly installed:\n   ```python\n   import ultralytics\n   ultralytics.checks()\n   ```\n\n## Dataset Preparation\n1. Create a dataset directory:\n   ```bash\n   mkdir -p /content/datasets\n   ```\n2. Download the dataset from Roboflow:\n   ```python\n   from roboflow import Roboflow\n   rf = Roboflow(api_key=\"YOUR_API_KEY\")\n   project = rf.workspace(\"YOUR_NAME\").project(\"yolov8pothole\")\n   version = project.version(1)\n   dataset = version.download(\"yolov5\")\n   ```\n\n## Training the YOLOv8 Model\nTrain the model using the following command:\n```bash\ncd /content\nyolo task=detect mode=train model=yolov8m.pt data=/content/Yolov8Pothole-1/data.yaml epochs=70 imgsz=640\n```\n\n## Model Evaluation\n1. Confusion Matrix:\n   ```python\n   from IPython.display import Image\n   Image(filename='/content/runs/detect/train2/confusion_matrix.png', width=900)\n   ```\n2. Training and Validation Loss:\n   ```python\n   Image(filename='/content/runs/detect/train2/results.png', width=600)\n   ```\n3. Validation Batch Predictions:\n   ```python\n   Image(filename='/content/runs/detect/train2/val_batch0_pred.jpg', width=600)\n   ```\n4. Validate with best weights:\n   ```bash\n   yolo task=detect mode=val model=/content/runs/detect/train2/weights/best.pt data=/content/datasets/Yolov8Pothole-1/data.yaml\n   ```\n\n## Inference on Test Data\n```bash\nyolo task=detect mode=predict model=/content/runs/detect/train2/weights/best.pt conf=0.25 source=/content/datasets/Yolov8Pothole-1/test/images\n```\n\n## Testing on a Demo Video\n```bash\ncp \"/content/drive/MyDrive/Pothole Detect/demo2.mp4\" .\nyolo task=detect mode=predict model=/content/runs/detect/train2/weights/best.pt conf=0.25 source='/content/demo2.mp4'\n```\n\n## Display the Demo Video\n[Watch the demo video](https://www.linkedin.com/feed/update/urn:li:activity:7230758159672369152/)\n\n```python\nfrom IPython.display import HTML\nfrom base64 import b64encode\nimport os\n\n# Input video path\nsave_path = '/content/runs/detect/predict3/demo2.mp4'\ncompressed_path = \"/content/result_compressed2.mp4\"\n\nos.system(f\"ffmpeg -i {save_path} -vcodec libx264 {compressed_path}\")\n\n# Show video\nmp4 = open(compressed_path,'rb').read()\ndata_url = \"data:video/mp4;base64,\" + b64encode(mp4).decode()\nHTML(f\"\"\"\n\u003cvideo width=600 controls\u003e\n  \u003csource src='{data_url}' type='video/mp4'\u003e\n\u003c/video\u003e\n\"\"\")\n```\n\n## Troubleshooting\n- Ensure all paths exist before executing commands.\n- Check that your dataset is downloaded correctly.\n- Ensure your GPU is available and properly set up with CUDA.\n\n---\nThis README provides step-by-step instructions for setting up, training, and evaluating a pothole detection model using YOLOv8. Let me know if you need further refinements!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fariyaarka%2Fprediction-models","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fariyaarka%2Fprediction-models","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fariyaarka%2Fprediction-models/lists"}