From e18d9835ad9cd678dafef395a594f2449b630df3 Mon Sep 17 00:00:00 2001 From: Romain Bazile Date: Wed, 2 Jun 2021 18:35:00 +0200 Subject: [PATCH] segmenter: replace adaptative threshold by simple threshold in pipe (cherry picked from commit f6482fcca9abc0f7e027890a57175559a179d060) --- scripts/planktoscope/segmenter/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/planktoscope/segmenter/__init__.py b/scripts/planktoscope/segmenter/__init__.py index 7db23f4..742a7c8 100644 --- a/scripts/planktoscope/segmenter/__init__.py +++ b/scripts/planktoscope/segmenter/__init__.py @@ -48,6 +48,7 @@ import planktoscope.segmenter.ecotaxa import skimage.util import skimage.transform import skimage.measure +import skimage.exposure import cv2 import scipy.stats import numpy as np @@ -229,7 +230,8 @@ class SegmenterProcess(multiprocessing.Process): logger.info("Starting the mask creation") pipeline = [ - "adaptative_threshold", + # "adaptative_threshold", + "simple_threshold", "remove_previous_mask", "erode", "dilate", @@ -700,7 +702,9 @@ class SegmenterProcess(multiprocessing.Process): else: logger.info("There are no objects to export") else: - logger.info("We are not creating the ecotaxa output archive for this folder") + logger.info( + "We are not creating the ecotaxa output archive for this folder" + ) # cleanup # we're done free some mem