Skip to content

utpalpaul108/Image-Segmentation-Using-YOLOv8-and-SAM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Segmentation Using YOLOv8 And SAM

This project provides an implementation of image segmentation using YOLOv8, a state-of-the-art object detection algorithm, coupled with Spatial Attention Module (SAM) for enhanced segmentation accuracy. Leveraging the power of YOLOv8's object detection capabilities and SAM's attention mechanism, this project offers efficient and precise segmentation of images.

Examples

Dataset

Here, I have used this blood cells dataset. You can use your own dataset.

Steps to run

STEP 00 : Clone the repository
https://github.com/utpalpaul108/Image-Segmentation-Using-YOLOv8-and-SAM
STEP 01 : Create a virtial environment after opening the repository

Using Anaconda Virtual Environments

conda create -n venv python=3.10 -y
conda activate venv

Or for Linux operating system, you can use that

python3.10 -m venv venv
source venv/bin/activate
STEP 02 : Install the requirements
pip install -r requirements.txt
pip install 'git+https://github.com/facebookresearch/segment-anything.git'
wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth
wget https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x.pt

Finally, run the following command to run your application:

python app.py
STEP 03 : Run the application

Now,open up your local host with a port like that on your web browser.

http://localhost:8080
STEP 04 : Train the model

You can train your model with your own dataset.

http://localhost:8080/train

After completing the training, you can now upload any blood cells image and detect the blood cells.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published