Coder Social home page Coder Social logo

crop-focus-object-yolov8's Introduction

crop-focus-object-yolov8

This project is useful only for pre-trained yolov8 weights. It requires a weights file ("xxx.pt") and images to crop.

"crop_focus_object_driver.py" file is an example for using the crop function. You need to declare the paths of images and weight.pt file.

"choose_one_bbox.py" has a function which decides the bounding box which is most likely to be the focus object bbox in case of multiple detections.

Requirements that have to be installed:

ultralytics
cv2
os
imageio
pytorch
time

Here are some input-output examples of the crop function. (each edge has %1 margin added to original detection in the examples.)

(Images are resized to display and output images are not in their original cropped sizes.)

Example 1 input:

Example 1 output:

Example 2 input:

Example 2 output:

Example 3 input:

Example 3 output:

Example 4 input:

Example 4 output:

Example 5 input:

Example 5 output:

Example 6 input:

Example 6 output:

Example 7 input:

Example 7 output:

Example 8 input:

Example 8 output:

Example 9 input:

Example 9 output:

Example 10 input:

Example 10 output:

Example 11 input:

Example 11 output:

Example 12 input:

Example 12 output:

Example 13 input:

Example 13 output:

Example 14 input:

Example 14 output:

Example 15 input:

Example 15 output:

Example 16 input:

Example 16 output:

crop-focus-object-yolov8's People

Contributors

ozy5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

yanglilizhang

crop-focus-object-yolov8's Issues

Example

Here are some input-output examples of the crop function. (0.01 margin used)

Example 1 input:
182049_17002
Example 1 output:
182049_17002

Example 2 input:
182049_17017
Example 2 output:
182049_17017

Example 3 input:
182049_17028
Example 3 output:
182049_17028

Example 4 input:
182049_17035
Example 4 output:
182049_17035

Example 5 input:
![182049_17057](https://user-images.githubusercontent.com/125663669/232750192-e3047605-0a00-40cd-b8ce-2994bad447a
4.jpeg)
Example 5 output:
182049_17057

Example 6 input:
182049_17366
Example 6 output:
182049_17366

Example 7 input:
182049_17382
Example 7 output:
182049_17382

Example 8 input:
182049_17460
Example 8 output:
182049_17460

Example 9 input:
182049_17498
Example 9 output:
182049_17498

Example 10 input:
182049_17596
Example 10 output:
182049_17596

Example 11 input:
182049_17616
Example 11 output:
182049_17616

Example 12 input:
182049_17676
Example 12 output:
182049_17676

Example 13 input:
182049_17751
Example 13 output:
182049_17751

Example 14 input:
182049_17793
Example 14 output:
182049_17793

Example 15 input:
182049_17795
Example 15 output:
182049_17795

Example 16 input:
182049_17882
Example 16 output:
182049_17882

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.