docker pull pablogod/fishcut
docker container run -p 8501:8501 --rm -d pablogod/fishcut
YOLOv3 object detection then use GrabCut to do semantic segmentation to fish market images.
I have deployed this project on Heroku. You can try here: https://fish-yolo-grabcut.herokuapp.com/
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 1M8dKL0mjh5QkdH2UeFQN9RF3pXCV6hao
Next, choose one of the following approaches you like.
$ python main.py --image ./images/DSC_0061.JPG --yolo yolo-fish
When finishing, you should find 8 jpg images in the project root directory.
$ 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).
$ 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>