shoumikchow / bbox-visualizer Goto Github PK
View Code? Open in Web Editor NEWMake drawing and labeling bounding boxes easy as cake
Home Page: https://bbox-visualizer.readthedocs.io
License: MIT License
Make drawing and labeling bounding boxes easy as cake
Home Page: https://bbox-visualizer.readthedocs.io
License: MIT License
Is your feature request related to a problem? Please describe.
When I tried using this package, I found it annoying to draw the box first and then decide on a labelling method. And it was again inconsistent incase of draw_flag_with_label()
.
Describe the solution you'd like
I had a suggestion, I think it would be easier and very pythonic if we could pass the labelling style as an argument to a function.
Like this,
def draw_box(image, bbox, labelling_method="regular")
...
and the labelling_method
argument can take regular
, t-style
, flag
.
Additional context
None
How are you @shoumikchow ? I found your project through Hacktoberfest2023, I liked your project I wanted to be able to contribute, initially my first contribution would be to expand the library's examples using the jupyter notebook, so anyone interested in using it can carry out a test using these examples.
I chose to rename the folder to examples, because I have a few more contributions in mind, I want to develop this for documentation along with code.
Describe the solution you'd like
I updated the folder name for examples, I kept your previous scripts so the user has both options. Expand the code to Jupyter notebooks showing step by step, I added some prints to show the user that it maintains the same type of data and each result also adds the box to the image.
The current size defaults aren't suitable for small images. Ideally, the user should have the option to change the size.
Add a new step in the documentation and reduce the size of the images in the readme, to make it more uniform
Thanks for the sharing.
I used cv2
to read and save a PNG
image, and used the bbv.draw_rectangle
to draw rectangles on this image. The code is listed below, and I found there is no bounding boxes in the saved image.
import cv2
import bbox_visualizer as bbv
img=cv2.imread('.\\xxx\\xx.png')
bbxes = [[ 583, 172, 620, 207], [ 599, 166, 629, 198], [1015, 193, 1241, 374], [ 739, 173, 884, 286], [ 666 , 165 , 728 ,220], [ 641 , 170 , 667 , 194]]
for bbx in bbxes:
bbv.draw_rectangle(img, bbx)
cv2.imwrite('.\\xx\\xxxx.png', img)
I also found that, if I use the bbv.add_label()
function for the same img and bbx, there will be labels in the saved image, but still no bounding boxes.
I'm using cv2-version-4.4, could you help me with this problem?
Describe the bug
All of the functions modify the passed image (numpy array). While the draw_rectangle
function creates a copy of the passed img
called output
, adds the rectangles to it and returns that. Therefore the examples given in the README do not in fact draw a rectangle.
Expected behavior
Either all functions need to return a new image, or draw_rectangle
needs to modify the passed image.
Version
0.1.0
Labels on the edge of the box aren't handled properly.
If an object detection model detects an image at the edge of the frame, there is a chance that some portions of a bounding box is outside the frame itself. That is, some of xmin, xmax, ymin, ymax might be negative or larger than the image dimension itself. In cases like these, OpenCV handles it by not drawing the bounding box at all.
Ideally, it should draw the lines that are outside the image dimensions along the edge.
Similar to #3, there can be cases where the label is not drawn/written if the coordinates are outside of the frame. In that case, the label should fallback to the regular label.
Add tests to bbox, improving its performance and matching its outputs
I'm working on this test branch that I created in the fork
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when I can't change the color of the bounding box.
Describe the solution you'd like
Possibility to change the color of the bounding box.
Create file manipulation labels:
Me create new branch in my fork, initialize development this issue
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.