Skip to content

Senckenberg-DCBiodivIT/DiSSCo-MAS-Pilot

Repository files navigation

Plant Organ Segmentation Machine Annotation Service

This repository provides a machine annotation service for plant organ segmentation, designed to facilitate the extraction of additional information from herbarium sheets. It includes a trained model checkpoint and the necessary scripts to deploy and test the system.


Create and Activate a virtual environment

conda create -n plant_organ_segmentation python=3.12.3
conda activate plant_organ_segmentation

Install dependencies

To set up the environment, follow these steps:

  1. Install required dependencies for the service:

    pip install -r requirements_service.txt
    pip install -r requirements_inference.txt

Usage

Uvicorn Service

To start the server using uvicorn, run the service.py script. This will initialize the server and allow it to handle incoming requests for plant organ segmentation.

Start the service:

python service.py

WebSocket

The uvicorn service forwards incoming requests to the WebSocket, where inference is performed and additional information such as surface area and other plant organ properties are extracted. To run the WebSocket process and handle inference, execute the following command:

To start the websocket for Mask R-CNN model inference:

python inference.py

or to start the websocket for YOLO11 model inference:

python inference_yolo.py

Standalone Testing

To test the service with images, the test.py script performs inference on the images located in the test_image/scans directory and outputs the results.

Run the standalone test:

 python test.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages