How to annotate the objects and the relations between the objects in images? - relationship

Like the visual relationship detection dataset, i want to build my own dataset to train. So how to annotate the objects and the relations between the objects in images? I know the LabeiImg tool to annotate the objects in images, but is there any tool to also annotate the relationship between the objects? The VRD dataset (https://cs.stanford.edu/people/ranjaykrishna/vrd/) Thanks for reply!

Related

Mapping DMN table to a OWL ontology

As part of my research, I have been working on a DMN table and OWl ontology. I must map rules from the DMN table into an OCQA web ontology file and work later with SHACL to infer some rules.
In this process, as an initial step recently, my supervisor gave me a hint to map the DMN table with OWL.
His message:
"``https://www.omg.org/spec/DMN/1.2/About-DMN
You find an rdf specification on the bottom of the page.
First, you have to define the dmn schema in owl. Then you can directly define or import a dmn table into owl. Or you use the rdf schema."
I have very little idea about semantic web technology. So I studied some documents or tutorials and understood that classes, individuals, and relationships (object properties, data prop) made an ontology. Like this, I did practice an example development in Protege software also.
After his reply, I started to read what is an rdf scheme or OWL schema. But unfortunately, I didn't go further.
Can someone help me to understand the schema or help me define a relevant schema for the DMN table, as my supervisor suggested?
What should I do to define a schema? Is this nothing but making classes and individuals with relations or creating some placeholders and then getting them from the mapping of DMN? I am clueless. Should I use RDFPY library to do all these things?
"Stackoverflow is not supporting uploading DMN file. it is nothing but data in XML. below is the picture"
enter image description here DMN table for quality checks of a concrete curing method
Please, someone, help me to go further.
I would suggest making your schema in Protege. Your schema (ontology) will have a set of classes and properties between. Some ontologies will have named individuals, some will separate the named individuals out of the ontology. This is generally A-Box vs T-Box.
Personally, I use rdflib for python development but performance isn't great. For better performance you can use the redland python bindings - but it's a pain in the ass to work with.
As for your table... This is mostly an exercise in mapping from a relational data structure to a graph data structure. Each row represents a node of type 'Inspection' and has relations to the columns. For example consider the pseudo rdf,
Inspection_A rdf:type Inspection
Inspection_A hasActivity "Curing"
Inspection_A hasApprover "Site Engineer"
tldr; Your ontolgoy should have classes and relations (T-Box). Then in a separate file create instances of the classes (A-Box). T-Boxes will most likely be .owl files while the A-Box is turtle, nquads, json-ld, etc. When you load the two together in a graph database, it should be able to take the definitions in your T-Box and reason over your A-Box. You can use rdflib for programatically working with RDF. Your task is to map a table to a graph. The columns are relations, and table name is a class.

IdentityServer4.Models vs IdentityServer4.EntityFramework.Entities

I like to use the EntityFramework for persistence of the IndentityServer4 configuration data. But I was wondering why the same model Classes are duplicated in Model / Entities? Are both models always kept in sync? If I use the Entities, can I still include the Models project to use some convenient const and enum classes which are available in Models but not in Entities? Or is it better when using Entities to not include the Models library to prevent confusion.
Please advice.
The Models are duplicated in the IdentityServer4.EntityFramework library so that the models can be mapped to entities that make sense to Entity Framework (see the many lists of strings that need to be turned into entities so that they can be stored in separate tables). These entities are kept in sync by the IdentityServer team and the community.
There are mapper extensions for both types to convert them into one another: ToModel() and ToEntity().
Always use the Models unless you are communicating directly with the database.

When modeling a CouchDB object in Backbone, should there be a 1-1 relationship between a model and database?

When modeling a CouchDB object in Backbone, should there be a 1-1 relationship between a backbone model and a CouchDB database?
Currently, my models are around database documents and not a whole database. I am also using PouchDB to communicate witch CouchDB.
CouchDB dev here. Would not make them match 1:1. put all docs that belong to an app into a single database and give them a type field. Use a view to get all docs per type (or put the type as the prefix of the _id and use _all_docs/allDocs()) and have all docs of a type match the backbone model 1:1).
After a bunch of research and experimentation I came to the following conclusions.
You should use collections to model your database if your database holds related documents OR if you are using PouchDB.
Here is why:
1) A collection that holds related models is analogous to a a database that holds related documents.
2) Most importantly, if you are using PouchDB, you should use a collection to model your database. By doing so you can tie a collection to a PouchDB object and take advantage of backbone's events when the database or collection changes.
The alternative is to pass a reference to a PouchDB instance to each model.

Google Cloud Datastore: is it possible to "visualize" data entities in UML style?

My collegues have created a series of entities using "Google Cloud Datastore".
What I would like to achieve now is to generate a data schema from the set of entities we have got. Something like this.
It does not necessarily have to include the 1:1, 1:many, n:n archs but a UML style data structure generated for each entity would be already a good start.
The challenge is that:
when clicking on a "record" when colums are empty a data type does not show
some colum fields are "objects" (which can be complex JSON objects, not sure if I would prefer to model them as a separate entity and link them to it or to leave the word "object")
referencing between record is done by the developer and I doubt that there is a tool clever enough to understand this. Hence I do not expect to have also hte n:n relations shown.
Is there a project or a tool or a methodology to create this schema starting from an existing "Google Cloud Datastore"?

Tools to Generate an Ontology from a Database Schema and Content

Is there a tool that can infer an ontology from information contained in both a database schema and the content in that schema? Let's say that there are tables in the database defining the following:
The types of entities that can exist
Instances of those entities linked to type
The types of relationships that can exist
Instances of those relationships linked to type and the entities concerned
I feel that looking at the schema alone is going to give a much more general ontology than I would like.
Reveltyix has a partnership with Global IDs, a data goveranance and MDM. One of GID's data profiling tool can export RDF to us to boot strap up a good portion of the ontology, even when that spans multiple databases. The Revelytix technologies then use the resultant ontology to federate data and manage distributed information sources, without having to move the date.
Good Luck
Greg
201-232-9195

Resources