Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.2.1 dev #37

Merged
merged 3 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions scripts/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def inference(
with open(prediction_path, "w") as f:
json.dump(pred_dict, f, indent=2)

series_with_attention = None
if return_attentions:
attention_path = os.path.join(output_dir, "attention_scores.pkl")
with open(attention_path, "wb") as f:
Expand All @@ -124,7 +125,7 @@ def inference(
gain=3,
)

return pred_dict
return pred_dict, series_with_attention


def main():
Expand All @@ -133,7 +134,7 @@ def main():

os.makedirs(args.output_dir, exist_ok=True)

pred_dict = inference(
pred_dict, series_with_attention = inference(
args.image_dir,
args.output_dir,
args.model_name,
Expand Down
18 changes: 10 additions & 8 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ author_email =
license_file = LICENSE.txt
long_description = file: README.md
long_description_content_type = text/markdown; charset=UTF-8; variant=GFM
version = 1.2.0
version = 1.2.1
# url =
project_urls =
; Documentation = https://.../docs
Expand All @@ -32,22 +32,24 @@ python_requires = >=3.8
# Version specifiers like >=2.2,<3.0 avoid problems due to API changes in
# new major versions. This works if the required packages follow Semantic Versioning.
# For more information, check out https://semver.org/.
# Use --find-links https://download.pytorch.org/whl/cu113/torch_stable.html for torch libraries
# Use --find-links https://download.pytorch.org/whl/cu117/torch_stable.html for torch libraries
install_requires =
importlib-metadata; python_version>="3.8"
numpy==1.24.1
torch==1.11.0+cu113; sys_platform != "darwin"
torch==1.11.0; sys_platform == "darwin"
torchvision==0.12.0+cu113; sys_platform != "darwin"
torchvision==0.12.0; sys_platform == "darwin"
pytorch_lightning==1.5.6
torch==1.13.1+cu117; sys_platform != "darwin"
torch==1.13.1; sys_platform == "darwin"
torchvision==0.14.1+cu117; sys_platform != "darwin"
torchvision==0.14.1; sys_platform == "darwin"
pytorch_lightning==1.6.0
scikit-learn==1.0.2
tqdm==4.62.3
lifelines==0.26.4
opencv-python==4.5.4.60
opencv-python-headless==4.5.4.60
albumentations==1.1.0
pydicom==2.2.2
pillow>=10.2.0
pydicom==2.3.0
pylibjpeg[all]==2.0.0
torchio==0.18.74
gdown==4.6.0

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ deps =
# flake8
# mypy
# black
install_command = pip install --pre --find-links https://download.pytorch.org/whl/cu113/torch_stable.html {opts} {packages}
install_command = pip install --pre --find-links https://download.pytorch.org/whl/cu117/torch_stable.html {opts} {packages}
commands =
pytest {posargs}
# black {toxinidir}/sybil --check
Expand Down
Loading