Skip to content

Commit

Permalink
Spine cropper (#124)
Browse files Browse the repository at this point in the history
* update spine to ts v2

* conda name

* spine cropper updated
  • Loading branch information
louisblankemeier authored Oct 13, 2023
1 parent e8b6e9f commit 511ae55
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions comp2comp/spine/spine.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
import pandas as pd
import wget
from PIL import Image

from totalsegmentatorv2.python_api import totalsegmentator

from comp2comp.inference_class_base import InferenceClass
from comp2comp.io import io_utils
from comp2comp.models.models import Models
from comp2comp.spine import spine_utils
from comp2comp.visualization.dicom import to_dicom
from comp2comp.io import io_utils

# from totalsegmentator.libs import (
# download_pretrained_weights,
Expand Down Expand Up @@ -241,7 +242,7 @@ def __init__(self, lower_level: str = "L5", upper_level: str = "L1", save=True):
super().__init__()
self.lower_level = lower_level
self.upper_level = upper_level
ts_spine_full_model = Models.model_from_name("ts_spine_full")
ts_spine_full_model = Models.model_from_name("ts_spine")
categories = ts_spine_full_model.categories
try:
self.lower_level_index = categories[self.lower_level]
Expand Down
3 changes: 3 additions & 0 deletions comp2comp/utils/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from datetime import datetime
from pathlib import Path


from comp2comp.io import io_utils


Expand Down Expand Up @@ -118,3 +119,5 @@ def process_3d(args, pipeline_builder):
if len(os.listdir(os.path.dirname(output_dir))) == 0:
shutil.rmtree(os.path.dirname(output_dir))
continue


0 comments on commit 511ae55

Please sign in to comment.