Giter Club home page Giter Club logo

Comments (7)

rrolf avatar rrolf commented on May 27, 2024

Persist Track to JSON Object. Create Track from JSON File

from annotation-tool.

JulianKniephoff avatar JulianKniephoff commented on May 27, 2024

As is often the case, this proves hairier than we thought. Some questions that presented themselves while thinking about this more in depth:

  • Should this export contain the labels and scale values used in the annotations of the exported tracks?
  • And what about the categories and scales these belong to?
    • And what about the labels and scale values that belong to those but that are not used by the exported annotations?

If the answer to any of these questions is yes, then the next question is:

  • What happens if a corresponding entity already exists?
    • And how would we even recognize this?
    • Or do we just ignore it?

If it is no, then we of course have a problem in that case; but even if we assume that all the necessary related entities are there, the question of how we recognize them remains. For example: A category C of a video V1 has another ID than the "same" category C' on a video V2 (let's say we exported it from V1 and imported it in V2). We could of course use other attributes to identify entities during this process, but that has its own problems, of course. No one stops me from creating two categories both named C on V2 for example.

I think we need to specify the exact use case again, with all of these problems in mind. Can you do that, @ebbertd?

from annotation-tool.

ebbertd avatar ebbertd commented on May 27, 2024

There is no use case in which it makes sense to import a track to a video where not the same categories are used. So exporting the categories / labels / scales with the track is not needed.

As for the problem with the import and category matching. Would it be possible to introduce persistent category identifiers? If that would be possible then you could check during the track import if the needed categories exist. This then gives to cases:

  • The categories exist and therefore the track is imported.
  • The categories don't exist. In this case an error is shown and the track is not imported.

from annotation-tool.

JulianKniephoff avatar JulianKniephoff commented on May 27, 2024

What exactly do you mean by "persistent category identifiers"?

One possibility to make this very simple for now would be to just assume that the pairs (category_name, label_name) and (scale_name, scale_value_name) is unique. 🤔

from annotation-tool.

ebbertd avatar ebbertd commented on May 27, 2024

I just mean that there could be some kind of identifier that stays the same during the import / export process so that you could reliably check the existence of the categories.

from annotation-tool.

JulianKniephoff avatar JulianKniephoff commented on May 27, 2024

Introducing something like this is no small feat, though. I would really argue for just assuming that we can match the label and scale value names in the context of their corresponding category/scale.

So when exporting the tracks, every annotation would reference their label by name, and would additionally contain the name of the category that that label belongs to.

When importing such an annotation, we would look whether there is a label with that name in a category with that name. If there is not, or if there are multiple such matches, the import fails.

Same for the scales/scale values.

Would that be okay?

from annotation-tool.

ebbertd avatar ebbertd commented on May 27, 2024

Yes that is reasonable.

from annotation-tool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.