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

Overview

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) 300 82.3 3.1 0.7
YOLOv3 (MobileNet v2) 416 90.2 3.7 1.6
LF-YOLO-0.5 640 90.7 1.8 1.1
LF-YOLO 640 92.9 7.4 17.1

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
You might also like...
Object detection using yolo-tiny model and opencv used as backend
Object detection using yolo-tiny model and opencv used as backend

Object detection Algorithm used : Yolo algorithm Backend : opencv Library required: opencv = 4.5.4-dev' Quick Overview about structure 1) main.py Load

A simple rest api that classifies pneumonia infection weather it is Normal, Pneumonia Virus or Pneumonia Bacteria from a chest-x-ray image.
A simple rest api that classifies pneumonia infection weather it is Normal, Pneumonia Virus or Pneumonia Bacteria from a chest-x-ray image.

This is a simple rest api that classifies pneumonia infection weather it is Normal, Pneumonia Virus or Pneumonia Bacteria from a chest-x-ray image.

A program that uses computer vision to detect hand gestures, used for controlling movie players.

HandGestureDetection This program uses a Haar Cascade algorithm to detect the presence of your hand, and then passes it on to a self-created and self-

A system used to detect whether a person is wearing a medical mask or not.

Mask_Detection_System A system used to detect whether a person is wearing a medical mask or not. To open the program, please follow these steps: Make

This program presents convolutional kernel density estimation, a method used to detect intercritical epilpetic spikes (IEDs)
This program presents convolutional kernel density estimation, a method used to detect intercritical epilpetic spikes (IEDs)

