Package: cellseg-baseline
NeurIPS-CellSegA naive baseline and submission demo for themicroscopy image segmentation challenge in NeurIPS 2022PreprocessingDownload training data to thedatafolderRunpython pre_process_3class.pyTrainingcd baselineRunpython model_training_3class.py --data_path 'path to training data' --batch_size 8InferenceRunpython predict.py -i input_path -o output_pathYour prediction file should have at least the two arguments:input_pathandoutput_path. The two arguments are important to establish connections between local folders and docker folders.Build DockerWe recommend this great tutorial:https://nbviewer.org/github/ericspod/ContainersForCollaboration/blob/master/ContainersForCollaboration.ipynb1) PreparationThe docker is built onMONAIdocker pull projectmonai/monaiPrepareDockerfileFROMprojectmonai/monai:latestWORKDIR/workspaceCOPY.//workspacePut the inference command in thepredict.sh# !/bin/bash -epythonpredict.py-i"/workspace/inputs/"-o"/workspace/outputs/"Theinput_pathandoutput_pathaugments should specify the corresponding docker workspace folders rather than local folders, because we will map the local folders to the docker workspace folders when running the docker container.2) Build Docker and make sanity testThe submitted docker will be evaluated by the following command:dockercontainerrun--gpus"device=0"--nameteamname--rm-v$PWD/CellSeg_Test/:/workspace/inputs/-v$PWD/teamname_outputs/:/workspace/outputs/teamname:latest/bin/bash-c"sh predict.sh"--name: container name during running--rm: remove the container after running-v $PWD/CellSeg_Test/:/workspace/inputs/: map local image data folder to Dockerworkspace/inputsfolder.-v $PWD/teamname_outputs/:/workspace/outputs/: map Dockerworkspace/outputsfolder to local folder. The segmentation results will be in$PWD/teamname_outputsteamname:latest: docker image name (should beteamname) and its version tag.The version tag should belatest. Please do not usev0,v1... as the version tag/bin/bash -c "sh predict.sh": start the prediction command. It will load testing images fromworkspace/inputsand save the segmentation results toworkspace/outputsAssuming the team name isbaseline, the Docker build command isdocker build -t baseline .Test the docker to make sure it works. There should be segmentation results in thebaseline_outputsfolder.dockercontainerrun--gpus"device=0"--namebaseline--rm-v$PWD/CellSeg_Test/:/workspace/inputs/-v$PWD/baseline_outputs/:/workspace/outputs/baseline:latest/bin/bash-c"sh predict.sh"During the inference, please monitor the GPU memory consumption usingwatch nvidia-smi. The GPU memory consumption should be less than 1500MB. Otherwise, it will run into an OOM error on the official evaluation server. We impose this hard constraint on GPU memory consumption to ensure ease of use, because biologists may not have powerful GPUs in practice. Thus, the model should be low-resource.3) Save Dockerdocker save baseline | gzip -c > baseline.tar.gzUpload the docker to Google drive or Baidu net disk and send the download link toNeurIPS.CellSeg@gmail.com.Pleasedo notupload the Docker to dockerhub!Limitations and potential improvementsThe naive baseline's primary aim is to give participants out-of-the-box scripts that can generate successful submisions. Thus, there are many ways to surpass this baseline:New cell representation methods. In the baseline, we separated touching cells by simply removing their boundaries. More advanced cell representation could be used to address this issue, such asstardist,cellpose,omnipose,deepcell, and so on.New architecturesMore data augmentations and the use of additionalpublic datasetsor the set of unlabeled data provided.Well-designed training protocolsPostprocessingNevertheless, please always keep in mind that many end users do not have powerful computation resources. It's important to consider the trade-off between resource consumption and accuracy.