Skip to content

Conversation

@whilefalse
Copy link
Contributor

These fields are present in the darwin JSON v2 export, but they are not exposed by the relevant python types.

We need these for some upcoming work which reads darwin-py exports.

These fields are present in the darwin JSON v2 export, but they are not
exposed by the relevant python types.

We need these for some upcoming work which reads darwin-py exports.
@linear
Copy link

linear bot commented Feb 23, 2023

MOD-603 [darwin-py] Expose item_id and annotation_id

Background

For calculating IOU matches in the pytorch-metrics script, we need to know these pieces of information, so that we can pass back the results to the backend in a nice format.

  • dataset_item_id Required so that we know which item a set of matches belongs to
  • annotation_id Required so we can send back the actual annotation ID matches, as opposed to just an index as we have now.

Solution

All of these things are currently available, it's just that they aren't exposed in the darwin-py datatypes.

  • item_id is in the JSON, but not exposed on dt.AnnotationFile
  • annotation_id is in the JSON, but not exposed on the dt.Annotation

The solution is to add new fields to the datatypes, and expose the relevant values:

  • item_id - a new field on dt.AnnotationFile
  • annotation_id - a new field on dt.Annotation

Copy link
Contributor

@Nathanjp91 Nathanjp91 left a comment

Choose a reason for hiding this comment

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

LGTM

@whilefalse whilefalse merged commit 87388d5 into master Feb 27, 2023
@whilefalse whilefalse deleted the mod-603-darwin-py-expose-item_id-section_index branch February 27, 2023 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants