cacs-yolo

About Code release for "CACS-YOLO: A Lightweight Model for Insulator Defect Detection Based on Improved YOLOv8m" https://doi.org/10.1109/TIM.2024.3453332

https://github.com/deepleen/cacs-yolo

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.4%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

About Code release for "CACS-YOLO: A Lightweight Model for Insulator Defect Detection Based on Improved YOLOv8m" https://doi.org/10.1109/TIM.2024.3453332

Basic Info
  • Host: GitHub
  • Owner: Deepleen
  • License: agpl-3.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 8.38 MB
Statistics
  • Stars: 8
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 2 years ago · Last pushed 11 months ago
Metadata Files
Readme License Citation Security

README.md

CACS-YOLO: A Lightweight Model for Insulator Defect Detection based on improved YOLOv8m

Model architecture diagram of CACS-YOLO

​ Fig. 1: Model architecture diagram of CACS-YOLO

Highlights

1) We proposed a new model CACS-YOLO by adding CAM based on feature reuse and feature CSO, which achieved good results in both detection accuracy and lightweight.

2) We proposed a new dataset by using the synthetic weather algorithms, which solved the problem of insufficient data and helped the model to further improve the detection accuracy.

3) The insulator dataset SFRID containing 20,567 insulator images, including foggy and rainy days, was constructed and released, so that the model can cope well with different weather conditions.

Getting started

1. Get codes

git clone https://github.com/CACS-YOLO.git cd CACS-YOLO

2. Installation of dependent libraries

pip install -r ./requirements.txt

3. Train model

To train the model, create a new python file and run the following code:

``` from ultralytics import YOLO

Load CACS-YOLO

model = YOLO(model = './ultralytics/cfg/models/CACS-YOLO.yaml')

Load YOLOv8m

model = YOLO(model = './ultralytics/cfg/models/YOLOv8m.yaml')

Load YOLOv8m-CAM

model = YOLO(model = './ultralytics/cfg/models/YOLOv8m-CAM.yaml')

Load YOLOv8m-CSO

model = YOLO(model = './ultralytics/cfg/models/YOLOv8m-CSO.yaml')

Training with UPID

model.train(data = './ultralytics/cfg/datasets/UPID.yaml', device = 0, epochs = 500)

Training with SFID

model.train(data = './ultralytics/cfg/datasets/SFID.yaml', device = 0, epochs = 500)

Training with SRID

model.train(data = './ultralytics/cfg/datasets/SRID.yaml', device = 0, epochs = 500)

Training with SFRID

model.train(data = './ultralytics/cfg/datasets/SFRID.yaml', device = 0, epochs = 600)

```

4. Test model

To test the model, create a new python file and run the following code:

``` from ultralytics import YOLO

Load the best model

model = YOLO('./runs/detect/train/weights/best.pt')

Testing with UPID

model.val(data = './ultralytics/cfg/datasets/UPID.yaml', device = 0)

Testing with SFID

model.val(data = './ultralytics/cfg/datasets/SFID.yaml', device = 0)

Testing with SRID

model.val(data = './ultralytics/cfg/datasets/SRID.yaml', device = 0)

Testing with SFRID

model.val(data = './ultralytics/cfg/datasets/SFRID.yaml', device = 0)

```

5. Inference

To infer the model, create a new python file and run the following code:

``` from ultralytics import YOLO

Load the best model

model = YOLO("./runs/detect/train/weights/best.pt", task = "detect")

Infer the model

result = model(source = "./data_example/000050.jpg", save = True) ```

6. Synthetic fog generation

You can use the imagesyntheticfog.py to generate foggy images.

``` python ./imagesyntheticfog.py

Example

python imagesyntheticfog.py ./dataexample/000050.jpg 0.9 0.05 ./dataexample/synthesiseffect/foggy000050.jpg

```

7. Synthetic rain generation

You can use the imagesyntheticrain.py to generate rainy images.

``` python ./ImageSyntheticRain.py

Example

python imagesyntheticrain.py ./dataexample/000050.jpg -30 600 5 60 ./dataexample/synthesiseffect/rainy000050.jpg

```

8. Citing CACS-YOLO

If you use CACS-YOLO in your research, please use the following BibTeX entry. 📣 Thank you!

@article{cao2024cacs, title={CACS-YOLO: A Lightweight Model for Insulator Defect Detection based on Improved YOLOv8m}, author={Cao, Zhong and Chen, Kaihong and Chen, Junzuo and Chen, Zhaohui and Zhang, Man}, journal={IEEE Transactions on Instrumentation and Measurement}, year={2024}, publisher={IEEE} }

Owner

  • Login: Deepleen
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
preferred-citation:
  type: software
  message: If you use this software, please cite it as below.
  authors:
  - family-names: Jocher
    given-names: Glenn
    orcid: "https://orcid.org/0000-0001-5950-6979"
  - family-names: Chaurasia
    given-names: Ayush
    orcid: "https://orcid.org/0000-0002-7603-6750"
  - family-names: Qiu
    given-names: Jing
    orcid: "https://orcid.org/0000-0003-3783-7069"
  title: "YOLO by Ultralytics"
  version: 8.0.0
  # doi: 10.5281/zenodo.3908559  # TODO
  date-released: 2023-1-10
  license: AGPL-3.0
  url: "https://github.com/ultralytics/ultralytics"

GitHub Events

Total
  • Watch event: 10
  • Push event: 1
Last Year
  • Watch event: 10
  • Push event: 1

Dependencies

docker/Dockerfile docker
  • pytorch/pytorch 2.0.1-cuda11.7-cudnn8-runtime build
requirements.txt pypi
  • matplotlib >=3.2.2
  • numpy >=1.22.2
  • opencv-python >=4.6.0
  • pandas >=1.1.4
  • pillow >=7.1.2
  • psutil *
  • py-cpuinfo *
  • pyyaml >=5.3.1
  • requests >=2.23.0
  • scipy >=1.4.1
  • seaborn >=0.11.0
  • torch >=1.8.0
  • torchvision >=0.9.0
  • tqdm >=4.64.0
setup.py pypi
ultralytics.egg-info/requires.txt pypi
  • check-manifest *
  • coremltools >=7.0.b1
  • coverage *
  • ipython *
  • matplotlib >=3.2.2
  • mkdocs-material *
  • mkdocs-redirects *
  • mkdocs-ultralytics-plugin >=0.0.26
  • mkdocstrings *
  • numpy >=1.22.2
  • opencv-python >=4.6.0
  • openvino-dev >=2023.0
  • pandas >=1.1.4
  • pillow >=7.1.2
  • psutil *
  • py-cpuinfo *
  • pytest *
  • pytest-cov *
  • pyyaml >=5.3.1
  • requests >=2.23.0
  • scipy >=1.4.1
  • seaborn >=0.11.0
  • tensorflowjs *
  • torch >=1.8.0
  • torchvision >=0.9.0
  • tqdm >=4.64.0