Open shreyasingh1 opened 2 years ago
*Still need to write tests, black files, and confirm that docs build
Merging #354 (ae4830d) into develop (c4dfa8b) will decrease coverage by
2.01%
. The diff coverage is39.43%
.
@tathey1 The PR now builds with CircleCI and Netlify. Code cov goes slightly down, only because I didn't write tests for functions that required "data_dir" as input. In the Netlify build, you can see the new refs in Utils->CNN Segmentation, and "make_masks" which is in Utils generally.
Brief description of PR: in brainlit -> utils -> cnn_segmentation, I added two helper files called preprocess_cnn.py and performance_cnn.py that format data into torch objects and provide code to train, test, and optimize a 3D CNN. Example notebook of how to use these is in experiments -> pytorch_model. Also added a file in brainlit -> utils called make_masks.py that formalizes how to make 3D image masks from a series of SWC files. Didn't write tests for this file because Bresenham3D is tested elsewhere in brainlit (but can add here too if necessary).
Only standing question is that the "Return" arguments are formatted strangely in some of the functions in Netlify. Function docstrings seem to be formatted correctly and I tried a few different alternatives with no luck. Input parameters are formatted right, it's only the Return arguments that aren't for some. Any guidance on how to fix?
Stale pull request message
Stale pull request message
Pytorch 3D CNN model architecture for training on 3D voxels. Easily editable example notebook (found in experiments -> pytorch_model) illustrates the model's application on the 50 image Mouselight benchmarking data. Helper files are found in brainlit.utils.cnn_segmentation