Skip to content

Commit

Permalink
Merge pull request #47 from HelmholtzAI-Consultants-Munich/add-configs
Browse files Browse the repository at this point in the history
Add configs
  • Loading branch information
christinab12 authored Dec 12, 2023
2 parents 16cc3a0 + d51c3f3 commit faac7f3
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 6 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,19 @@ This repo includes a client and server side for using our data centric platform.

To run the client GUI follow the instructions described in [DCP Client Installation & Launch](https://github.com/HelmholtzAI-Consultants-Munich/data-centric-platform/blob/main/src/client/README.md).

DCP handles all kinds of **segmentation tasks**! Try it out if you need to do:
* **Instance** segmentation
* **Semantic** segmentation
* **Panoptic** segmentation

### Toy data
This repo includes the ```data/``` directory with some toy data which you can use as the *Uncurated dataset* folder. You can create (empty) folders for the other two directories required in the welcome window and start playing around.

### Enabling data centric development
Our platform encourages the use of data centric practices. With the user friendly client interface you can:
- Detect and remove outliers from your training data: only confirmed samples are used to train our models
- Detect and correct labeling errors: editing labels with the integrated napari visualisation tool
- Establish consensus: allows for multiple annotators before curated label is passed to train model
- Focus on data curation: no interaction with model parameters during training and inference

#### *Get more with less!*
2 changes: 2 additions & 0 deletions src/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Before launching the GUI you will need to set up your client configuration file,
```
Before continuing, you need to make sure that DCP server is running, either locally or on the cloud. See [DCP Server Installation & Launch](https://github.com/HelmholtzAI-Consultants-Munich/data-centric-platform/blob/main/src/server/README.md#using-pypi) for instructions on how to launch the server. **Note:** In order for this connection to succeed, you will need to have contacted the team developing DCP, so they can add your IP to the list of accepted requests.

To make it easier for you we provide you with two config files, one works when running a local server and one for remote - just make sure you rename the config file you wish to use to ```config.cfg```. The defualt is local configuration.


2. **Launching the client**

Expand Down
8 changes: 4 additions & 4 deletions src/client/dcp_client/config.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"server":{
"user": "ubuntu",
"host": "jusuf-vm2",
"data-path": "/home/ubuntu/dcp-data",
"ip": "134.94.88.74",
"user": "local",
"host": "local",
"data-path": "None",
"ip": "localhost",
"port": 7010
}
}
9 changes: 9 additions & 0 deletions src/client/dcp_client/config_remote.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"server":{
"user": "ubuntu",
"host": "jusuf-vm2",
"data-path": "/home/ubuntu/dcp-data",
"ip": "134.94.88.74",
"port": 7010
}
}
6 changes: 6 additions & 0 deletions src/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ The config file has to have the five main parts. All the ```marked``` arguments
- ```classifier```: train configuration for classifier, see _eval()_ of ```CellClassifierFCNN```.
- ```mask_channel_axis```: If a multi-class instance segmentation model has been used, then the masks returned by the model should have two channels, one for the instance segmentation results and one indicating the obects class. This variable indicated at which dim the channel axis should be stored. Currently should be kept at 0, as this is the only way the masks can be visualised correcly by napari in the client.

To make it easier for you we provide you with two config files: ```config.cfg``` is set up to work for a panoptic segmentation task, while ```config_instance.cfg``` for instance segmentation. Make sure to rename the config you wish to use to ```config.cfg```. The default is panoptic segmentation.

## Models
The current models are currently integrated into DCP:
* CellPose --> for instance segmentation tasks
* CellposePatchCNN --> for panoptic segmentation tasks: includes the Cellpose model for instance segmentation followed by a patch wise CNN model on the predicted instances for obtaining class labels

## Running with Docker [DO NOT USE UNTIL ISSUE IS SOLVED]

Expand Down
4 changes: 2 additions & 2 deletions src/server/dcp_server/config.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},

"service": {
"model_to_use": "CustomCellposeModel",
"model_to_use": "CellposePatchCNN",
"save_model_path": "mito",
"runner_name": "cellpose_runner",
"service_name": "data-centric-platform",
Expand Down Expand Up @@ -41,7 +41,7 @@
"noise_intensity": 5,
"num_classes": 3
},
"n_epochs": 8,
"n_epochs": 10,
"lr": 0.001,
"batch_size": 1,
"optimizer": "Adam"
Expand Down
43 changes: 43 additions & 0 deletions src/server/dcp_server/config_instance.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"setup": {
"segmentation": "GeneralSegmentation",
"accepted_types": [".jpg", ".jpeg", ".png", ".tiff", ".tif"],
"seg_name_string": "_seg"
},

"service": {
"model_to_use": "CustomCellposeModel",
"save_model_path": "cells",
"runner_name": "cellpose_runner",
"service_name": "data-centric-platform",
"port": 7010
},

"model": {
"segmentor": {
"model_type": "cyto"
}
},

"data": {
"data_root": "data"
},

"train":{
"segmentor":{
"n_epochs": 10,
"channels": [0,0],
"min_train_masks": 1
}
},

"eval":{
"segmentor": {
"z_axis": null,
"channel_axis": null,
"rescale": 1,
"batch_size": 1
},
"mask_channel_axis": null
}
}

0 comments on commit faac7f3

Please sign in to comment.