Skip to content

Shaokai/sa finetune#2351

Closed
yeshaokai wants to merge 5 commits intoDeepLabCut:mainfrom
yeshaokai:shaokai/SA_finetune
Closed

Shaokai/sa finetune#2351
yeshaokai wants to merge 5 commits intoDeepLabCut:mainfrom
yeshaokai:shaokai/SA_finetune

Conversation

@yeshaokai
Copy link
Copy Markdown
Collaborator

Added SA fine-tuning code
Added a new example project for testing fine-tuning
Added a testscript

Copy link
Copy Markdown
Contributor

@jeylau jeylau left a comment

Choose a reason for hiding this comment

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

Looks fine to me! I guess we'll get rid of the extra data in examples/

net_type=None,
augmenter_type=None,
posecfg_template=None,
superanimal_name = ""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this argument meant to be user-facing? Or only for internal purposes? It is very redundant with posecfg_template.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I am not sure it was me who put it there. Is it used anywhere in the source code?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's not; I'll get rid of it.

Comment on lines +200 to +222
from deeplabcut.modelzoo.utils import parse_available_supermodels
from dlclibrary.dlcmodelzoo.modelzoo_download import (
download_huggingface_model,
MODELOPTIONS,
)
import glob
dlc_root_path = auxiliaryfunctions.get_deeplabcut_path()
supermodels = parse_available_supermodels()
weight_folder = str(
Path(dlc_root_path)
/ "pose_estimation_tensorflow"
/ "models"
/ "pretrained"
/ (superanimal_name + "_weights")
)

if superanimal_name in MODELOPTIONS:
if not os.path.exists(weight_folder):
download_huggingface_model(superanimal_name, weight_folder)
else:
print(f"{weight_folder} exists, using the downloaded weights")
else:
print(f"{superanimal_name} not available. Available ones are: ", MODELOPTIONS)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We could move the imports higher up, and test early whether superanimal_name is in MODELOPTIONS.

@MMathisLab
Copy link
Copy Markdown
Member

We need the superanimal name... it was discussed and reviewed and in other code with @n-poulsen

@MMathisLab MMathisLab added enhancement New feature or request ModelZoo related to models/code for modezoo.deeplabcut.org labels Oct 3, 2023
@MMathisLab
Copy link
Copy Markdown
Member

closing as redundant with #2389

@MMathisLab MMathisLab closed this Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ModelZoo related to models/code for modezoo.deeplabcut.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants