YOLO-based nematode egg detection with real-time processing
2.0K
A modern web application for automated nematode egg detection and counting using deep learning. This application provides an intuitive interface to process microscope images and identify nematode eggs using the YOLO object detection model.
Process 500 images for:
/
āāā app.py # Flask application with REST endpoints and core logic
āāā nemaquant.py # YOLO-based image analysis script
āāā requirements.txt # Python dependencies
āāā Dockerfile # Container configuration
āāā README.md
āāā templates/
ā āāā index.html # Modern, responsive web interface
āāā static/
ā āāā style.css # CSS styling
ā āāā script.js # Frontend interactivity and async processing
āāā weights.pt # YOLO model weights (required)
Clone the Repository:
git clone <repository-url>
cd nemaquant-flask
Install Dependencies:
pip install -r requirements.txt
Prepare Model Weights:
weights.pt file in the root directorySetup Environment:
mkdir -p uploads results annotated .yolo_config
export YOLO_CONFIG_DIR="$PWD/.yolo_config"
Run the Application:
python app.py
The application will be available at http://localhost:7860
DEfault image breedinginsight/nemaquant is exclusive for CPU usage.
For GPU usage replace the image by: breedinginsight/nemaquant:latest-gpu
With Docker
docker pull breedinginsight/nemaquant
With Apptainer/Singularity + Slurm from a server:
# 1) On the login node: pull the image once (creates a .sif file)
apptainer pull nemaquant_latest.sif docker://breedinginsight/nemaquant:latest
# 2) Request an interactive compute allocation (adjust for your cluster and analysis)
salloc -c 4 --mem=16G --time=02:00:00
# 3) On the compute node shell that opens, run the app on port 7860
export PORT=7860
apptainer run --cleanenv --env PORT=$PORT nemaquant_latest.sif
For GPU usage replace the image by: breedinginsight/nemaquant:latest-gpu
With Docker
docker run -p 7860:7860 -v $(pwd)/results:/app/results breedinginsight/nemaquant
With Apptainer/Singularity + Slurm from our local computer (after running the above commands on server):
# Replace user and host with your cluster login node.
# If your cluster requires a direct tunnel to the compute node, adapt accordingly.
ssh -L 7860:localhost:7860 [userID]@[yourcluster.address]
git lfs install
git lfs track "*.pt"
git add .gitattributes weights.pt
git add .
git commit -m "Initial deployment"
git push
Select Input Mode:
Upload Images:
Configure Processing:
View Results:
Note: These estimates are approximate and may vary based on:
For most users, the free tier is sufficient for small to medium batches (< 200 images), while the CPU upgrade offers a good balance of cost and performance for larger datasets. GPU options are recommended only for time-sensitive processing of large batches or when processing thousands of images.
Content type
Image
Digest
sha256:5b0cde8b7ā¦
Size
612 MB
Last updated
6 months ago
docker pull breedinginsight/nemaquant