Skip to content

Latest commit

 

History

History
48 lines (40 loc) · 1.67 KB

ONOSETUP.md

File metadata and controls

48 lines (40 loc) · 1.67 KB

bubble detector

bubble detector is a model for detecting the position and shape of bubbles using mask cnn. This program can only be run on a GPU platform, as cuda capabilites are needed.

Installation

Step 0.Download and install Miniconda from the official website. Step 1.Create a conda environment and activate it, terminal should be opened where you downloaded bubble_detector

cd bubble_detector
conda create --name bubble_project python=3.8 -y
conda activate bubble_project

Step 2.Install CudaToolKit

conda install anaconda::cudatoolkit==11.8.0

Step 3.Install Pytorch following official instructions, e.g.

conda install pytorch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 pytorch-cuda=11.8 -c pytorch -c nvidia

Step 4.Install OpenMIM

pip install -U openmim

Step 5.Install requirements

pip install -r requirements/pip.txt
mim install -r requirements/mim.txt

Usage

Detecting Black and White, B/W images will be output in the runs folder under detect*

python detect_BW.py ./models/bubble_swin-b/config.py <path-to-checkpoint.pth> <path-to-bubble-images>

Training

python train.py <path-to-training dataset>

If you want to configure the learning settings detail, edit config/cascade_mask_rcnn__fpn.py following official guide.

Included

bubble_dataset: Dataset for Instans Segmentation in COCO format with configuration in data.yaml. bubblr_swin-b: Configuration and checkpoints learned mask-rcnn with swin-b backbone in bubble_dataset.