Apply cell segmentation to images using the CLI tool or AWS Batch.
Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
Python 3.12 Setup
uv python install python==3.12
uv sync
uv tool install git+https://github.com/neibla/cell-segmentation
cell-segmentor -d tests/data --output test_output
cell-segmentor --input-images ./tests/data/L11_s1_w2_slice_0.png --output test_output
Install terraform (MacOS)
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
Setup AWS infrastructure
./update_infrastructure.sh
./build_docker.sh
AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
aws batch submit-job \
--job-name "cell-segmentation-job" \
--job-queue "arn:aws:batch:us-west-2:${AWS_ACCOUNT_ID}:job-queue/cell-segmentation-job-queue" \
--job-definition "cell-segmentation-job-def" \
--container-overrides '{
"command": [
"uv",
"run",
"src/cell_segmentor_cli/main.py",
"-d",
"s3://cell-segmentation-data-a05c1c99b4410510/data/test_data",
"-o",
"s3://cell-segmentation-data-a05c1c99b4410510/test_outputs"
]
}'