This repository contains the official implementation of Zero-shot Hierarchical Plant Segmentation via Foundation Segmentation Models and Text-to-image Attention (Junhao Xing, Ryohei Miyakawa, Yang Yang, Xinpeng Liu, Risa Shinoda, Hiroaki Santo, Yosuke Toda, Fumio Okura).
Clone this repo and install the requirements:
git clone https://github.com/JunhaoXing/ZeroPlantSeg.git
pip3 install -r requirements.txtBuild the environment as docker/README.md.
Run ckpt_download.sh to acquire necessay checkpoints:
sh ./ckpt_download.shTo collect leaf mask candidates, run leaf_mask_collection.py with
python3 leaf_mask_collection.py --dataset ${dataset_name} --mode ${val_or_test}To get leaf instance segmentation, run leaf_segmentation.py with
python3 leaf_segmentation.py --dataset ${dataset_name} --mode ${val_or_test}To get plant instance segmentation, run plant_segmentation.py with
python3 leaf_segmentation.py --dataset ${dataset_name} --mode ${val_or_test}