Open junxnone opened 5 years ago
git clone https://github.com/facebookresearch/detectron2.git cd detectron2/docker docker-compose run detectron2
mkvirtualenv -p python3 pytorch pip3 install torch==1.3.1+cu92 torchvision==0.4.2+cu92 -f https://download.pytorch.org/whl/torch_stable.html pip3 install cython pip3 install -U 'git+https://github.com/facebookresearch/fvcore.git' 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI' pip3 install -e detectron2/
N.B. GCC/G++ 要用 4.9
from detectron2.config import get_cfg cfg = get_cfg() cfg.xxx = yyy
cfg is CfgNode Instance
cfg.merge_from_file("my_cfg.yaml")
cfg.merge_from_list(["MODEL.WEIGHTS", "weights.pth"])
print(cfg.dump())
all configs name
def get_dicts(): ... return list[dict] in the following format
from detectron2.data import DatasetCatalog DatasetCatalog.register("my_dataset", get_dicts)
- register metadata
Reference
Brief
Environment
Docker 使用
Host Virtualenv
Config
Data
from detectron2.data import DatasetCatalog DatasetCatalog.register("my_dataset", get_dicts)