- All analysis was conducted in a singularity environment using this definition file.
- Exact versions of software used at the time are described in the package version file, although exact versions shouldn't matter much.
- Segmentation of mice was conducted using code based on the public repository here: https://github.com/KumarLabJax/MouseTracking
- Run video through segmentation
- Note: If you use InfervideoData.py from this repository, it will apply the same approach that we used in the paper. This includes scaling the 480x480 network result up to the raspberry pi 1080x1080 video and using a luminance threshold to clean up the mask.
- Note2: Other segmentation approaches can be used as a drop-in replacement as long as a segmented video is produced.
- Export image moment data from segmentation using this code
- Merge segmentation data with eeg/emg annotations into feather format using this code
- Generate features for classifier using this code
- (Optional) Merge multiple animal videos into one for a training dataset.
- This is achieved simply appending multiple csv files. In linux, you can use a command similar to this:
head -n 1 file1.csv > combined.out && tail -n+2 -q *.csv >> combined.out && mv combined.out combined.csv
- This is achieved simply appending multiple csv files. In linux, you can use a command similar to this:
- Train a classifier and create predictions on data using this code
- Note: Our final classifier used in the paper was trained using the following seed: 1438939568.
- When training the classifier, performance information will be output.
- Additionally, example code used in producing the methamphetamine comparisons in the paper is located in this code
- Plots were created using this code
- Merged output file can be found on our Zenodo dataset here
- Merged output file was produced using example code found in wavelet-analysis. This code is meant for example resources for creating data used in the paper and will not be supported. The primary wavelet analysis code that is supported is found in the feature generation code
This code is released under MIT license.
The feature data produced in the associated paper used in training models are released on Zenodo here under a Non-Commercial license. Please visit the link for more info.