Comments (5)
We could solve both this and #6 with one of the following designs. (Note again that these designs serve the purpose of going beyond weed ID as well, and would even apply to camera traps.)
Add a collection_ids
key to Annotation objects, which references a list of indexes.
The collections
key of the main JSON blob would contain a list of Collection objects. Each Collection object can contain arbitrary DCMI fields.
Now I'm a bit stuck. Which of the following?
- Subset objects: Have a separate list of 'subsets' each of which contains 'collection_id' and 'name', and each Annotation references both 'collection_ids' and 'subset_ids'?
"annotations": [ {..., "id": 0, "collection_ids": [0], "subset_ids": [0]}, {..., "id": 1, "collection_ids": [0], "subset_ids": [1]} ], "collections": [ {"id": 0, "title": "myweeds", "identifier": "doi:0000000/000000000000", "annotation_count": 158, "image_count": 104} ], "subsets": [ {"id": 0, "name": "myweeds train", "collection_id": 0, "annotation_count": 120, "image_count": 81}, {"id": 1, "name": "myweeds test", "collection_id": 0, "annotation_count": 38, "image_count": 23} ]
- Some collections are subsets: Some collections contain a 'part_of_collection_id' key (or a better name), and perhaps no DCMI but name because this is sufficient to inherent the DCMI from the parent collection? In that case, the annotation would need to point to both the subset collection ID and the complete collection ID. :\
"annotations": [ {..., "id": 0, "collection_ids": [0, 1]}, {..., "id": 1, "collection_ids": [0, 2]} ], "collections": [ {"id": 0, "title": "myweeds", "identifier": "doi:0000000/000000000000", "annotation_count": 158, "image_count": 104}, {"id": 1, "title": "myweeds train", "part_of_collection_id": 0, "annotation_count": 120, "image_count": 81}, {"id": 2, "title": "myweeds test", "part_of_collection_id": 0, "annotation_count": 38, "image_count": 23}, ]
- Associative entity: Another list of objects, "collection_memberships" references both Annotation and Collection. This associated entity is annotated with a subset name. This avoids storing a list of collection IDs in an annotation, improving consistency with existing COCO format, but it's a little harder to perform some operations over the dataset. This is closest to a relational database representation.
"annotations": [ {..., "id": 0, {..., "id": 1} ], "collections": [ {"id": 0, "title": "myweeds", "identifier": "doi:0000000/000000000000", "annotation_count": 158, "image_count": 104} ], "collection_memberships": [ {"annotation_id": 0, "collection_id": 0, "subset": "train"}, {"annotation_id": 1, "collection_id": 0, "subset": "test"} ]
- Collections define their subsets: Each Collection may contain a list of 'subsets', each of which then has a name and references a list of annotations by their UUID (because not all annotations will be present in a single export).
"annotations": [ {..., "id": 0, "uuid": "11111111-bf65-11ea-b3de-0242ac130004", "collection_ids": [0]}, {..., "id": 1, "uuid": "22211111-bf65-11ea-b3de-0242ac130004", "collection_ids": [0]} ], "collections": [ {"id": 0, "title": "myweeds", "identifier": "doi:0000000/000000000000", "subsets": [ {"title": "myweeds train", "annotation_uuids": [ "11111111-bf65-11ea-b3de-0242ac130004", "11111112-bf65-11ea-b3de-0242ac130004", "11111113-bf65-11ea-b3de-0242ac130004", ...]} {"title": "myweeds test", "annotation_uuids": [ "22211111-bf65-11ea-b3de-0242ac130004", "22211112-bf65-11ea-b3de-0242ac130004", "22211113-bf65-11ea-b3de-0242ac130004", ...]} ]} ]
I've put in things that allow you to check that your current JSON blob contains the entirety of a collection...
from weed-ai.
@hlydecker notes that we should avoid too much bloat/complication. It's a very fair point. But I think the idea of being able to represent that an annotation is included in one or more collections is worthwhile anyway... I think the challenge is working out how to represent "in multiple collections", which I think is a use case we will need down the line.
from weed-ai.
Your last two solutions look like the most appealing options to me. With your last "collections defining their subset" scenario, would each JSON blob then contain a list of all the images in each collection, or just the particular images within that collection which exist elsewhere in the JSON?
from weed-ai.
With your last "collections defining their subset" scenario, would each JSON blob then contain a list of all the images in each collection
My idea of using UUIDs is that it lists every annotation in the collection, regardless of whether they're in the current blob. it's a bit antithetical to the locally integral structure of COCO.
from weed-ai.
Would comparing the images in the current blob with the collection's origin blob be a possible way to get around dragging a list of all images along with every potential subset/re-use of the data?
from weed-ai.
Related Issues (20)
- Download data in different formats HOT 2
- 24hr editing/cooling off period for uploads to delete or change
- ocfl deposit metadata is still using the user's email address
- Need a reindex after migrating to ocfl HOT 2
- Handling error messages in the frontend
- Duplicate categories error HOT 1
- increase maximum image file size
- Final issues before delivery
- dataset editing feature functioning inconsistently
- Add annotation tab to frontend HOT 2
- CVAT integration feedback HOT 1
- annotate tab doesn't appear on 'About' page HOT 1
- Upload error - completes but with ConnectionTimeout error
- dataset is approved but does not show in dataset list HOT 1
- Diagnostic tool
- Integration with AgML
- site becomes unresponsive on data upload HOT 1
- cvat build breaks sometimes on pip install sklearn
- cvat-ui build fails on node 17 due to an open-ssl hash incompatibility
- Celery dependency issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weed-ai.