jessedmarshall / CAPTURE_demo

Demo code for CAPTURE and DANNCE
MIT License
27 stars 10 forks source link

User-Specific Drives and Files in CAPTURE_demo Code #10

Open spoonsso opened 3 years ago

spoonsso commented 3 years ago

Copied over from https://github.com/spoonsso/dannce/issues/48 by @verpeutlab.

I was going through the CAPTURE_demo code, and I noticed that a few variables were defined by files that were obtained from user-specific paths (Jesse). If you could either update these variables with files that can be accessed by any user or tell me how to generate these files using either demo or experimental data, I would really appreciate it. I am not going to be using birds, so if you do not update the variables that are defined by user-specific paths in the files for analyzing birds, that is fine. Below is a list of the scripts that contain paths to user-specific paths. Each script is classified under the CAPTURE_demo folder it is in.

Animating: dannce_reprojection_sbys_bird_demo.m plot_frame_dannce_reprojection_multi_bird_demo.m

Behavioral_analysis: get_supervised_features_demo.m demoreembed.m

Preprocessing: preprocess_dannce.m In preprocess_dannce.m, a user-specific pathway loads a predictions.mat file. Should this be changed to the pathway that leads to the predictions.mat file generated by either the demo or an experiment?

Utlity: load_bird_anglestruct.m load_link_files.m The user-specific pathway in load_link_files.m is under the case for birds, so if you don't update it, that is fine.

VideoAnalysis: demo_readinimageframes.m

spoonsso commented 3 years ago

dannce_reprojection_sbys_bird_demo.m

The two variables with user-defined paths -- basefolder and camnamein appear unused and thus should probably just be deleted. @jessedmarshall?

plot_frame_dannce_reprojection_multi_bird_demo.m

basefolder is unused and can probably be deleted. For cameradirectory_base, if you are using a predictions.mat file generated by your system, then you should just use cameradirectory_base = predictionstruct.camnames_agg{nn}.(cameranames{lk}).video_directory

get_supervised_features_demo.m

I don't think this is used for DANNCE analysis.

demoreembed.m

I don't think this is used for DANNCE analysis.

In preprocess_dannce.m, a user-specific pathway loads a predictions.mat file. Should this be changed to the pathway that leads to the predictions.mat file generated by either the demo or an experiment?

Yes.

Utlity: load_bird_anglestruct.m load_link_files.m

All of the user-defined paths are for skeleton files. These should either point to the skeletons available in the Label3D repository, or to a new skeleton that you will define for your animal (this is required to generate a predictions.mat file anyway). Note that if you end up defining your own new skeleton, then you also need to create a new load_{myskeleton}_anglestruct.m function that correctly refers to any new joint names and anatomical body segments you have introduced. This new anglestruct function must be called under a new case in Behavioral_analysis/compute_joint_angles_demo.m, and the skeleton file itself needs to be loaded in under a new case in Utility/load_link_files.m. See the Label3D/skeletons folder for example skeletons (https://github.com/diegoaldarondo/Label3D/tree/master/skeletons).

VideoAnalysis: demo_readinimageframes.m

I don't think this is used for DANNCE analysis.

I have a simplified demo script in my CAPTURE_demo fork at https://github.com/spoonsso/CAPTURE_demo/blob/master/Species_specific_files/taddy_analysis_demo.m.