From 978adaf9a9f6975a64aa098c5730c4df259516c4 Mon Sep 17 00:00:00 2001 From: Christopher Rhodes <christopher.rhodes@embl.de> Date: Wed, 17 Jul 2024 19:04:10 +0200 Subject: [PATCH] Added docstring --- model_server/base/roiset.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/model_server/base/roiset.py b/model_server/base/roiset.py index 074a6f0a..d740d3f7 100644 --- a/model_server/base/roiset.py +++ b/model_server/base/roiset.py @@ -775,10 +775,17 @@ class RoiSet(object): def acc_obj_ids(self): return make_object_ids_from_df(self._df, self.acc_raw.shape_dict) - # TODO: add docstring # TODO: make this work with obj det dataset @staticmethod def deserialize(acc_raw: GenericImageDataAccessor, where: Path, prefix=''): + """ + Create an RoiSet object from saved files and an image accessor + :param acc_raw: accessor to image that contains ROIs + :param where: path to directory containing RoiSet serialization files, namely dataframe.csv and a subdirectory + named tight_patch_masks + :param prefix: starting prefix of patch mask filenames + :return: + """ df = pd.read_csv(where / 'dataframe' / (prefix + '.csv'))[['label', 'zi', 'y0', 'y1', 'x0', 'x1']] def _read_binary_mask(r): -- GitLab