Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do we need to train DLC prior to run the dgp pipeline #10

Open
ZhanqiZhang66 opened this issue Mar 16, 2021 · 1 comment
Open

Do we need to train DLC prior to run the dgp pipeline #10

ZhanqiZhang66 opened this issue Mar 16, 2021 · 1 comment

Comments

@ZhanqiZhang66
Copy link

ZhanqiZhang66 commented Mar 16, 2021

This might be a stupid question. I followed the guideline all the way to step 4 and as I run the command in step 5 I received the following message. It is asking for the trained DLC network. Do we need to train DLC prior to run the dgp pipeline or am I missing a step here?

Thanks in advance! Great model

Update: If you think "hey I have the same question". You need to follow the same DLC steps until the step Create training dataset, which will create {PROJ_DIR}/task-scorer-date/dlc-models/iteration-0/dgpdate-trainset95shuffle1/train/pose_cfg.yaml' .

Specifically, go through Welcome -> Manage Project -> Extract Frames -> Label Frames -> Create training dataset. You should see "The training dataset is successfully created. Use the function 'train_network' to start training. Happy training!
" from your terminal.

Then run the command in step 5
`python ['{DGP_DIR}/demo/run_dgp_demo.py'] --dlcpath '{PROJ_DIR}/task-scorer-date/' --shuffle 'the shuffle to run' --dlcsnapshot 'specify the DLC snapshot if you've already run DLC with location refinement

However, this still won't get training started. It will show "Start Training" in the terminal and stuck there for hours. Any suggestions?

config_path /home/victoria/Github/deepgraphpose/dgp-victoria-2021-03-15/config.yaml
Traceback (most recent call last):
  File "/home/victoria/Github/deepgraphpose/demo/run_dgp_demo.py", line 179, in <module>
    fit_dlc(snapshot, dlcpath, shuffle=shuffle, step=0)
  File "/home/victoria/Github/deepgraphpose/src/deepgraphpose/models/fitdgp.py", line 92, in fit_dlc
    dlc_cfg = load_config(pose_config_yaml)
  File "/home/victoria/Github/deepgraphpose/src/DeepLabCut/deeplabcut/pose_estimation_tensorflow/config.py", line 55, in load_config
    return cfg_from_file(filename)
  File "/home/victoria/Github/deepgraphpose/src/DeepLabCut/deeplabcut/pose_estimation_tensorflow/config.py", line 42, in cfg_from_file
    with open(filename, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/victoria/Github/deepgraphpose/dgp-victoria-2021-03-15/dlc-models/iteration-0/dgpMar15-trainset95shuffle1/train/pose_cfg.yaml'
@waq1129
Copy link
Collaborator

waq1129 commented Mar 23, 2021

Hi

Thanks for the update and clarification.

For the error you posted, do you have that pose_cfg.yaml there?

For the long time stucking, it might due to the selection of unlabeled frames depending on how many frames and videos you have? DGP need to select unlabeled frames for training based on motion energy which requires the calculation of frame difference for all time points which usually takes a long time. But it only happens once. Is that the same reason in your case? You can add a print message saying "start motion energy" entering this function. If you see the message and stuck there for hours, then it's running motion energy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants