Coder Social home page Coder Social logo

r-peleg / bbox-visualizer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shoumikchow/bbox-visualizer

0.0 0.0 0.0 6.99 MB

Make drawing and labeling bounding boxes easy as cake

Home Page: https://bbox-visualizer.readthedocs.io

License: MIT License

Python 88.11% Makefile 11.89%

bbox-visualizer's Introduction

bbox-visualizer

Documentation Status License: MIT PyPI version Downloads

This package helps users draw bounding boxes around objects, without doing the clumsy math that you'd need to do for positioning the labels. It also has a few different types of visualizations you can use for labeling objects after identifying them.

The bounding box points are expected in the format: (xmin, ymin, xmax, ymax)

Installation:

pip install bbox-visualizer

Usage:

import bbox_visualizer as bbv

cover

image function
bbox with label on top bbv.draw_rectangle(img, bbox)
bbv.add_label(img, label, bbox, top=True)
bbox with T label bbv.draw_rectangle(img, bbox)
bbv.add_T_label(img, label, bbox)
label with flag bbv.draw_flag_with_label(img, label, bbox)
bbox with label inside bbv.draw_rectangle(img, bbox)
bbv.add_label(img, label, bbox, top=False)
label with opaque overlay bbv.draw_rectangle(image, bbox, is_opaque=True)
bbv.add_label(img, label, bbox, draw_bg=False, top=False)
multiple bbox bbv.draw_multiple_rectangles(img, bboxes)
bbv.add_multiple_labels(img, labels, bboxes)
multiple flags bbv.draw_multiple_flags_with_labels(img, labels, bboxes)
multiple T bbox bbv.draw_multiple_rectangles(img, bboxes)
bbv.add_multiple_T_labels(img, labels, bboxes)

There are optional functions that can draw multiple bounding boxes and/or write multiple labels on the same image, but it is advisable to use the above functions in a loop in order to have full control over your visualizations.

  • bbv.draw_multiple_rectangles(img, bboxes)
  • bbv.add_multiple_labels(img, labels, bboxes)
  • bbv.add_multiple_T_labels(img, labels, bboxes)
  • bbv.draw_multiple_flags_with_labels(img, labels, bboxes)

bboxes and labels are lists in the above examples.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

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.