Skip to content

Commit

Permalink
Added --download_weights option and fixed setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
astewartau committed Feb 9, 2024
1 parent a456d48 commit 6bbfbee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nextqsm/predict_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

import argparse
import os
import sys

from pathlib import Path

def main(ckp_path, ckp_name, source_path, mask_path, out_file, b_vec):
Expand Down Expand Up @@ -97,6 +99,14 @@ def download_weights():


def cli_main():
if '--download_weights' in sys.argv:
parser = argparse.ArgumentParser(description="Download weights for NeXtQSM.")
parser.add_argument('--download_weights', action='store_true', help='Only download the weights and exit')
args = parser.parse_args()

if args.download_weights:
download_weights()
exit()

parser = argparse.ArgumentParser(
description="NeXtQSM: Deep Learning QSM Algorithm",
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

setup(
name="nextqsm",
long_description="NeXtQSM is a complete deep learning pipeline for data-consistent quantitative susceptibility mapping trained with hybrid data",
version="1.0.2",
packages=find_packages(),
package_dir={'nextqsm': 'nextqsm'},
Expand Down

0 comments on commit 6bbfbee

Please sign in to comment.