Martin Tomov
commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,58 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
datasets:
|
| 4 |
+
- martintmv/rb-ibdm-l
|
| 5 |
---
|
| 6 |
+
|
| 7 |
+
# InsectSAM: Insect Segmentation and Monitoring
|
| 8 |
+
|
| 9 |
+
<p align="left">
|
| 10 |
+
<a href="" rel="noopener">
|
| 11 |
+
<img width=200px height=200px src="https://i.imgur.com/hjWgAN9.png alt="Project logo"></a>
|
| 12 |
+
</p>
|
| 13 |
+
|
| 14 |
+
## Overview
|
| 15 |
+
|
| 16 |
+
InsectSAM is an advanced machine learning model tailored for the DIOPSIS camera systems, which are dedicated to Insect Biodiversity Detection and Monitoring in the Netherlands. Built on Meta AI's `segment-anything` framework, InsectSAM excels at segmenting insects from complex backgrounds, enhancing the accuracy and efficiency of biodiversity monitoring efforts.
|
| 17 |
+
|
| 18 |
+
## Purpose
|
| 19 |
+
|
| 20 |
+
This model has been meticulously trained to identify and segment insects against a variety of backgrounds that might otherwise confuse traditional algorithms. It is specifically designed to adapt to future changes in background environments, ensuring its long-term utility in the DIOPSIS project.
|
| 21 |
+
|
| 22 |
+
## Model Architecture
|
| 23 |
+
|
| 24 |
+
InsectSAM utilizes the advanced capabilities of the `segment-anything` architecture, enhanced by our custom training on an insect-centric dataset. The model is further refined by integrating with GroundingDINO, improving its ability to distinguish fine details and subtle variations in insect appearances.
|
| 25 |
+
|
| 26 |
+
## Quick Start
|
| 27 |
+
|
| 28 |
+
### Prerequisites
|
| 29 |
+
|
| 30 |
+
- Python
|
| 31 |
+
- Hugging Face Transformers
|
| 32 |
+
- PyTorch
|
| 33 |
+
|
| 34 |
+
### Usage
|
| 35 |
+
|
| 36 |
+
#### Install
|
| 37 |
+
``` bash
|
| 38 |
+
!pip install --upgrade -q git+https://github.com/huggingface/transformers
|
| 39 |
+
!pip install torch
|
| 40 |
+
```
|
| 41 |
+
#### Load model directly via HF Transformers 🤗
|
| 42 |
+
``` bash
|
| 43 |
+
from transformers import AutoProcessor, AutoModelForMaskGeneration
|
| 44 |
+
|
| 45 |
+
processor = AutoProcessor.from_pretrained("martintmv/InsectSAM")
|
| 46 |
+
model = AutoModelForMaskGeneration.from_pretrained("martintmv/InsectSAM")
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
### Notebooks
|
| 50 |
+
|
| 51 |
+
Two Jupyter notebooks are provided to demonstrate the model's capabilities and its integration with GroundingDINO:
|
| 52 |
+
|
| 53 |
+
- **InsectSAM.ipynb**: Covers the training process, from data preparation to model evaluation.
|
| 54 |
+
- **InsectSAM_GroundingDINO.ipynb**: Demonstrates how InsectSAM is combined with GroundingDINO for enhanced segmentation performance.
|
| 55 |
+
|
| 56 |
+
Check out the notebooks on RB-IBDM's GitHub page - https://github.com/martintmv-git/RB-IBDM/tree/main/InsectSAM
|
| 57 |
+
|
| 58 |
+
|