Conversation
|
We don't get any annotations when we import if we only export points. This is true? It's correct in terms of format, but I'm not sure that it's good for CVAT. Maybe generalize this format? We can save both points and labels if we only have points. That is, when importing such a dataset, we will add extra labels, but the points will not disappear. |
Yes, it's true. If we have only points annotations exported dataset in LFW format will be empty. I didn't choose the solution you suggested for the following reasons:
But I understand that this is not an obvious question and it is difficult to find only one "correct" solution. @zhiltsov-max How do you think? |
|
Could you please update the Changelog? I also think the documentation needs to be updated. |
| source_dataset = Dataset.from_iterable( | ||
| [ | ||
| DatasetItem( | ||
| id="name0_0001", | ||
| subset="test", | ||
| media=Image(data=np.ones((2, 5, 3))), | ||
| annotations=[ | ||
| Points([0, 4, 3, 3, 2, 2, 1, 0, 3, 0], label=0), | ||
| ], | ||
| ), | ||
| ], | ||
| categories=["name0"], | ||
| ) | ||
|
|
||
| target_dataset = Dataset.from_iterable( | ||
| [ | ||
| DatasetItem( | ||
| id="name0_0001", | ||
| subset="test", | ||
| media=Image(data=np.ones((2, 5, 3))), | ||
| ), | ||
| ], | ||
| categories=["name0"], | ||
| ) |
There was a problem hiding this comment.
I don't think this behavior in the test is right. From the format viewpoint, the input annotations are incomplete, and it doesn't seem we can adequately support such cases in the format, so the best approach would be either to complete the missing annotations, if possible, or raise a clear error message otherwise.
My considerations on this specific case with CVAT export are here. Let's try to make the format clearly usable from CVAT, Datumaro seem to be correct at this point.
|



Summary
Resolves cvat-ai/cvat#5100
How to test
Checklist
developbranchLicense
Feel free to contact the maintainers if that's a concern.