{"id":37702198,"url":"https://github.com/masilab/beyond_fa_rotnet","last_synced_at":"2026-01-16T13:01:07.773Z","repository":{"id":284383900,"uuid":"954769826","full_name":"MASILab/beyond_fa_rotnet","owner":"MASILab","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-25T15:58:37.000Z","size":25198,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-29T17:42:21.435Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MASILab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-25T15:33:39.000Z","updated_at":"2025-03-25T15:40:40.000Z","dependencies_parsed_at":"2025-03-25T16:53:38.690Z","dependency_job_id":null,"html_url":"https://github.com/MASILab/beyond_fa_rotnet","commit_stats":null,"previous_names":["masilab/beyond_fa_rotnet"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/MASILab/beyond_fa_rotnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASILab%2Fbeyond_fa_rotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASILab%2Fbeyond_fa_rotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASILab%2Fbeyond_fa_rotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASILab%2Fbeyond_fa_rotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MASILab","download_url":"https://codeload.github.com/MASILab/beyond_fa_rotnet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASILab%2Fbeyond_fa_rotnet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-16T13:01:07.599Z","updated_at":"2026-01-16T13:01:07.765Z","avatar_url":"https://github.com/MASILab.png","language":"Python","readme":"# RotNet-FA-Image\n\n## Overview\n\nRotNet-FA-Image is a Python-based deep learning project for predicting rotation angles of fractional anisotropy (FA) maps derived from NIfTI (.nii.gz) files. It leverages 3D convolutional neural networks (CNNs) implemented in PyTorch to regress rotation angles. The augmented data helps us extract meaningful features from the input data.\n\nOriginal RotNet repo: https://github.com/d4nst/RotNet\n\n## Environment\n- Ubuntu version: 22.04.4 LTS \n- CUDA version: 12.2\n- GPU: NVIDIA RTX A4000\n\n## Building the Docker\n\nThe Docker container is set up using the provided `Dockerfile`. To build the Docker container, clone the repository and run the following command in the root directory:\n\n```bash\nDOCKER_BUILDKIT=1 sudo docker build -t beyondfa_vine:v1.1.3 .\n```\n\nThe Docker runs the code from `scripts/entrypoint.sh`.\n\n## Running the Docker\n\nYour Docker container reads input data from `/input` and writes output data to `/output`. The input should be a .mha image and a .json file containing bvals/bvecs information.\n\nTo run this Docker:\n\n```bash\ninput_dir=\".../input_data\"\noutput_dir=\".../output_data\"\n\nmkdir -p $output_dir\nsudo chmod 777 $output_dir\n\nsudo docker run --rm \\\n    -v $input_dir:/input \\\n    -v $output_dir:/output \\\n    beyondfa_vine:v1.1.3\n```\n\n## Local Development Setup\n```\n# Create and activate a new conda environment\nconda create -n isbi_challenge python=3.10 -y\nconda activate isbi_challenge\n\n# Install PyTorch with CUDA support\nconda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia\n\n# Install additional dependencies\npip3 install -r requirements.txt\n```\n\n## Preprocessing Script (preproc_fa.sh)\n- Assumes [PreQual](https://github.com/MASILab/PreQual/) has already been run on input data -- we recommend that all challenge participants do this, as the testing data will be preprocessed this way\n- Converts the .mha/.json data available from grand-challenge.org to .nii.gz/.bval/.bvec format that the preprocessing steps need\n- Skull stripping\n- Tensor fitting\n- FA map generation\n\nThese steps may or may not be necessary based on your approach.\nThough PreQual outputs include FA maps, your Docker needs to include any steps beyond preprocessing so that the training/testing data can be generated in the same way.\n\n## Project Structure\n- `NiiDataset`: Custom PyTorch Dataset class for loading and preprocessing NIfTI files.\n- `RotationRegressionModel`: 3D CNN for predicting rotation angles.\n- `Training Script`: Handles the training process, model evaluation, and visualization.\n\n## Running the Model\n- Prepare your dataset of .nii.gz files and place them in the data directory. (default: `./data`)\n- Train the model using the provided training script:\n```python\npython3 rotnet3D_regression.py\n```\n- The model's training progress will be logged, and visualization outputs will be saved in the result_regression directory.\n\n## Outputs\n- Useful Feature: Saved as .npy array\n- Training History: Plots of the mean squared error (MSE) loss over epochs.\n- Inference converts vectors to .json file so that we can upload them to our MLP testing code\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasilab%2Fbeyond_fa_rotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasilab%2Fbeyond_fa_rotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasilab%2Fbeyond_fa_rotnet/lists"}