Mask R-CNN based extracellular vesicle instance segmentation
The repository includes:
- detector.py Code for train and evaluation Mask R-CNN based on https://github.com/matterport/Mask_RCNN
- server.py Simple web interface based on Flask. You can see hosted application here
- vesicle.py Command line tool for segmentation
- Dataset
- Trained model
- Install nvidia docker (Linux only) https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#installing-docker-ce
- Download model weights
Run on cpu
# Change to actual model absolute path
MODEL_PATH="/path/to/mask_rcnn_vesicle.h5"
docker run \
-v ${MODEL_PATH}:/app/models/mask_rcnn_vesicle.h5 \
-p 8000:8000 \
highresolutionimaging/vesicles
For example, if you use Windows and you have mask_rcnn_vesicle.h5 in C:\Users\User\Downloads, you should run
docker run -v C:/Users/User/Downloads/mask_rcnn_vesicle.h5:/app/models/mask_rcnn_vesicle.h5 -p 8000:8000 highresolutionimaging/vesicles
Run on gpu (Linux only)
# Change to actual model absolute path
MODEL_PATH="/path/to/mask_rcnn_vesicle.h5"
docker run \
-v ${MODEL_PATH}:/app/models/mask_rcnn_vesicle.h5 \
-p 8000:8000 \
--gpus all \
--env TF_FORCE_GPU_ALLOW_GROWTH=true \
highresolutionimaging/vesicles
Server listening on 0.0.0.0:8000 so you can access app on localhost:8000 or {HOST_IP}:8000