Giter Site home page Giter Site logo

yolov8-pidray's Introduction

YoloV8 PIDray detection


1) About work

Automatic security inspection relying on computer vision technology is a challenging task in real-world scenarios due to many factors, such as:

  • intra-class variance,
  • class imbalance,
  • occlusion.

Most previous methods rarely touch the cases where the prohibited items are deliberately hidden in messy objects because of the scarcity of large-scale datasets, hindering their applications.

To address this issue and facilitate related research, was presented a large-scale dataset, named PIDray, which covers various cases in real-world scenarios for prohibited item detection.

This dataset has three degrees of difficulty: easy, hard, hidden.

Also, the authors of the article presented their approach for the detection and segmentation of these items.

You can find it in original repo.

2) Original approach

According to the article, the author proposes the selective dense attention network (SDANet), formed by the dense attention module and the dependency refinement module.

This method has the following metrics:

3) Yolo approach

For these case I`ve trained two detectors from ultralytics: new YoloV8 and pretty old YoloV5.

Both of them was trained on RTX 3090 for 300 epochs and batch size = 32.

To make the inference fast, I took a Small version of Yolo.

The detectors were compared after training.

YoloV8s inference

YoloV5s training results:


results

YoloV8s training results:


results

Comparison


As we can see, YoloV8s shows the mAP result better than YoloV5s by 11%. That`s very cool.

Method Easy mAP Hard mAP Hidden mAP Overall mAP Inference / ms (RTX 3090)
YoloV5s 0.738 0.715 0.493 0.648 ~6 ms/image
YoloV8s 0.818 0.78 0.589 0.729 ~6 ms/image

Moreover, light YoloV8s better than huge SDANet more than 15% (72.9 mAP vs 61.6 mAP)...

mAP difference between YoloV8s and YoloV5s by each class in hidden subset:

plot

4) Try it yourself


In my repository you can find everything you need to run YoloV8 on PIDray data.

The only thing you need is downloaded and converted from Coco-format to Yolo-format PIDray dataset. You can download it from original repo

Also, before start you need to install ultralytics:

pip install ultralytics

Now you can use pretrained YoloV8s weights from weights folder to predict or validate on PIDray data.

Check demo.ipynb for simple inference example using high-level ultralytics lib.

If you want more, check ultralytics YoloV8 docs.

yolov8-pidray's People

Contributors

haksorus avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

humairabano

yolov8-pidray's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.