Repository navigation
Conversation
211a390 to
d15f840
Compare
deruyter92
left a comment
There was a problem hiding this comment.
Looks great. A few high-level remarks that we may need to discuss first:
- I think your
LabeledDatalooks great a a new canonical long-format standard that we can use internally. I agree with the df as primary format with theto_arrayview that makes it available for training (or napari operations). - I think it would be useful to incorporate a single explicit
LabeledDataLayoutmodel that can be passed as context object next to the array view as handover to the training code, or anywhere else where arrays are used. I'd suggest a Pydantic model for this, which makes the validation easier. - As a final goal, my preference would go to a thinner public API that just offers this canonical
LabeledData+ read + write helpers. I love to hear your opinion on the feasibility of that. The elaborate wide format model and other public types in my view are mostly super important for the validation of current (legacy) formats that remain supported, but if possible, we can prevent downstream packages to deal with this kind of validation, and only keep that part private for dlccore. e.g.LabeledDataHeader,LabeledDataRowIndex, etc..
Let's discuss in more detail
4c491bb to
9286560
Compare
5777096 to
358276c
Compare
I fully agree, I've made it private in #41 where I could, sorry, I indeed could have spent more time thinking about visibility, but the goal is an easy API, and hiding any complexity from consumers as relevant. See the new PR. |
Also agree, though if it's okay I'd make annotation the first consumer rather than training? I'll open a new PR with a first proposal. Then I'll work on outputs and frame/time indexed pose (Mostly because I feel the napari-dlc duplication is the main gain from this) |
358276c to
d159216
Compare
d159216 to
ab9f173
Compare
ab9f173 to
14c541f
Compare
LabeledDataas long format.Checks columns, dtypes, density and identities when built.
individualcolumn, as DeepLabCut's three-level header has none.labels.identifiersis aKeypointIdentifiers(Add the labeled-data header and row-index vocabulary #13), so labels with no frames still have keypoints identifiers and data fields.LabeledData.from_wide_df(df)takes the wide DataFrame DeepLabCut from the current DLC formatto_arrays()returnsLabeledDataArrays:xy(frames, keypoints, 2),likelihoodorNone,frames,identifiers,data_fields.