-
Notifications
You must be signed in to change notification settings - Fork 32
"ValueError: generator already executing" when running dannce-predict with 3 cameras #62
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
Comments
It looks like it is complaining about i/o from the same videos across multiple parallel processes. I can look into it. But it is probably in any case easier to just try training/predicting from a pretrained 3-camera model. Here are some links to weights: weights.rat.MAX.3cam: https://www.dropbox.com/s/2fama0q45sdzwfj/weights_multigpu.30-0.00002.hdf5?dl=0 I would try finetuning both -- you can make an AVG network starting from either weights -- and comparing performance. We have found recently that, for finetuning on mouse data, starting from pretrained MAX weights actually works better. Please LMK how it goes! |
Thank you for sharing the weights of the pretrained 3-camera models! While I'm still aggregating training frames, with my current ~150 training frames, finetuning both networks already work pretty well. |
Cool, you're welcome. Please let me know if you have any other questions. |
I substituted the weights with the ones linked above in this issue, and I was able to resolve the indexing problem. However, now I am getting the following error when I run DANNCE with three cameras. ValueError: Error when checking input: expected input_3 to have shape (64, 64, 64, 18) but got array with shape (64, 64, 64, 9) Since 18 is twice as large as 9, it seems that part of the program is still expecting six cameras and not three. Do you know of a way to address this issue? I am trying to run DANNCE with three cameras without retraining the program. Are there some additional weights or training files that I need so that DANNCE works effectively with three cameras? |
Hi @verpeutlab. Likely you are either (1) omitting The solution is to make sure you have If that doesn't work, please send all of the terminal text printed out before the error message. |
I still got the same error after I placed n_views: 3 in each .yaml file, and here is the text before the error message: Initializing Network... I have also included the parameters that are listed on the command window, which are printed right after the program begins to run: Below these paramaters, the following sentence was printed: |
It looks like your |
After working with a copy of DANNCE that I had pulled from this GitHub repository and have been modifying for a while now, I decided to stash my changes and re-pull DANNCE from the master branch. Traceback (most recent call last): Could you tell me what is causing this error and how it can be fixed? |
I also wanted to let you know that I deleted the folders named Camera4, Camera5, and Camera6 in markerless_mouse_1. Therefore, I only have three cameras available to pass through DANNCE. I also changed camnames to ['Camera1' 'Camera2' 'Camera3'] in the config file dannce_rig_com_config.yaml |
I suppose that your *_dannce.mat file is not changed to 3 cams. If you open it in matlab and navigate to cams, you will see that there's still 6 camnames, 6 syncs and 6 params for each camera. Try delete the last 3 of them. |
Hi,
So, I suppose one fix could be to get the pretrained weights for 5cameras, or to fix this error in the processing. Let me know how best I can proceed. Looking forward to your response. When I say
since it was trained on pseudo 6 camera data Thanks and looking forward to your response! |
Sorry, this seems to be a common issue -- seems to stem from when we transitioned to loading in videos across multiple threads. @harshk95 if you want to try predicting on the model you've already trained, the workaround would be to manually duplicate the If you want to do a new finetune, here are some pretrained 5 cam mono weights: Note that for some recent 5-camera mono experiments we have been running on mice, the best setting is:
We are wrapping up a more complete grid search over parameters for this 5-camera mono case and will keep you posted! |
Hi, if I simply duplicate the camera and cam_names I get the following
So I guess I have to duplicate all the parameters etc too. In any case, I will use the new weights that you have provided, but it was just so I could get an idea. Thanks! |
Hi,
We're using DANNCE with a 3 camera setup. We'd like to use the pre-trained 6-camera network (weights.rat.AVG.6cam.hdf5) and finetune the model. According to the wiki, DANNCE should duplicate the 3 views to feed the 6 heads in the model. However, while dannce-train works well with the default n_rand_views, the dannce-predict runs into the following error:
Thank you in advance for your help!!
The text was updated successfully, but these errors were encountered: