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

Code in command prompt runs, now what? #16

Open
wweertman opened this issue May 9, 2021 · 1 comment
Open

Code in command prompt runs, now what? #16

wweertman opened this issue May 9, 2021 · 1 comment

Comments

@wweertman
Copy link

I ran the code in command prompt and trained a model. How do I use this model without going through the whole training process again? I see that it has created snapshots in my dlc-models directory however I cannot use these with deeplabcut workflow.

runfile('C:/Users/wlwee/Documents/python/fhl_three_target_experiment/CODE/creating_rotated_data/test_deepgraphpose_model.py', wdir='C:/Users/wlwee/Documents/python/fhl_three_target_experiment/CODE/creating_rotated_data')
Traceback (most recent call last):

  File "<ipython-input-683-4679c477922f>", line 1, in <module>
    runfile('C:/Users/wlwee/Documents/python/fhl_three_target_experiment/CODE/creating_rotated_data/test_deepgraphpose_model.py', wdir='C:/Users/wlwee/Documents/python/fhl_three_target_experiment/CODE/creating_rotated_data')

  File "C:\Users\wlwee\Anaconda3\envs\DLC-GPU\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
    execfile(filename, namespace)

  File "C:\Users\wlwee\Anaconda3\envs\DLC-GPU\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "C:/Users/wlwee/Documents/python/fhl_three_target_experiment/CODE/creating_rotated_data/test_deepgraphpose_model.py", line 27, in <module>
    destfolder = snapshot_dirs[m])

  File "C:\Users\wlwee\Anaconda3\envs\DLC-GPU\lib\site-packages\deeplabcut\pose_estimation_tensorflow\predict_videos.py", line 207, in analyze_videos
    increasing_indices = np.argsort([int(m.split("-")[1]) for m in Snapshots])

  File "C:\Users\wlwee\Anaconda3\envs\DLC-GPU\lib\site-packages\deeplabcut\pose_estimation_tensorflow\predict_videos.py", line 207, in <listcomp>
    increasing_indices = np.argsort([int(m.split("-")[1]) for m in Snapshots])
@waq1129
Copy link
Collaborator

waq1129 commented May 14, 2021

Hi

If you finish training and just want to test the DGP model, you could start from https://github.com/paninski-lab/deepgraphpose/blob/main/demo/run_dgp_demo.py#L249

set snapshot to be the name of the snapshot you want to check.

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