A Jupyter widget for annotating images with bounding boxes

Hello all, I’d like to show a custom widget I made for annotating images for object detection tasks.

It allows you to create and edit bounding boxes on an image with the mouse or keyboard. Created annotations are available in python. They can also be set from the python side and displayed in the widget.

There are many external image annotation tools but I like having one right inside the notebook. This way it’s easy to run my own half-trained detection model on a new image and use its output as the initial annotations. Then I only have to fix the model’s mistakes instead of marking everything manually.

Here’s a UI screenshot:

UI example

Repo link: GitHub - gereleth/jupyter-bbox-widget: A Jupyter widget for annotating images with bounding boxes
Installable with pip install jupyter_bbox_widget. You can also play with a live demo on Binder.

5 Likes

Looking great! As for the instructions in the readme, @jupyter-widgets/jupyterlab-manager can be installed with pip for JupyterLab 3.0 :slight_smile:

1 Like

Thanks!
That part of readme comes from the cookiecutter template I used. I didn’t feel confident enough to change anything there :sweat_smile:

So you’re saying that the line with jupyter labextension install @jupyter-widgets/jupyterlab-manager is only necessary for JupyterLab 1 or 2 and is redundant for JupyterLab 3?

Yes, I think so. Maybe that cookie cutter could be updated?

I checked and it looks like widget-ts-cookiecutter readme already removed the JupyterLab part of instructions leaving just pip install ...
I did the same in my repo but the widget-svelte-cookiecutter that I used still has it.

I already have one active pull request open there. I’ll see if I can figure out how to send a separate one concerning install instructions).

Huge thanks to @cabreraalex for sharing the Svelte widget template Creating Modern, Reactive Jupyter Widgets with Svelte
I found it through Svelte channels and it totally made my day :green_heart:

3 Likes

This made my day so happy it worked well for you! And sorry I somehow missed your pull request, thanks so much for sending it!

1 Like