Skip to content
Open
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
2 changes: 1 addition & 1 deletion vision_stack/layers/NormalizationLayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self) -> None:
"""
Normalizes the image by calculating the median and the IQR of all the pixels, then subtracting the median form the pixels and dividing by the IQR.
"""
super().__init__()
super().__init__("RobustScalingLayer")

def process(self, image):
median = np.median(image)
Expand Down
3 changes: 2 additions & 1 deletion vision_stack/layers/UnderwaterEnhancementLayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import os
import torch
from pathlib import Path
from PIL import Image
import torch
import numpy as np
Expand All @@ -18,7 +19,7 @@

from .Layer import PreprocessLayer

WEIGHTS_PATH = os.path.join(os.getcwd(), "vision_stack", "weights", 'model_best_2842.pth.tar')
WEIGHTS_PATH = Path(os.path.abspath(__file__)).parent.parent / "weights" / "model_best_2842.pth.tar"

class UnderWaterImageEnhancementLayer(PreprocessLayer):
def __init__(self) -> None:
Expand Down