{"id":22202454,"url":"https://github.com/arssite/dirty-cleanflooringimageprocessingusingyolov5","last_synced_at":"2026-04-10T17:07:47.444Z","repository":{"id":264702379,"uuid":"894143975","full_name":"arssite/Dirty-CleanFlooringImageProcessingUsingYolov5","owner":"arssite","description":"Uses YOLOv5 to classify floor cleanliness into five categories based on visual cues. It includes an annotated dataset, trained model,\u0026 evaluation outputs. Code covers data preprocessing, training, \u0026 testing. A comparative analysis highlights YOLOv5's advantages over traditional methods, providing an efficient solution automated floor cleanliness.","archived":false,"fork":false,"pushed_at":"2024-11-26T12:18:48.000Z","size":31914,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T01:30:58.936Z","etag":null,"topics":["deep-neural-networks","github","google-colab","jupyter-notebook","labelimg","matplotlib-pyplot","numpy-library","opencv-python","pandas-python","pytorch","scikit-learn","tensorflow","yolov5"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arssite.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-11-25T20:43:20.000Z","updated_at":"2024-11-26T12:18:52.000Z","dependencies_parsed_at":"2025-02-01T01:39:29.917Z","dependency_job_id":null,"html_url":"https://github.com/arssite/Dirty-CleanFlooringImageProcessingUsingYolov5","commit_stats":null,"previous_names":["arssite/dirty-cleanflooringdetectionusingyolov5","arssite/dirty-cleanflooringimageprocessingusingyolov5"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arssite%2FDirty-CleanFlooringImageProcessingUsingYolov5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arssite%2FDirty-CleanFlooringImageProcessingUsingYolov5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arssite%2FDirty-CleanFlooringImageProcessingUsingYolov5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arssite%2FDirty-CleanFlooringImageProcessingUsingYolov5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arssite","download_url":"https://codeload.github.com/arssite/Dirty-CleanFlooringImageProcessingUsingYolov5/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245720143,"owners_count":20661367,"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":["deep-neural-networks","github","google-colab","jupyter-notebook","labelimg","matplotlib-pyplot","numpy-library","opencv-python","pandas-python","pytorch","scikit-learn","tensorflow","yolov5"],"created_at":"2024-12-02T16:24:21.448Z","updated_at":"2025-12-30T23:24:31.870Z","avatar_url":"https://github.com/arssite.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clean vs. Dirty Floor Identification Using YOLOv5\n\n## Project Overview\nThis project aims to develop an algorithm that identifies and rates the cleanliness of floors using visual cues. The algorithm assigns a cleanliness score ranging from 0 (dirty) to 4 (clean). YOLOv5, a state-of-the-art object detection model, is used for this task due to its high speed, accuracy, and scalability.\n\n---\n\n## Why YOLO is the Best Choice?\n| Feature                          | YOLOv5                          | Other Methods                   |\n|-----------------------------------|----------------------------------|----------------------------------|\n| **Accuracy**                      | High                            | Varies                          |\n| **Speed**                         | Real-time detection             | Slower                          |\n| **Scalability**                   | Supports large datasets         | Limited for traditional CV      |\n| **Ease of Integration**           | Pretrained weights available    | Requires custom development     |\n\nYOLOv5 is chosen because:\n- It offers **real-time detection**, which is essential for dynamic environments.\n- **Pretrained weights** allow faster prototyping and deployment.\n- It excels in tasks with **complex datasets**, handling multiple object categories efficiently.\n\n---\n\n## Directory Structure\n```plaintext\nproject/\n├── dataset/\n│   ├── images/\n│   │   ├── train/          # Training images\n│   │   ├── val/            # Validation images\n│   │   └── test/           # Test images\n│   ├── labels/\n│   │   ├── train/          # Annotations for training\n│   │   ├── val/            # Annotations for validation\n│   │   └── test/           # Annotations for test set\n├── yolo/\n│   ├── config/             # YOLO model configuration\n│   ├── weights/            # YOLO pretrained weights\n│   ├── output/             # Outputs (trained model, results)\n│   └── logs/               # Training logs\n```\n\n---\n\n## Comparison of Methods\n\n| **Method**                | **Accuracy** | **Speed**  | **Scalability** | **Dataset Requirements**         |\n|---------------------------|--------------|------------|-----------------|-----------------------------------|\n| Classical CV (e.g., SVM)  | Moderate     | High       | Low             | Small                             |\n| CNN (Custom/Pretrained)   | High         | Moderate   | High            | Large                             |\n| Semantic Segmentation     | Very High    | Moderate   | High            | Pixel-Annotated Dataset           |\n| Faster R-CNN/Mask R-CNN   | Very High    | Low        | High            | Moderate                          |\n| K-Means Clustering        | Moderate     | High       | Low             | Unlabeled Data                    |\n| Multi-Layer Perceptron    | Moderate     | High       | Low             | Feature-Based Dataset             |\n| **YOLO (Chosen)**         | High         | Real-time  | High            | Moderate                          |\n\n---\n\n## Example Annotated Output\nAnnotated images include bounding boxes and cleanliness scores (0–4). Below is an example of a processed image:\n\n![Annotated Example](floor66.png)![Annotated Example](efloor63_0.png)\n\n---\n\n## Steps to Reproduce\n1. **Data Collection**:\n   - Collect images of clean and dirty floors under varying conditions (lighting, floor types).\n   - Manually annotate the images with cleanliness scores (0–4).\n\n2. **Dataset Preparation**:\n   - Organize images and labels as per the directory structure.\n   - Use tools like LabelImg for annotation.\n\n3. **Training**:\n   - Train YOLOv5 using the prepared dataset and configurations.\n   - Command:\n     ```bash\n     python train.py --img 640 --batch 16 --epochs 50 --data dataset.yaml --weights yolov5s.pt\n     ```\n\n4. **Validation**:\n   - Validate the trained model.\n   - Command:\n     ```bash\n     python val.py --data dataset.yaml --weights runs/train/exp/weights/best.pt\n     ```\n\n5. **Testing**:\n   - Test the model on new images.\n   - Command:\n     ```python\n     def test_image(image_path):\n         # Function to load, process, and annotate image\n     ```\n\n6. **Saving Outputs**:\n   - Save annotated outputs using the provided function.\n\n---\n\n## Metrics Evaluation\nKey performance metrics:\n- **Accuracy**: High (~90%+ depending on dataset quality)\n- **Precision**: High, ensuring fewer false positives.\n- **Recall**: Adequate, reducing missed detections.\n- **F1-Score**: Balanced metric combining precision and recall.\n\n---\n\n## Future Improvements\n- Incorporate **data augmentation** for robustness.\n- Experiment with **advanced architectures** like YOLOv8 or custom CNNs.\n- Add real-time deployment capabilities using NVIDIA TensorRT.\n\n---\n## References (Relevant research papers or resources)\n\u003cbr\u003e\nhttps://www.nature.com/articles/s41598-023-38538-3.pdf\n\u003cbr\u003e\nfile:///C:/Users/hp/Downloads/ADeepLearningApproachforClassificationofCleanlinessinRestrooms.pdf\n\u003cbr\u003e\nhttps://www.researchgate.net/publication/356691001_A_Deep_Learning-Based_Dirt_Detection_Computer_Vision_System_for_Floor-Cleaning_Robots_with_Improved_Data_Collection\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farssite%2Fdirty-cleanflooringimageprocessingusingyolov5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farssite%2Fdirty-cleanflooringimageprocessingusingyolov5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farssite%2Fdirty-cleanflooringimageprocessingusingyolov5/lists"}