開發環境安裝
# detectron2 (必須安裝0.2.1版本否則會錯誤)python -m pip install detectron2==0.2.1 -f
https://dl.fbaipublicfiles.com/detectron2/wheels/cu92/torch1.6/index.html# lvis api (dataset設定)
pip install git+https://github.com/lvis-dataset/lvis-api.git# higher
pip install higher# tensorboard
pip install tensorboard==1.15# 程式專案
git clone https://github.com/Majiker/BalancedMetaSoftmax-InstanceSeg
取得 dataset
Note: LVIS uses the COCO 2017 train, validation, and test image sets. If you have already downloaded the COCO images, you only need to download the LVIS annotations. LVIS val set contains images from COCO 2017 train in addition to the COCO 2017 val split.
lvis是採用coco2017作為其dataset;lvis作為annotation
根據Expected dataset structure for LVIS instance segmentation,我們必須要有以下結構的dataset分布。若要使用預設值路徑,請將coco和lvis資料夾都放在balancedmetasoftmax-instanceseg/datasets/裡面。
coco/
{train,val,test}2017/
lvis/
lvis_v0.5_{train,val}.json
lvis_v0.5_image_info_test.json
lvis_v1_{train,val}.json
lvis_v1_image_info_test{,_challenge}.json