Skip to content

Conversation

@n-poulsen
Copy link
Contributor

Implements the export_model API method for models trained with the PyTorch engine. Tests are added for the different features of the export_model method.

The following modifications are made to implement the feature:

  • The DLCLoader lazy-loads the DataFrames and train/test splits
  • We can instantiate the DLCLoader with a project configuration directly (a dict) instead of having to pass a filepath
    • This makes it possible to change the project iteration dynamically when exporting models

@n-poulsen n-poulsen added enhancement New feature or request DLC3.0🔥 labels Dec 3, 2024
@n-poulsen n-poulsen requested a review from maximpavliv December 3, 2024 11:34
Copy link
Contributor

@maximpavliv maximpavliv left a comment

Choose a reason for hiding this comment

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

LGTM!

@MMathisLab MMathisLab merged commit 5b6c8b7 into pytorch_dlc Dec 3, 2024
1 check passed
@MMathisLab MMathisLab deleted the niels/torch_export_model branch April 15, 2025 11:36
@hg-aus-g
Copy link

hg-aus-g commented Apr 24, 2025

Does the export_model() function works with pytorch models? Unfortunately I got only one .pt file. But I need .pb file for use witch dlc-live-gui!

Thanks!

@maximpavliv
Copy link
Contributor

Hello @hg-aus-g ,

.pb is the format used by Tensorflow, Pytorch uses the .pt format to save models, so this is perfectly normal.

The thing is that pytorch support has not been merged on the DeepLabCut-live side yet, although it is almost ready (see PR). It should be merged very soon :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DLC3.0🔥 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants