Skip to content
/ LF-YOLO Public

LF-YOLO (Lighter and Faster YOLO) is used to detect defect of X-ray weld image.

License

Notifications You must be signed in to change notification settings

lmomoy/LF-YOLO

Repository files navigation

This project is based on ultralytics/yolov3.

LF-YOLO (Lighter and Faster YOLO) is used to detect defect of X-ray weld image. The related paper is available here.

Download

$ git clone https://github.com/lmomoy/LF-YOLO

Train

We provide multiple versions of LF-YOLO with different widths.

$ python train.py --data coco.yaml --cfg LF-YOLO.yaml      --weights '' --batch-size 1
                                         LF-YOLO-1.25.yaml                           1
                                         LF-YOLO-0.75.yaml                           1
                                         LF-YOLO-0.5.yaml                            1

Results

We test LF-YOLO on our weld defect image dataset. Other methods are trained and tested based on MMDetection.

Model size (pixels) mAP50test
params (M) FLOPS (B)
Cascasde-RCNN (ResNet50) (1333, 800) 90.0 68.9 243.2
Cascasde-RCNN (ResNet101) (1333, 800) 90.7 87.9 323.1
Faster-RCNN (ResNet50) (1333, 800) 90.1 41.1 215.4
Faster-RCNN (ResNet101) (1333, 800) 92.2 60.1 295.3
Dynamic-RCNN (ResNet50) (1333, 800) 90.3 41.1 215.4
RetinaNet (ResNet50) (1333, 800) 80.0 36.2 205.2
VFNet (ResNet50) (1333, 800) 87.0 32.5 197.8
VFNet (ResNet101) (1333, 800) 87.2 51.5 277.7
Reppoints (ResNet101) (1333, 800) 82.7 36.6 199.0
SSD300 (VGGNet) 300 88.1 24.0 30.6
YOLOv3 (Darknet52) 416 91.0 62.0 33.1
SSD (MobileNet v2) 320 82.3 3.1 0.7
YOLOv3 (MobileNet v2) 320 90.2 3.7 1.6
LF-YOLO-0.5 320 90.7 1.8 1.1
LF-YOLO 320 92.9 7.3 4.0

We test our model on public dataset MS COCO, and it also achieves competitive results.

Model size (pixels) mAP50test
params (M) FLOPS (B)
YOLOv3-tiny 640 34.8 8.8 13.2
YOLOv3 320 51.5 39.0 61.9
SSD 300 41.2 35.2 34.3
SSD 512 46.5 99.5 34.3
Faster R-CNN (VGG16) shorter size: 800 43.9 - 278.0
R-FCN (ResNet50) shorter size: 800 49.0 - 133.0
R-FCN (ResNet101) shorter size: 800 52.9 - 206.0
LF-YOLO 640 47.8 7.4 17.1

Requirements

Python 3.8 or later with all requirements.txt dependencies installed, including torch>=1.7. To install run:

$ pip install -r requirements.txt

Inference

$ python detect.py --source data/images --weights LF-YOLO.pt --conf 0.25

Citation

Please consider citing my work as follows if it is helpful for you.

@article{liu2023lf,
  title={LF-YOLO: A lighter and faster yolo for weld defect detection of X-ray image},
  author={Liu, Moyun and Chen, Youping and Xie, Jingming and He, Lei and Zhang, Yang},
  journal={IEEE Sensors Journal},
  volume={23},
  number={7},
  pages={7430--7439},
  year={2023},
  publisher={IEEE}
}

@article{liu2021lf,
  title={LF-YOLO: A Lighter and Faster YOLO for Weld Defect Detection of X-ray Image},
  author={Liu, Moyun and Chen, Youping and He, Lei and Zhang, Yang and Xie, Jingming},
  journal={arXiv preprint arXiv:2110.15045},
  year={2021}
}

About

LF-YOLO (Lighter and Faster YOLO) is used to detect defect of X-ray weld image.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published