This project implements an automated system for detecting and counting shrimp seeds/larvae using computer vision techniques. Built as a Streamlit-based web application, it provides shrimp farmers and hatchery operators with an easy-to-use tool for real-time counting, eliminating the need for manual processes. The system is designed to improve population density monitoring, inventory management, and feeding optimization.
The inspiration for this project stems from Bhimavaram, a village in Andhra Pradesh, India, where aquaculture is a primary source of livelihood. Farmers in this region often rely on manual counting of shrimp seeds before purchase, which is both time-consuming and prone to errors. This project was initiated with the vision of creating a scalable solution that could eventually evolve into a mobile application, making it even more accessible to farmers in rural areas. While this version is implemented as a web-based tool, it lays the groundwork for future enhancements that align with this vision.
-
Automated Detection: Identifies individual shrimp seeds in images or video streams using advanced computer vision models.
-
Accurate Counting: Provides precise counts with minimal margin of error (93-96% accuracy).
-
Batch Processing: Processes multiple images simultaneously for large-scale analysis.
-
User-Friendly Web Interface: Built using Streamlit, offering an intuitive platform for image upload and result visualization.
-
Report Generation: Exports detailed reports with count statistics and visualizations.
-
Scalable Design: Can be extended to support mobile applications or cloud-based solutions in the future.
- Programming Language: Python 3.11
- Computer Vision: OpenCV, TensorFlow/PyTorch, detectron2 (from facebook)
- Image Processing: NumPy, SciPy
- Model Architecture: YOLOv5/Faster R-CNN for object detection
- UI Framework: Streamlit/Flask (web interface)
- Python 3.11 or higher
- CUDA-compatible GPU (recommended for faster processing)
- Webcam or digital camera for live counting
# Clone the repository
git clone https://github.com/rishendra-manne/shrimp_seeds_detection.git
cd shrimp_seeds_detection
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
### Web Interface
```bash
# Start the web application
python app.pyThen open your browser and navigate to http://localhost:8501
Special installation note for detectron2: Since detectron2 is not available directly via pip, it should be installed separately with:
# For CUDA-enabled GPU:
pip install 'gitthttps: //github.com/facebookresearch/detectron2.git'
# For CPU-only:
pip install 'git+https://github.com/facebookresearch/detectron2.git@main#subdirectory=projects/PointRend'If you need to train the model on your specific prawn species or environment:
# Train the detection model with custom data
python src/pipelines/training_pipeline.py --data_path ./data/custom_dataset --epochs 50 --batch_size 16 --model yolov5_custom.pt
- Counting Accuracy: 93-96% under optimal conditions
- Processing Speed: 2-3 seconds for a image
- Minimum Detectable Size: 0.5mm larvae
- Optimal Water Clarity: 80%+ transparency of thin layer
-
Poor Detection Accuracy
- Ensure proper lighting conditions
- Check water clarity and background contrast
- Adjust detection threshold in config.yml
-
Slow Processing
- Reduce input image resolution
- Enable GPU acceleration
- Use batch processing for large datasets
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request