Skip to content

Conversation

jtsodapop
Copy link
Contributor

@jtsodapop jtsodapop commented Aug 17, 2022

This PR is designed to:

  • create a new annotation type class for documents which will test against if an export annotation contains page and unit
  • Add this to extra field when it exists, else it passes back None

Rough example output:

name='boxy' 
feature_schema_id='cl6xnuwt95lqq07330tbb3mfd' 
extra={'instanceURI': 'https://api.labelbox.com/masks/feature/cl6xnzjpq0dmx07yo0qh40z0n?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJja2NjOWZtbXc0aGNkMDczOHFpeWM2YW54Iiwib3JnYW5pemF0aW9uSWQiOiJja2N6NmJ1YnVkeWZpMDg1NW8xZHQxZzlzIiwiaWF0IjoxNjYwNzYxNDUwLCJleHAiOjE2NjMzNTM0NTB9.X4-j6zee8o685PUrL9C6oC2m6TayKuJQHhN8iLgG8kI', 
'color': '#1CE6FF', 
'feature_id': 'cl6xnzjpq0dmx07yo0qh40z0n', 
'value': 'boxy', 
'page': 3, 
'unit': 'POINTS'} 
value=Rectangle(extra={}, start=Point(extra={}, x=83.34, y=298.12), end=Point(extra={}, x=83.72, y=501.95000000000005)) classifications=[] 

@jtsodapop jtsodapop changed the title [AL-3329] Document Annotation Type [AL-3329] Document Annotation Type for Export Aug 17, 2022
@jtsodapop jtsodapop changed the title [AL-3329] Document Annotation Type for Export [WIP][AL-3329] Document Annotation Type for Export Aug 17, 2022
@jtsodapop jtsodapop changed the title [WIP][AL-3329] Document Annotation Type for Export [AL-3329] Document Annotation Type for Export Aug 17, 2022
Copy link
Contributor

@kkim-labelbox kkim-labelbox left a comment

Choose a reason for hiding this comment

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

Some questions around this:

  1. What's the difference between labelbox_v1 representations of annotations versus stuff inside serialization/ndjson ?
  2. Do we need a new rectangle object type specific to document? I don't see this pattern used for other data types, e.g. Video or Images

@jtsodapop
Copy link
Contributor Author

Some questions around this:

  1. What's the difference between labelbox_v1 representations of annotations versus stuff inside serialization/ndjson ?
  2. Do we need a new rectangle object type specific to document? I don't see this pattern used for other data types, e.g. Video or Images

not sure if you receive an update when I make a reply, so re-tagging @kkim-labelbox !

  1. labelbox_v1 representation is just the transformations between the labelbox export and the annotations themselves. the ndjson converter is for transformations between the annotations and a labelbox import format (which will be done in a separate PR)
  2. there will be nothing different between the existing bounding box annotation for other data types such as image, and this one. the only difference is the page and unit keys from the export.

i set this up this way since i thought it would make more sense to just re-use the LBV1Rectangle code as there are no required additional changes, but if it would make more sense to paste the same code in for this new class, i am open to it

@jtsodapop jtsodapop changed the title [AL-3329] Document Annotation Type for Export [WIP][AL-3329] Document Annotation Type for Export Aug 18, 2022
@jtsodapop jtsodapop changed the title [WIP][AL-3329] Document Annotation Type for Export [AL-3329] Document Annotation Type for Export Aug 18, 2022
Copy link
Contributor

@kkim-labelbox kkim-labelbox left a comment

Choose a reason for hiding this comment

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

LGTM!

@jtsodapop
Copy link
Contributor Author

Will update changelog once import side has also been complete!

@jtsodapop jtsodapop merged commit f11ac19 into develop Aug 18, 2022
@jtsodapop jtsodapop deleted the jtso/al-3329 branch August 18, 2022 21:31
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.

2 participants