ina-foss / amalia.js

Metadata enriched HTML5 video player
http://ina-foss.github.io/amalia.js
MIT License
196 stars 41 forks source link

Extract annonations using editor plugin #7

Open ogulkokan opened 2 years ago

ogulkokan commented 2 years ago

Are we able to extract bounding box information using the editor plugin? The overlay plugin is working as expected if you have a proper annotation file as JSON format in your example but It is not possible to use the overlay plugin without using the editor plugin. Because the annotation .json file format is different and not similar to other software formats.

nrv commented 2 years ago

It seems the edition of bounding boxes is broken with amalia 1.3.2, try with the previous version 1.3.1

ogulkokan commented 2 years ago

I tried both versions but was unable to open toolbox (createAddToolboxItem) to add bounding box. Maybe I am doing something wrong. I added overlay plugin to the editor plugin sample like in the picture. So you can still see bounding box at the timeline but can not add anything new.

Another question. I just would like to visualize bbox annotations on a web player like amalia.js plugin library. Is there any script to translate different annotations for the amalia.js plugin? For example, I would like to visualize the result CVAT XML annotations on this plugin

c4c31(7-b637-4a3e-bc52-2b4S6810892

nrv commented 2 years ago

you need the editable parameter for the plugins : `plugins: { dataServices: [ '/videos/MGCAF0006836--AP_1_213419_231219.json' ], list: [ { 'className': 'fr.ina.amalia.player.plugins.OverlayPlugin', //'metadataId' : 'tracks-amalia01', debug: true, 'parameters': { editable: true, cuepointMinDuration: 1, //'labels': true, style: { 'fill': '#FFA500', 'strokeWidth': 2, 'stroke': '#FFA500', 'fillOpacity': 0 } } }, { 'className': 'fr.ina.amalia.player.plugins.MetadataListEditorPlugin', 'container': '#player-list-editor-plugin', 'debug': true, 'parameters': { defaultDataType : fr.ina.amalia.player.PluginBindingManager.dataTypes.VISUAL_TRACKING } }, { 'className': 'fr.ina.amalia.player.plugins.MetadataBlockEditorPlugin', 'container': '#player-block-editor-plugin', 'debug': true, 'parameters': {} },

                {
                    'className': 'fr.ina.amalia.player.plugins.TimelinePlugin',
                    'container': '#player_timeline-plugin',
                    'debug': false,
                    'parameters': {
                        debug: true,
                        timeaxeExpandable: true,
                        resizable: true,
                        displayLines: 2,
                        editingMode: true,
                        lineDisplayMode: fr.ina.amalia.player.plugins.PluginBaseMultiBlocks.METADATA_DISPLAY_TYPE.STATIC_DYNAMIC,
                        listOfLines: []
                    }
                }
            ]

        }`
nrv commented 2 years ago

and you may have to press CTRL + Click to add a box

ogulkokan commented 2 years ago

Thanks, both answers solved the issue. I am able to use the editor plugin now.

I am writing a script that converts coco.json to amalia overlay.json format. But instead of getting only turning points, I would like to get the timecode for each frame and the x, y, rx, ry informations for each frame also. When I run this converted file amalia overlay plugin is not able to play properly. first ul if I skip frames like in amalia.json example result is getting smoother: second

How is the transition part is working actually? Is there any way to solve this issue?