|
Download README.md from Marley07/Resistor-Segmentation-V4-Dataset: direct link, hf CLI and curl.
- Browser
- Download file 8.08 kB
-
https://huggingface.co/datasets/Marley07/Resistor-Segmentation-V4-Dataset/resolve/main/README.md
- Command line
-
hf download hf://datasets/Marley07/Resistor-Segmentation-V4-Dataset/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Marley07/Resistor-Segmentation-V4-Dataset/resolve/main/README.md
8.08 kB
| task_categories: | |
| - image-segmentation | |
| - object-detection | |
| tags: | |
| - computer-vision | |
| - instance-segmentation | |
| - resistor-detection | |
| - electronics | |
| - object-counting | |
| - yolo | |
| - roboflow | |
| - opencv | |
| size_categories: | |
| - n<1K | |
| # Resistor Segmentation V4 Dataset | |
| A custom image dataset developed for resistor-body detection, instance segmentation and automated component counting using conventional image processing and deep learning. | |
| ## Dataset Overview | |
| This dataset was developed as part of a Machine Vision group project at the University of the West of England (UWE Bristol). | |
| It contains self-captured photographs of multiple resistors, representing variations in body colour, orientation, scale, colour-band appearance, illumination and overlapping metal leads. | |
| The dataset supports the development and evaluation of computer vision models for electronic component detection, segmentation, counting and extraction. | |
| ## Dataset Statistics | |
| | Property | Value | | |
| |---|---| | |
| | Total annotated images | 181 | | |
| | Total annotated instances | 1,286 | | |
| | Number of classes | 1 | | |
| | Class name | Resistor | | |
| | Annotation type | Instance segmentation polygons | | |
| | Annotation format | YOLO segmentation | | |
| | Image source | Self-captured photographs | | |
| | Annotation platform | Roboflow | | |
| ## Dataset Distribution | |
| | Split | Images | Resistor Instances | | |
| |---|---:|---:| | |
| | Training | 116 | 771 | | |
| | Validation | 27 | 194 | | |
| | Testing | 38 | 321 | | |
| | **Total** | **181** | **1,286** | | |
| Capture-based grouping was implemented to reduce potential data leakage between training, validation and testing datasets. No overlap was present between the defined capture groups assigned to each split. | |
| ## Dataset Characteristics | |
| The dataset includes: | |
| - Multiple resistors within individual photographs. | |
| - Four-band and five-band resistors. | |
| - Different resistor-body colours and physical dimensions. | |
| - Horizontal, vertical and diagonal orientations. | |
| - Overlapping and intersecting metal leads. | |
| - Variations in lighting, shadows and reflections. | |
| - Different object scales and image compositions. | |
| Annotations primarily cover the resistor bodies rather than their metal leads, supporting individual instance extraction and downstream colour-band analysis. | |
| ## Dataset Development | |
| The dataset was developed through the following stages: | |
| 1. Collection of original resistor photographs. | |
| 2. Image filtering and quality inspection. | |
| 3. Manual bounding-box annotation. | |
| 4. Capture-based dataset splitting. | |
| 5. Automatic segmentation polygon generation using conventional image processing. | |
| 6. Morphological processing and contour extraction. | |
| 7. Convex hull refinement to improve mask continuity. | |
| 8. Manual review and correction of segmentation annotations in Roboflow. | |
| 9. Export in YOLO-compatible segmentation format. | |
| 10. Verification of image counts, annotation counts and dataset split consistency. | |
| The combination of automated polygon generation and manual verification reduced annotation effort while improving segmentation quality. | |
| ## Repository Contents | |
| | Filename | Description | | |
| |---|---| | |
| | `Resistor Segmentation V4 Verified Dataset.zip` | Final manually reviewed and annotated segmentation dataset | | |
| | `Resistor Images - V2.zip` | Original resistor photograph collection | | |
| The verified segmentation dataset is recommended for model training and evaluation. The original image archive is provided as supporting source material. | |
| ## Dataset Structure | |
| After extracting the verified segmentation dataset: | |
| ```text | |
| Resistor Segmentation V4 Verified Dataset/ | |
| ├── train/ | |
| │ ├── images/ | |
| │ └── labels/ | |
| ├── valid/ | |
| │ ├── images/ | |
| │ └── labels/ | |
| ├── test/ | |
| │ ├── images/ | |
| │ └── labels/ | |
| ├── data.yaml | |
| └── README.roboflow.txt | |
| ``` | |
| ## Annotation Format | |
| Each resistor instance is represented by a segmentation polygon using normalised image coordinates in YOLO format. | |
| ```text | |
| class_id x1 y1 x2 y2 ... xn yn | |
| ``` | |
| The dataset contains a single object class: | |
| ```text | |
| 0: resistor | |
| ``` | |
| Polygon annotations represent individual resistor bodies and allow models to distinguish separate instances within the same photograph. | |
| The annotations do not individually identify resistor colour bands or their colours. | |
| ## Supported Tasks | |
| - Object detection | |
| - Instance segmentation | |
| - Automated resistor counting | |
| - Electronic component localisation | |
| - Region of interest extraction | |
| - Mask-based orientation correction | |
| - Preprocessing for resistor colour-band recognition | |
| ## Model Development and Evaluation | |
| The dataset was used to train and compare three instance segmentation architectures: | |
| - YOLOv8n-seg | |
| - YOLO11n-seg | |
| - YOLO26n-seg | |
| All three architectures were trained using consistent experimental settings to support comparative evaluation. | |
| YOLO26n-seg was selected for the final resistor detection pipeline based on its validation segmentation performance and optimised detection F1-score. | |
| ## Benchmark Results | |
| The following results were obtained using the selected YOLO26n-seg model with morphological mask refinement on the held-out test dataset. | |
| | Metric | Result | | |
| |---|---:| | |
| | Test images | 38 | | |
| | Ground-truth resistor instances | 321 | | |
| | Correct detections | 314 | | |
| | False positives | 0 | | |
| | False negatives | 7 | | |
| | Detection recall | 97.82% | | |
| | Detection F1-score | 98.90% | | |
| | Counting MAE | 0.184 | | |
| | Counting RMSE | 0.487 | | |
| | Exact counting accuracy | 84.21% | | |
| | GT-normalised mask IoU | 84.79% | | |
| The raw YOLO26n-seg model additionally achieved: | |
| | Standard YOLO Metric | Result | | |
| |---|---:| | |
| | Box mAP50 | 99.98% | | |
| | Box mAP50–95 | 83.29% | | |
| | Mask mAP50 | 99.98% | | |
| | Mask mAP50–95 | 69.77% | | |
| These results describe resistor-body detection and segmentation performance, rather than colour-band classification accuracy. | |
| ## Related Model | |
| The trained model, complete development notebook, methodology, evaluation results and extraction examples are available in the associated Hugging Face model repository: | |
| [YOLO26n Resistor Detection and Instance Segmentation](https://huggingface.co/Marley07/YOLO26n-Resistor-Segmentation) | |
| ## Intended Use | |
| This dataset is intended for educational and research applications involving computer vision, electronic component recognition, instance segmentation and automated object counting. | |
| Potential applications include electronics inspection research, industrial machine vision, component localisation and automated resistor image analysis. | |
| The dataset has not been validated for production-level industrial inspection. | |
| ## Limitations | |
| - The dataset is relatively small compared with large-scale computer vision benchmarks. | |
| - Most photographs were captured within a limited range of environments. | |
| - The held-out test dataset contains only two defined capture groups. | |
| - Smaller or blurred resistor bodies may be difficult to detect. | |
| - Reflections, shadows and overlapping metal leads may affect segmentation quality. | |
| - Some annotation boundaries may contain minor inaccuracies. | |
| - Capture-based grouping reduces but cannot entirely eliminate potential similarities between dataset splits. | |
| - Additional data collection is required to establish generalisation across different cameras, backgrounds and industrial environments. | |
| ## Technologies and Tools | |
| - Python | |
| - OpenCV | |
| - NumPy | |
| - PyTorch | |
| - Ultralytics YOLO | |
| - Roboflow | |
| - Google Colab | |
| ## Author | |
| **Dinesh Kumar** | |
| Machine Vision — University of Bristol and University of the West of England, Bristol, United Kingdom. | |
| Developed as an individual technical contribution within a collaborative university Machine Vision project. | |
| ## Acknowledgements | |
| This dataset was developed within a collaborative Machine Vision group project investigating object counting across agricultural and electronic component applications. | |
| The wider project combines conventional image processing and machine learning for apple counting and resistor colour-band recognition. | |
| ## Licence and Usage | |
| Dataset redistribution and usage are subject to confirmation of the relevant ownership, contributor permissions and university assessment-sharing requirements. |