Code Monkey home page Code Monkey logo

bbx's Introduction

Package bbx

Simple operations over bounding boxes. The package provides a class Boxes encapsulating a set of bounding boxes. Internally, the boxes are represented in an Nx4 matrix with x1,y1,x2,y2 coordinates. Instances of Boxes support arbitraty user-defined fields which can hold other properties of boxes like e.g. score.

import bbx

B = bbx.Boxes([0,0,10,10])  # New instance
B.set_field("score", [1])  # Set the field
B.width()  # [10]
C = bbx.resize(B, 2)  # Resize and make new instance
C.get() # [[-5,-5,15,15]]
C.get_field("score")  # [1]
C.area()  # [400]

But why?

... for the glory of s... But seriously, I use bounding boxes in every other project and there is no decent small package for this. Yes I can use TF obj detection api (and I did for a while, this pkg have similar interface to it) or structures from imgaug or others. I did not find anything that suits my needs (if you know about something just let me know). You either install a big non-standard package with tons of functionality you do not need or you implement it by yourself. So I decided to make a very small package that does precisely what I need and nothing more, is portable (just numpy needed, and you already have it!).

Yes, I just implemented a non-standard package, so I so not need to use other non-standard packages... yes, I know...

Installation

The package is in PyPI so just use pip

pip install bbx

Contribute

Feelin' brave? Contribute with code! You can also submit an issue if something is broken.

License

This code is published under MIT License

bbx's People

Contributors

romanjuranek avatar

Stargazers

Gopal Krishna avatar Robin Cole avatar

Watchers

 avatar

bbx's Issues

Hope to get the code for your paper

Dear Roman Juranek:
I hope this letter did not disturb you. I am a student in Computer Vision. I am learning camera calibration recently. I have read your paper Traffic Surveillance Camera Calibration by 3D Model Bounding Box Alignment for Accurate Vehicle Speed Measurement. I hope I could get your code and know details in your work. It can give a huge help in my study. I don't have a tutor to guide me in my studies. I can only rely on myself. I hope you can help me.

Best Wishes

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.