Skip to content

Commit

Permalink
fix: ensure the correct bit depth is passed aroundg
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrutchf committed Nov 14, 2024
1 parent e4b9c89 commit 143f07c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fishsense_lite/commands/label_studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,14 @@ def execute_fishial(
img = image_rectifier.rectify(img)
img_dark = image_rectifier.rectify(img_dark)

img8 = uint16_2_uint8(img)

laser_detector = NNLaserDetector(
lens_calibration, estimated_laser_calibration, device
)
laser_coords = laser_detector.find_laser(img_dark)

ml_depth_map = DepthAnythingDepthMap(img, device)
ml_depth_map = DepthAnythingDepthMap(img8, device)

if laser_coords:
laser_coords_int = np.round(laser_coords).astype(int)
Expand All @@ -137,7 +139,7 @@ def execute_fishial(
ml_depth_map.rescale(scale)

color_correction = ColorCorrection()
img = color_correction.correct_color(img, ml_depth_map)
img = uint16_2_uint8(color_correction.correct_color(img, ml_depth_map))

fish_segmentation_inference = FishSegmentationFishialPyTorch(device)
segmentations: np.ndarray = fish_segmentation_inference.inference(img)
Expand Down

0 comments on commit 143f07c

Please sign in to comment.