Skip to content

The goal is to segment instances of microvascular structures, including capillaries, arterioles, and venules, to in automating the segmentation of microvasculature structures as it will improve researchers' understanding of how the blood vessels are arranged in human tissues.

AhmedMaherElSaeidi/HuPMap-Segmentation-Flask

Repository files navigation

HuBMAP - Hacking the Human Vasculature (BackEnd implementation using Flask)

Description

The goal is to segment instances of microvascular structures, including capillaries, arterioles, and venules, to automate the segmentation of microvasculature structures to improve researchers' understanding of how the blood vessels are arranged in human tissues.

APIs

/predict/unet

  • Description: API for predicting using the UNet model.
  • Input: Kidney tissue image of shape 512x512x3, and its corresponding mask of shape 512x512x1.
  • Output:
    • 6 paths for the image, overlaid_image_true, overlaid_image_pred, true_mask, predicted_mask, and overlaid_mask.
    • 2 score metrics to indicate confidence IOU, and Dice.
    • Finally, the threshold at which the predicted_mask was binarized.

/predict/linknet

  • Description: API for predicting using LinkNet model.
  • Input: Kidney tissue image of shape 512x512x3, and its corresponding mask of shape 512x512x1.
  • Output:
    • 6 paths for the image, overlaid_image_true, overlaid_image_pred, true_mask, predicted_mask, and overlaid_mask.
    • 2 score metrics to indicate confidence IOU, and Dice.
    • Finally, the threshold at which the predicted_mask was binarized.

/predict/fcn

  • Description: API for predicting using FCN model.
  • Input: Kidney tissue image of shape 512x512x3, and its corresponding mask of shape 512x512x1.
  • Output:
    • 6 paths for the image, overlaid_image_true, overlaid_image_pred, true_mask, predicted_mask, and overlaid_mask.
    • 2 score metrics to indicate confidence IOU, and Dice.
    • Finally, the threshold at which the predicted_mask was binarized.

/predict/ensemble

  • Description: API for predicting using an ensemble of models.
  • Input: Kidney tissue image of shape 512x512x3, and its corresponding mask of shape 512x512x1.
  • Output:
    • 6 paths for the image, overlaid_image_true, overlaid_image_pred, true_mask, predicted_mask, and overlaid_mask.
    • 2 score metrics to indicate confidence IOU, and Dice.
    • Finally, the threshold at which the predicted_mask was binarized.

Installation

To install the project dependencies, run the following command:

pip install -r requirements.txt

This command will install all the necessary packages listed in the requirements.txt file.

Additional Setup

To ensure the project runs smoothly, please follow these steps:

  1. Weights Directory: Create a directory named weights within the model directory. This directory should contain the weights of the three models (UNet, LinkNet, FCN). These weights are essential for the proper functioning of the project. Adjust the model weights file name to match the one in the model_weights.json file.

    • UNet Model Weights: Download the UNet model weights from here.
    • LinkNet Model Weights: Download the LinkNet model weights from here.
    • FCN Model Weights: Download the FCN model weights from here.
  2. Images Directory in Static: Create a directory named images within the static directory. This directory will contain the images generated by the server to display them later.

Make sure to create these directories and add the necessary files before running the project.

About

The goal is to segment instances of microvascular structures, including capillaries, arterioles, and venules, to in automating the segmentation of microvasculature structures as it will improve researchers' understanding of how the blood vessels are arranged in human tissues.

Topics

Resources

Stars

Watchers

Forks

Languages