I want to use Prodigy to correct annotation of a vision ml algorithm.
I currently have a json file that is constructed almost like what's indicated in the documentation. The only difference is that the key of each bracket correspond to the frame of the video.
I have every frame of that video exported in a folder (with their name being "[FrameNumber].png").
I want to use image.manual to review the annotations and correct them.
I face two different problems:
How to format the json file in order to import it in the prodigy database ?
Prodigy doesn't seems to like the way I use dictionnary to link the frame number to its annotation.
Instead of using a dictionnary, I'm gonna be forced to stock every image (through its base 64 encoded image data) directly in that json imported file ? Isn't there any way to link it directly for a local file ?
How to export the database without the base64 image associated to each annotation ?
When I try to use the db-out command on some annotation, it gives me the annotation in the correct format but also the base 64 image data in that file.
Is there any way to only export annotation data from the database and not the image data ?
You don't need to import anything upfront to annotate it with Prodigy – you can also write your own custom recipe that takes the input data in your format, and generates annotation examples from them. Or you can generate them as a preprocessing step, that's up to you
The only thing that's important is that the data that gets sent out by your stream follows the expected JSON format. You can find an example of the data format here: https://prodi.gy/docs/api-interfaces#image_manual Each example should have a key "image" and a key "spans" containing a list of bounding boxes, just like the ones you already have in your data.
You don't have to use base64 – you can also set "image" to a URL (e.g. hosted in an S3 bucket or a local web server). The problem with local file paths is mainly that modern browsers typically block them for security reasons – so you either want to send the image data with each task (works well for smaller images) or serve them somewhere. Prodigy also comes with an Images and ImageServer loader that helps you load/serve files from a directory: https://prodi.gy/docs/api-loaders#loaders-file