{"id":19215900,"url":"https://github.com/vanvalenlab/deepcell-applications","last_synced_at":"2025-06-22T19:35:34.109Z","repository":{"id":37949708,"uuid":"288558128","full_name":"vanvalenlab/deepcell-applications","owner":"vanvalenlab","description":"Run DeepCell Applications","archived":false,"fork":false,"pushed_at":"2023-04-19T04:39:40.000Z","size":47,"stargazers_count":9,"open_issues_count":3,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-12T23:34:45.657Z","etag":null,"topics":["deep-learning","docker","image-processing","instance-segmentation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vanvalenlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-08-18T20:30:09.000Z","updated_at":"2025-03-14T00:18:36.000Z","dependencies_parsed_at":"2025-04-20T19:36:08.738Z","dependency_job_id":"9a8f6223-7cdf-499e-8eb2-18085b014238","html_url":"https://github.com/vanvalenlab/deepcell-applications","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/vanvalenlab/deepcell-applications","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanvalenlab%2Fdeepcell-applications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanvalenlab%2Fdeepcell-applications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanvalenlab%2Fdeepcell-applications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanvalenlab%2Fdeepcell-applications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vanvalenlab","download_url":"https://codeload.github.com/vanvalenlab/deepcell-applications/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanvalenlab%2Fdeepcell-applications/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261352841,"owners_count":23146135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","docker","image-processing","instance-segmentation"],"created_at":"2024-11-09T14:15:11.651Z","updated_at":"2025-06-22T19:35:29.098Z","avatar_url":"https://github.com/vanvalenlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deepcell-applications\n\n[![Build Status](https://github.com/vanvalenlab/deepcell-applications/workflows/build/badge.svg)](https://github.com/vanvalenlab/deepcell-applications/actions)\n[![Coverage Status](https://coveralls.io/repos/github/vanvalenlab/deepcell-applications/badge.svg?branch=master)](https://coveralls.io/github/vanvalenlab/deepcell-applications?branch=master)\n[![Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/vanvalenlab/deepcell-applications/blob/master/LICENSE)\n\nA script and runnable Docker image for plugging DeepCell Applications (like `Mesmer`) into existing pipelines.\n\n## Running the Python script\n\nThe `run_app.py` script is used to read the input files from the user and process them with the selected Application.\nAn example Python script `run_app.py` is provided as an example `deepcell.applications` workflow.\n\n### Script arguments\n\nThe first required argument to the script is the Application name: `python run_app.py APP_NAME`.\nEach supported application has a variety of different configuration arguments.\nBelow is a table summarizing the currently supported applications and their arguments and any defaults.\nFor more information, use `python run_app.py --help` or `python run_app.py APP_NAME --help`.\n\nTo learn more about the pretrained models, see the [introductory documentation](https://github.com/vanvalenlab/intro-to-deepcell/tree/master/pretrained_models).\n\n#### Mesmer arguments\n\n| Name | Description | Default Value |\n| :--- | :--- | :--- |\n| `--output-directory` | Directory to save output file. | `\"./output\"` |\n| `--output-name` | The name for the output file. | `\"mask.tif\"` |\n| `--nuclear-image` | **REQUIRED**: The path to an image containing the nuclear marker(s). | `\"\"` |\n| `--nuclear-channel` | The numerical index of the channel(s) from `nuclear-image` to select. If multiple values are passed, the channels will be summed. | `0` |\n| `--membrane-image` | The path to an image containing the membrane marker(s). If not passed, an array of zeroes will be used instead. | `\"\"` |\n| `--membrane-channel` | The numerical index of the channel(s) from `membrane-image` to select. If multiple values are passed, the channels will be summed. | `0` |\n| `--compartment` | Predict nuclear or whole-cell segmentation. | `\"whole-cell\"` |\n| `--image-mpp` | The resolution of the image in microns-per-pixel. A value of 0.5 corresponds to 20x zoom. | `0.5` |\n| `--batch-size` | Number of images to predict on per batch. | `4` |\n| `--squeeze` | Whether to `np.squeeze` the outputs before saving as a tiff. | `False` |\n\n### Script command\n\n```bash\nexport DATA_DIR=/Users/Will/vanvalenlab/example_data/multiplex\nexport APPLICATION=mesmer\nexport NUCLEAR_FILE=example_nuclear_image.tif\nexport MEMBRANE_FILE=example_membrane_image.tif\npython run_app.py $APPLICATION \\\n  --nuclear-image $DATA_DIR/$NUCLEAR_FILE \\\n  --nuclear-channel 0 \\\n  --membrane-image $DATA_DIR/$MEMBRANE_FILE \\\n  --membrane-channel 0 1 \\\n  --output-directory $DATA_DIR \\\n  --output-name mask.tif \\\n  --compartment whole-cell\n```\n\n## Using Docker\n\nThe script can also be run as a Docker image for improved portability.\nThis repository has published versions for both CPU and GPU for each versioned release.\n\nThe latest images for each are readily available:\n\n* `vanvalenlab/deepcell-applications:latest` (CPU build)\n* `vanvalenlab/deepcell-applications:latest-gpu` (GPU build)\n\nOr for better reproducibility, use a versioned release (e.g. `vanvalenlab/deepcell-applications:0.1.0-gpu`)\n\n### Run the image\n\nFor Docker API version \u003e= 1.40:\n\n```bash\nexport DATA_DIR=/path/to/data/dir\nexport MOUNT_DIR=/data\nexport APPLICATION=mesmer\nexport NUCLEAR_FILE=example_nuclear_image.tif\nexport MEMBRANE_FILE=example_membrane_image.tif\ndocker run -it --gpus 1 \\\n  -v $DATA_DIR:$MOUNT_DIR \\\n  vanvalenlab/deepcell-applications:latest-gpu \\\n  $APPLICATION \\\n  --nuclear-image $MOUNT_DIR/$NUCLEAR_FILE \\\n  --membrane-image $MOUNT_DIR/$MEMBRANE_FILE \\\n  --output-directory $MOUNT_DIR \\\n  --output-name mask.tif \\\n  --compartment whole-cell\n```\n\nFor Docker API version \u003c 1.40:\n\n```bash\nexport DATA_DIR=/path/to/data/dir\nexport MOUNT_DIR=/data\nexport APPLICATION=mesmer\nexport NUCLEAR_FILE=example_nuclear_image.tif\nexport MEMBRANE_FILE=example_membrane_image.tif\ndocker run -it \\\n  -v $DATA_DIR:$MOUNT_DIR \\\n  vanvalenlab/deepcell-applications:latest-gpu \\\n  $APPLICATION \\\n  --nuclear-image $MOUNT_DIR/$NUCLEAR_FILE \\\n  --membrane-image $MOUNT_DIR/$MEMBRANE_FILE \\\n  --output-directory $MOUNT_DIR \\\n  --output-name mask.tif \\\n  --compartment whole-cell\n```\n\n### Build the image\n\nIt is also very easy to build a custom image to test any new functionality:\n\n```bash\ndocker build -t vanvalenlab/deepcell-applications .\n```\n\nIt is also possible to change the base DeepCell version when building the image, using the build-arg `DEEPCELL_VERSION`.\nThis makes it simple to build a CPU-only version of the image or to build a new version of `deepcell-tf`.\n\n```bash\n# the -gpu tag is required to enable GPU compatibility when overriding versions\ndocker build --build-arg DEEPCELL_VERSION=0.9.0-gpu -t vanvalenlab/deepcell-applications .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanvalenlab%2Fdeepcell-applications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvanvalenlab%2Fdeepcell-applications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanvalenlab%2Fdeepcell-applications/lists"}