Description This program presents convolutional kernel density estimation, a method used to detect intercritical epilpetic spikes (IEDs) in [Gardy et

Optimized code based on M2 for faster image captioning training

Transformer Captioning This repository contains the code for Transformer-based image captioning. Based on meshed-memory-transformer, we further optimi

Image-Adaptive YOLO for Object Detection in Adverse Weather Conditions
Image-Adaptive YOLO for Object Detection in Adverse Weather Conditions

Image-Adaptive YOLO for Object Detection in Adverse Weather Conditions Accepted by AAAI 2022 [arxiv] Wenyu Liu, Gaofeng Ren, Runsheng Yu, Shi Guo, Jia

A fast python implementation of Ray Tracing in One Weekend using python and Taichi
A fast python implementation of Ray Tracing in One Weekend using python and Taichi

ray-tracing-one-weekend-taichi A fast python implementation of Ray Tracing in One Weekend using python and Taichi. Taichi is a simple "Domain specific

Comments
  • RuntimeError: The size of tensor a (80) must match the size of tensor b (44) at non-singleton dimension 3

    RuntimeError: The size of tensor a (80) must match the size of tensor b (44) at non-singleton dimension 3

    Hi, when I run python detect.py --source data/images --weights LF-YOLO.pt --conf 0.25, I find there is no LF-YOLO.pt and I use yolov3.pt instead, but I get an error: RuntimeError: The size of tensor a (80) must match the size of tensor b (44) at non-singleton dimension 3. Could you help me? Thank you!

    opened by lijunyu159 2
  • opencv-python>=4.1.2

    opencv-python>=4.1.2

    hello,When I was running your code, there was a problem with the version of OpenCV。My opencv is 4.5.2, but He reminded me opencv-python>=4.1.2

    requirements: opencv-python>=4.1.2 not found and is required by YOLOv3, attempting auto-update... ERROR: Invalid requirement: "'opencv-python" Traceback (most recent call last): File "d:\Studies\bhdx\CODE\LF-YOLO-master\utils\general.py", line 110, in check_requirements pkg.require(r) File "D:\Studies\Anaconda3\envs\pytorch\lib\site-packages\pkg_resources_init_.py", line 891, in require needed = self.resolve(parse_requirements(requirements)) File "D:\Studies\Anaconda3\envs\pytorch\lib\site-packages\pkg_resources_init_.py", line 777, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'opencv-python>=4.1.2' distribution was not found and is required by the application

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "d:/Studies/bhdx/CODE/LF-YOLO-master/train.py", line 511, in check_requirements() File "d:\Studies\bhdx\CODE\LF-YOLO-master\utils\general.py", line 114, in check_requirements print(subprocess.check_output(f"pip install '{e.req}'", shell=True).decode()) File "D:\Studies\Anaconda3\envs\pytorch\lib\subprocess.py", line 415, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "D:\Studies\Anaconda3\envs\pytorch\lib\subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'pip install 'opencv-python>=4.1.2'' returned non-zero exit status 1.

    Do you have this problem?

    opened by 1311523821 1
  • RuntimeError: The size of tensor a (80) must match the size of tensor b (44) at naon-singleton dimension 3

    RuntimeError: The size of tensor a (80) must match the size of tensor b (44) at naon-singleton dimension 3

    Hi, when I run python detect.py --source data/images --weights LF-YOLO.pt --conf 0.25, I find there is no LF-YOLO.pt and I use yolov3.pt instead, but I get an error: RuntimeError: The size of tensor a (80) must match the size of tensor b (44) at naon-singleton dimension 3. Could you help me? Thank you!

    opened by lijunyu159 0
Owner
null
shufflev2-yolov5:lighter, faster and easier to deploy

shufflev2-yolov5: lighter, faster and easier to deploy. Evolved from yolov5 and the size of model is only 1.7M (int8) and 3.3M (fp16). It can reach 10+ FPS on the Raspberry Pi 4B when the input size is 320×320~

pogg 1.5k Jan 5, 2023
Computational modelling of ray propagation through optical elements using the principles of geometric optics (Ray Tracer)

Computational modelling of ray propagation through optical elements using the principles of geometric optics (Ray Tracer) Introduction By applying the

Son Gyo Jung 1 Jul 9, 2022
Detection of PCBA defect

Detection_of_PCBA_defect Detection_of_PCBA_defect Use yolov5 to train. $pip install -r requirements.txt Detect.py will detect file(jpg,mp4...) in cu

null 6 Nov 28, 2022
A faster pytorch implementation of faster r-cnn

A Faster Pytorch Implementation of Faster R-CNN Write at the beginning [05/29/2020] This repo was initaited about two years ago, developed as the firs

Jianwei Yang 7.1k Jan 1, 2023
Yolo ros - YOLO-ROS for HUAWEI ATLAS200

YOLO-ROS YOLO-ROS for NVIDIA YOLO-ROS for HUAWEI ATLAS200, please checkout for b

ChrisLiu 5 Oct 18, 2022
Yolo object detection - Yolo object detection with python

How to run download required files make build_image make download Docker versio

null 3 Jan 26, 2022
pytorch, hand(object) detect ,yolo v5,手检测

YOLO V5 物体检测,包括手部检测。 项目介绍 手部检测 手部检测示例如下 : 视频示例: 项目配置 作者开发环境: Python 3.7 PyTorch >= 1.5.1 数据集 手部检测数据集 该项目数据集采用 TV-Hand 和 COCO-Hand (COCO-Hand-Big 部分) 进

Eric.Lee 11 Dec 20, 2022
some classic model used to segment the medical images like CT、X-ray and so on

github_project This is a project for medical image segmentation. This project includes common medical image segmentation models such as U-net, FCN, De

null 2 Mar 30, 2022
It is a system used to detect bone fractures. using techniques deep learning and image processing

MohammedHussiengadalla-Intelligent-Classification-System-for-Bone-Fractures It is a system used to detect bone fractures. using techniques deep learni

Mohammed Hussien 7 Nov 11, 2022
Medical-Image-Triage-and-Classification-System-Based-on-COVID-19-CT-and-X-ray-Scan-Dataset

Medical-Image-Triage-and-Classification-System-Based-on-COVID-19-CT-and-X-ray-Sc

null 2 Dec 26, 2021