Live data from Hacker News

Show HN: bbox-visualizer – Make drawing and labeling bounding boxes easy as cake

github.com

1–10 of 25 posts

Re: Show HN: bbox-visualizer – Make drawing and labeling bounding boxes easy as cake

#2
Drawing these bounding boxes can be a fiddly thing to get right, and for some it can be troublesome, so this probably will be worthwhile for a group of people.

With that said, the dependency on OpenCV seems entirely overkill. Surely Pillow would be a much more sensible dependency (with ImageDraw), as all you're doing with this package is drawing rectangles and labels, rather than handling any CV tasks?

Re: Show HN: bbox-visualizer – Make drawing and labeling bounding boxes easy as cake

#3
post #2

Drawing these bounding boxes can be a fiddly thing to get right, and for some it can be troublesome, so this probably will be worthwhile for a group of people. With that said, the dependency on OpenCV seems entirely overkill. Surely Pillow would be a much more sensible dependency (with ImageDraw), as all you're doing with this package is drawing rectangles and labels, rather than handling any CV tasks?

Personally, I've always used OpenCV with all object detection and object recognition tasks I've worked on to take advantage of the many CV functions it provides. So it was only natural for me to use OpenCV since it wouldn't require an additional dependency like Pillow.

I could've definitely used Pillow, but is there any tangible advantage to using Pillow over OpenCV?

Re: Show HN: bbox-visualizer – Make drawing and labeling bounding boxes easy as cake

#4
post #2

Drawing these bounding boxes can be a fiddly thing to get right, and for some it can be troublesome, so this probably will be worthwhile for a group of people. With that said, the dependency on OpenCV seems entirely overkill. Surely Pillow would be a much more sensible dependency (with ImageDraw), as all you're doing with this package is drawing rectangles and labels, rather than handling any CV tasks?

Personally, I've always used OpenCV with all object detection and object recognition tasks I've worked on to take advantage of the many CV functions it provides. So it was only natural for me to use OpenCV since it wouldn't require an additional dependency like Pillow. I could've definitely used Pillow, but is there any tangible advantage to using Pillow over OpenCV?

Looking over the library quickly, I really like it, that being said, Pillow is a much smaller and more self contained library than OpenCV, some projects try and avoid openCV if not necessary and this would extend to this project as well.

Re: Show HN: bbox-visualizer – Make drawing and labeling bounding boxes easy as cake

#5
Can someone explain to me why I would need a library to draw bounding boxes with a label? I don't understand why this is a hard problem that warrants a library. There isn't even any 'fiddly math' in there.

I seriously don't get it. Have we become so incapable that we can't draw rectangles and labels anymore by our self?

Re: Show HN: bbox-visualizer – Make drawing and labeling bounding boxes easy as cake

#6
post #5

Can someone explain to me why I would need a library to draw bounding boxes with a label? I don't understand why this is a hard problem that warrants a library. There isn't even any 'fiddly math' in there. I seriously don't get it. Have we become so incapable that we can't draw rectangles and labels anymore by our self?

You are correct that you do not need this library to draw bounding boxes with a label. You can use OpenCV or Pillow to draw it.

However, positioning the label to be exactly above the bounding box can be a little finicky. This just takes care of the math that you'd have to do to place it right above the box. I agree that I am not doing something revolutionary with the math here, but these functions are something that I've had to use over and over again and thought it would be nice to package the whole thing. This library abstracts everything behind two main functions.

There are also a few different visualizations that you can use.

Re: Show HN: bbox-visualizer – Make drawing and labeling bounding boxes easy as cake

#7
post #5

Can someone explain to me why I would need a library to draw bounding boxes with a label? I don't understand why this is a hard problem that warrants a library. There isn't even any 'fiddly math' in there. I seriously don't get it. Have we become so incapable that we can't draw rectangles and labels anymore by our self?

You are correct that you do not need this library to draw bounding boxes with a label. You can use OpenCV or Pillow to draw it. However, positioning the label to be exactly above the bounding box can be a little finicky. This just takes care of the math that you'd have to do to place it right above the box. I agree that I am not doing something revolutionary with the math here, but these functions are something that…

Thanks for your thoughtful reply. I guess I have more of a problem with this hitting the front page of HN than with you publishing it. If you use it a lot and abstract it into a library, that's fine, we all do that. But it looks like people are interested in it and I don't understand why.

Don't get me wrong, I like that you published it and I encourage it as much as I can. But if someone is capable of running complex object detection algorithms, they surely can position a label correctly without the need for another library?! This is just a couple of lines of code you can write without even thinking much about it.

Maybe I'm just out of touch, but it's so weird to me that people out there might find this useful.

Re: Show HN: bbox-visualizer – Make drawing and labeling bounding boxes easy as cake

#8
post #7

Earlier quoted context omitted.

You are correct that you do not need this library to draw bounding boxes with a label. You can use OpenCV or Pillow to draw it. However, positioning the label to be exactly above the bounding box can be a little finicky. This just takes care of the math that you'd have to do to place it right above the box. I agree that I am not doing something revolutionary with the math here, but these functions are something that…

Thanks for your thoughtful reply. I guess I have more of a problem with this hitting the front page of HN than with you publishing it. If you use it a lot and abstract it into a library, that's fine, we all do that. But it looks like people are interested in it and I don't understand why. Don't get me wrong, I like that you published it and I encourage it as much as I can. But if someone is capable of running complex…

I find it interesting, nom, that you could be adept at using object detection algorithms and still not detect the reason why people are interested in reading this article.

Re: Show HN: bbox-visualizer – Make drawing and labeling bounding boxes easy as cake

#9
post #7

Earlier quoted context omitted.

You are correct that you do not need this library to draw bounding boxes with a label. You can use OpenCV or Pillow to draw it. However, positioning the label to be exactly above the bounding box can be a little finicky. This just takes care of the math that you'd have to do to place it right above the box. I agree that I am not doing something revolutionary with the math here, but these functions are something that…

Thanks for your thoughtful reply. I guess I have more of a problem with this hitting the front page of HN than with you publishing it. If you use it a lot and abstract it into a library, that's fine, we all do that. But it looks like people are interested in it and I don't understand why. Don't get me wrong, I like that you published it and I encourage it as much as I can. But if someone is capable of running complex…

Same reason I might use tippy.js for popup boxes. I know I could make it myself, and make it just as well as the tippy authors have designed it, but why waste my time doing that when I know they've already thought through all of the problems that I can't even expect until I'm already in the thick of it?

Re: Show HN: bbox-visualizer – Make drawing and labeling bounding boxes easy as cake

#10
post #5

Can someone explain to me why I would need a library to draw bounding boxes with a label? I don't understand why this is a hard problem that warrants a library. There isn't even any 'fiddly math' in there. I seriously don't get it. Have we become so incapable that we can't draw rectangles and labels anymore by our self?

It's not about capability, but efficiency. This seems handy enough for me to adopt into custom labeling tools I wrote using cv2 and PIL, etc.
Post reply on HN