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.

Download

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

Train

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

$ 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 our model on public dataset MS COCO, and it also achieves competitive results.

Model size
(pixels)
mAPval
0.5:0.95
mAPtest
0.5:0.95
mAPval
0.5
params
(M)
FLOPS
640 (B)
YOLOv3-tiny 640 17.6 17.6 34.8 8.8 13.2
YOLOv3 640 43.3 43.3 63.0 61.9 156.3
YOLOv3-SPP 640 44.3 44.3 64.6 63.0 157.1
LF-YOLO 640 27.8 27.9 47.8 7.4 17.1
Table Notes (click to expand)
  • APtest denotes COCO test-dev2017 server results, all other AP results denote val2017 accuracy.
  • AP values are for single-model single-scale unless otherwise noted. Reproduce mAP by python test.py --data coco.yaml --img 640 --conf 0.001 --iou 0.65
  • SpeedGPU averaged over 5000 COCO val2017 images using a GCP n1-standard-16 V100 instance, and includes FP16 inference, postprocessing and NMS. Reproduce speed by python test.py --data coco.yaml --img 640 --conf 0.25 --iou 0.45
  • All checkpoints are trained to 300 epochs with default settings and hyperparameters (no autoaugmentation).

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