Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semantic Schema API proposal #19

Conversation

dennis-lynch-nv
Copy link
Contributor

API to store semantic labels on prims

A simple multiple-apply schema proposal to store semantic data labels on USD prims, for use in AI/ML or Computer Vision applications.

Supporting Materials

None

Contributing

@kevthecoder
Copy link

kevthecoder commented Nov 21, 2023

Thanks for putting together the proposal.

I'm interested in RDF / Semantic Web for interlinked game worlds and I was trying to see how it could work with this schema. I thought I'd drop a few thoughts here.

A bit of background to RDF for anyone reading who is not familiar - it basically tries to reduce knowledge down into simple atomic statements into the form "Subject–Predicate–Object". For example "The glass (Subject) is on (Predicate) the table (Object)". These atomic statements can then be chained together into a knowledge graph (e.g. when the Object of one statement becomes the Subject of another).

My tentative conclusion is that RDF could be made to fit this proposal's schema by following some conventions. By assuming that the current Prim is the Subject, then the Predicate name could be included in the Multiple-Apply namespace, and finally the Objects ending up in the labels list. As an example, here's some markup which could be applied to a Prim which represents an instance of a car (with a link to more detailed information):

token[] semantics:rdf_type:labels = ["https://schema.org/Car", "https://schema.org/Vehicle"]
token[] semantics:rdfs_label:labels = ["Bob's car"]
token[] semantics:rdfs_seeAlso:labels = ["https://example.com/my-car-123"]

It looks slightly strange from an RDF point of view. The character : is often used in RDF namespaces (e.g. rdf:type, rdfs:seeAlso), but I've replaced it with an underscore in the example above to prevent collisions with the Multiple-Apply namespace (which also uses :). I accept conventions around token names are outside the scope of the current proposal though.

One other thought is that label is a common property in RDF, so it's a little odd seeing labels tacked onto the end of every namespace name, but I guess it's going to hard to pick something that's generic enough (members, items, ...?). I recognise the term 'labels' is often used in ML, so not a big deal.

It would be nice to have support for adding full RDF triples to OpenUsd, but I recognise that would probably be handled better in a dedicated schema in the future if we need it.

@dennis-lynch-nv
Copy link
Contributor Author

Hi @kevthecoder ,

Web semantics (specifically OWL and RDF) was something I looked-at when crafting this.

Overall, the conclusion was that OWL/RDF was very powerful, but also more complex than the current proposal. Since there are many datasets that are simpler key:value pairs

But, as you note), RDF can still be mapped-onto this schema if someone wishes and I think that your example is fairly spot-on with how to accomplish this.

@kevthecoder
Copy link

Thanks for reviewing @dennis-lynch-nv!

Copy link
Member

@meshula meshula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are good to merge, with Draft status. @dsyu-pixar

@dsyu-pixar
Copy link
Collaborator

@dennis-lynch-nv apologies, would it be possible to git-sign the commits?

@dennis-lynch-nv
Copy link
Contributor Author

@dsyu-pixar - Commits have been signed

@dsyu-pixar dsyu-pixar merged commit ad38f06 into PixarAnimationStudios:main Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Published
Development

Successfully merging this pull request may close these issues.

None yet

5 participants