Skip to content

Commit

Permalink
update conifgs
Browse files Browse the repository at this point in the history
  • Loading branch information
Christina Bukas committed Mar 13, 2024
1 parent 4cbad70 commit 7c7500b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/client/dcp_client/utils/bentoml_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import Optional, List
from bentoml.client import Client as BentoClient
from bentoml.exceptions import BentoMLException
import numpy as np

from dcp_client.app import Model

Expand Down
6 changes: 3 additions & 3 deletions src/server/dcp_server/config_instance.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"setup": {
"segmentation": "GeneralSegmentation",
"model_to_use": "CustomCellpose",
"accepted_types": [".jpg", ".jpeg", ".png", ".tiff", ".tif"],
"seg_name_string": "_seg"
"model_to_use": "CustomCellpose"
},

"service": {
Expand All @@ -21,6 +19,8 @@

"data": {
"data_root": "data",
"accepted_types": [".jpg", ".jpeg", ".png", ".tiff", ".tif"],
"seg_name_string": "_seg",
"gray": True,
"rescale": True
},
Expand Down
6 changes: 3 additions & 3 deletions src/server/dcp_server/config_semantic.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"setup": {
"segmentation": "GeneralSegmentation",
"model_to_use": "UNet",
"accepted_types": [".jpg", ".jpeg", ".png", ".tiff", ".tif"],
"seg_name_string": "_seg"
"model_to_use": "UNet"
},

"service": {
Expand All @@ -23,6 +21,8 @@

"data": {
"data_root": "data",
"accepted_types": [".jpg", ".jpeg", ".png", ".tiff", ".tif"],
"seg_name_string": "_seg",
"gray": True,
"rescale": True
},
Expand Down
2 changes: 1 addition & 1 deletion src/server/dcp_server/models/unet.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def train(self, imgs: List[np.ndarray], masks: List[np.ndarray]) -> None:
# compute metric on test set after train is complete
for imgs, masks in train_dataloader:
pred_masks = self.forward(imgs.float())
self.metric += self.metric_f(masks, pred_masks)
self.metric += self.metric_f(pred_masks, masks)
self.metric /= len(train_dataloader)

def eval(self, img: np.ndarray) -> np.ndarray:
Expand Down

0 comments on commit 7c7500b

Please sign in to comment.