|
|
@ -28,7 +28,8 @@ class DropModel(Model): |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
def do_fit(self, dataframe: pd.DataFrame, segments: list) -> None: |
|
|
|
def do_fit(self, dataframe: pd.DataFrame, segments: list) -> None: |
|
|
|
data = dataframe['value'] |
|
|
|
data = utils.cut_dataframe(dataframe) |
|
|
|
|
|
|
|
data = data['value'] |
|
|
|
confidences = [] |
|
|
|
confidences = [] |
|
|
|
convolve_list = [] |
|
|
|
convolve_list = [] |
|
|
|
drop_height_list = [] |
|
|
|
drop_height_list = [] |
|
|
@ -101,7 +102,8 @@ class DropModel(Model): |
|
|
|
self.state['conv_del_max'] = self.state['WINDOW_SIZE'] |
|
|
|
self.state['conv_del_max'] = self.state['WINDOW_SIZE'] |
|
|
|
|
|
|
|
|
|
|
|
def do_detect(self, dataframe: pd.DataFrame) -> list: |
|
|
|
def do_detect(self, dataframe: pd.DataFrame) -> list: |
|
|
|
data = dataframe['value'] |
|
|
|
data = utils.cut_dataframe(dataframe) |
|
|
|
|
|
|
|
data = data['value'] |
|
|
|
possible_drops = utils.find_drop(data, self.state['DROP_HEIGHT'], self.state['DROP_LENGTH'] + 1) |
|
|
|
possible_drops = utils.find_drop(data, self.state['DROP_HEIGHT'], self.state['DROP_LENGTH'] + 1) |
|
|
|
|
|
|
|
|
|
|
|
return self.__filter_detection(possible_drops, data) |
|
|
|
return self.__filter_detection(possible_drops, data) |
|
|
|