Skip to content

Commit

Permalink
Merge pull request #73 from HelmholtzAI-Consultants-Munich/multicellp…
Browse files Browse the repository at this point in the history
…ose-integration

Multicellpose integration
  • Loading branch information
christinab12 authored Feb 23, 2024
2 parents 4c596c4 + 72397dd commit a2aaa6c
Show file tree
Hide file tree
Showing 4 changed files with 308 additions and 36 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
pip install pytest-qt
pip install pytest-xvfb
pip install coverage
pip install -e ".[testing]"
pip install -e --no-cache-dir ".[testing]"
pip install matplotlib
working-directory: src/client

Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
pip install pytest
pip install wheel
pip install coverage
pip install -e ".[testing]"
pip install -e --no-cache-dir ".[testing]"
working-directory: src/server

- name: Test with pytest
Expand Down
3 changes: 2 additions & 1 deletion src/client/test/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,14 @@ def test_run_inference_run(app):
"--reload",
"--port=7010",
]
process = subprocess.Popen(command)
process = subprocess.Popen(command, stdin=subprocess.PIPE, shell=False)
# and wait until it is setup
if sys.platform == 'win32' or sys.platform == 'cygwin': time.sleep(240)
else: time.sleep(60)
# then do model serving
message_text, message_title = app.run_inference()
# and assert returning message
print(f"HERE: {message_text, message_title}")
assert message_text== "Success! Masks generated for all images"
assert message_title=="Information"
# finally clean up process
Expand Down
9 changes: 5 additions & 4 deletions src/server/dcp_server/config.cfg
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
{
"setup": {
"segmentation": "GeneralSegmentation",
"model_to_use": "UNet",
"model_to_use": "CellposeMultichannel",
"accepted_types": [".jpg", ".jpeg", ".png", ".tiff", ".tif"],
"seg_name_string": "_seg"
},

"service": {
"runner_name": "bento_runner",
"bento_model_path": "unetN",
"bento_model_path": "cp-multi",
"service_name": "data-centric-platform",
"port": 7010
},

"model": {
"segmentor": {
"model_type": "cyto"

},
"classifier":{
"model_class": "RandomForest",
"in_channels": 1,
"num_classes": 3,
"num_classes": 2,
"features":[64,128,256,512],
"black_bg": "False",
"include_mask": "False"
Expand All @@ -33,7 +34,7 @@

"train":{
"segmentor":{
"n_epochs": 10,
"n_epochs": 5,
"channels": [0,0],
"min_train_masks": 1
},
Expand Down
Loading

0 comments on commit a2aaa6c

Please sign in to comment.