LVIS-for-mmdetection
LVIS-for-mmdetection copied to clipboard
support Large Vocabulary Instance Segmentation (LVIS) dataset for mmdetection
LVIS-for-mmdetection
support Large Vocabulary Instance Segmentation (LVIS) dataset for mmdetection
1. Install mmdetection
Follow the instruction of mmdetection to install
2. Install LVIS-API
To evaluate the LVIS, we also need its api. Follow the LVIS-API to install.
3. Prepare the LVIS Dataset
Download all the images and annotations from the LVIS homepage. Organize them in the data folder as:
mmdetection
├── mmdet
├── tools
├── configs
├── data
│ ├── LVIS
│ │ ├── lvis_v0.5_train.json
│ │ ├── lvis_v0.5_val.json
│ │ ├── images
│ │ │ ├── train2017
│ │ │ ├── val2017
4. Copy Code
- Copy
LVIS.pyandLVIS_utils.pyintommdet/datasets/folder. - Add
from .LVIS import LVISDatasettommdet/datasets/__init__.py, and'LVISDataset'to__all__
5. Change the Config File
- You can refer to our
htc_x101_32x4d_fpn_20e_16gpu_example.py. - Change
data,dataset_typeanddata_root. - Set
rcnn.score_thr=0.00001andrcnn.max_per_img=300in test_cfg.
6. A Weird logger.handlers Bug
When I was training the model, I found a weird bug that the logger won't print out anymore. It takes me a long time to figure out that it's caused by the logger.HasHandlers() function, which always returns the True even the logger.handlers = []. If you have the same problem, you can use logger.py to replace the original mmdet/utils/logger.py in mmdetection project. If you don't have this problem, never mind.