GithubHelp home page GithubHelp logo

cuda-chen / fish-yolo-grabcut Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 6.0 3.4 MB

YOLOv3 object detection then use GrabCut to do semantic segmentation to fish market images.

License: MIT License

Python 88.53% Dockerfile 11.10% Shell 0.37%
fish-market-images yolov3 grabcut-segmentation object-detection opencv-python image-segmentation

fish-yolo-grabcut's Introduction

Fish YOLO GrabCut

YOLOv3 object detection then use GrabCut to do semantic segmentation to fish market images.

Demo on Heroku

I have deployed this project on Heroku. You can try here: https://fish-yolo-grabcut.herokuapp.com/

Set up and Run Demo Locally

First, create a virtual environment and install the dependencies (assume you are using conda):

$ conda create -n fish-yolo-grabcut python=3.6 pip 
$ conda activate fish-yolo-grabcut
$ pip install -r requirements.txt

Then, use gdown to download the pretrained weights from here and put it to yolo-fish directory:

$ gdown --output ./yolo-fish/fish.weights --id 1L6JgzbFhC7Bb_5w_V-stAkPSgMplvsmq

Next, choose one of the following approaches you like.

1. Command Line Approach

$ python main.py --image ./images/DSC_0061.JPG --yolo yolo-fish

When finishing, you should find 8 jpg images in the project root directory.

2. Streamlit Approach

$ streamlit run app.py

You can upload fish market image to run the program.

The results are shown in the browser (make sure to scroll down).

3. Docker Approach

$ docker image build -t fish-yolo-grabcut:app .
$ docker container run -p 8501:8501 --rm -d grabcut:app

Then upload fish market image to run the program.

The results are shown in the browser (make sure to scroll down).

To shutdown the docker type this:

$ docker kill <weird id of fish-yolo-grabcut.app>

fish-yolo-grabcut's People

Contributors

cuda-chen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fish-yolo-grabcut's Issues

GrabCut.py

Try to :
python yoloUtils/GrabCut.py --image ./images/person.jpg --yolo yolo-fish

File "yoloUtils/GrabCut.py", line 44, in
img, boxes, idxs = yolo.runYOLODetection(args)
ValueError: too many values to unpack (expected 3)

Thaks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.