Closed thomassajot closed 4 years ago
Keeping the prediction made by the model on the remaining images would speed up the labelling process. This UI is build using jupyter-innotater
Hi,
thanks for raising this! I am actually currently working on this. I'm developing the bounding box / polygon interface here: https://ipyannotations.readthedocs.io/en/latest/
For the integration, really the only thing missing is to document it. If you want to try it, you can do:
pip install superintendent ipyannotations
then run this in a notebook:
from ipyannotations import PolygonAnnotator
from superintendent.base import Labeller
input_widget = PolygonAnnotator(classes=["pigeon"])
labeller = Labeller(
features=["img/vdnkh.jpg"], # your list of images
input_widget=input_widget,
display_func=input_widget.display
)
labeller
Hi,
This is great !
I believe the classes
argument of PolygonAnnotator should be called options
.
Unfortunately I did not manage to display the image.
from ipyannotations import PolygonAnnotator
from superintendent.base import Labeller
input_widget = PolygonAnnotator(options=["pigeon"])
labeller = Labeller(
features=["my_image.jpg"],
input_widget=input_widget,
display_func=input_widget.display
)
labeller
Would you know about this issue ?
Yes, you're right, that's a mistake on my side.
I'm not sure why the image is not displaying... is the image stored in the same directory as the notebook you're working in?
And if you have an older version of jupyter notebook
installed, you may have to also run this command:
jupyter nbextension enable --py --sys-prefix ipycanvas
(see here )
Installing the extension solves the display issue. Thanks !
There is a subsequent bug.
Running the code once creates a labeller.new_labels
with one element in the list [None]
Running the code a second time, labeller.new_labels
is now a list of two elements [None, None]
OK, thanks for letting me know - I'll take a look
I've figured it out, it's a silly bug on my part. I'm pushing a fix now, plus some documentation of this example!
This bug is now fixed (see https://github.com/janfreyberg/superintendent/releases/tag/0.5.1) - make sure to upgrade to the latest version from PyPI. As part of this release I also added documentation for using ipyannotations widgets: https://superintendent.readthedocs.io/en/latest/modularity.html
Great ! Thank you for the fix.
A useful feature for object detection is to define the bounding box (or even polygon) around one or many objects in an image.