-
Notifications
You must be signed in to change notification settings - Fork 7
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
Implement Darwin v7 reader and improve annotation class #162
Conversation
- Introduces a breaking change (!)
- Bumped pydantic to >2.0.0 - Added mypy to the dev requirements - Cleanup variables and code in annotations.py
dlup/annotations.py
Outdated
|
||
# Now we can make WsiSingleLabel annotations | ||
output = [] | ||
for an_cls in annotations: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for an_cls, coordinates in annotations.items():
output.append(WsiSingleLabelAnnotation(a_cls=an_cls, coordinates=coordinates))
return cls(output)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a very small change to make it a bit more explicit that we get the "coordinates"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Looks good :). Here is an test json file for testing darwin parsing: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks to me that this is ready to go :)
The suggested changes have two major changes
WsiAnnotations
are now a class rather than a string. This means that you can haveAnnotationClass
with the label 'tumor' and the type being any AnnotationTypeWe have also included the changes of #157