Skip to content

Commit

Permalink
Merge pull request #23 from wiktorlazarski/small_typing_fix
Browse files Browse the repository at this point in the history
Remove unnecessary parameter from loading operation
  • Loading branch information
wiktorlazarski committed Apr 26, 2022
2 parents c04bc74 + e7b0084 commit 992e353
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions head_segmentation/predict_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ class HumanHeadSegmentationPipeline:
def __init__(
self,
model_path: str = C.HEAD_SEGMENTATION_MODEL_PATH,
image_input_resolution: int = 512,
):
ckpt = torch.load(model_path, map_location=torch.device("cpu"))

self._preprocessing_pipeline = ip.PreprocessingPipeline(
nn_image_input_resolution=image_input_resolution
nn_image_input_resolution=ckpt["hyper_parameters"][
"nn_image_input_resolution"
]
)
self._model = mdl.HeadSegmentationModel.load_from_checkpoint(
ckpt_path=model_path
Expand Down

0 comments on commit 992e353

Please sign in to comment.