facebookresearch / detectron2

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.
https://detectron2.readthedocs.io/en/latest/
Apache License 2.0
30.52k stars 7.48k forks source link

Training on custom dataset, but detectron keeps looking for 'datasets/coco/annotations/instances_train2017.json' #4194

Closed Roland-Pfeiffer closed 2 years ago

Roland-Pfeiffer commented 2 years ago

I'm training with a custom dataset, but for some reason when training (both locally and on google colab) using

trainer = DefaultTrainer(cfg) 
trainer.resume_or_load(resume=False)
trainer.train()

I receive the error

FileNotFoundError: [Errno 2] No such file or directory: 'datasets/coco/annotations/instances_train2017.json'

(full error below).

I'd appreciate any help as to why this might happen. Thank you!

Instructions To Reproduce the Issue:

Here is the code for setting up my cfg:

from detectron2.engine import DefaultTrainer

cfg = get_cfg()

DatasetCatalog.register("train", lambda: detectron.create_detectron_img_dict_list(fpath_json_train))
DatasetCatalog.register("val", lambda: detectron.create_detectron_img_dict_list(fpath_json_valid))

MetadataCatalog.get("train").set(thing_classes=classes.values())
MetadataCatalog.get("val").set(thing_classes=classes.values())

# microcontroller_metadata = MetadataCatalog.get("trash_train")
metadata_train = MetadataCatalog.get("train")
metadata_valid = MetadataCatalog.get("val")

cfg.DATASETS.TRAIN = ("train",)
cfg.DATASETS.TEST = ()
cfg.merge_from_file(model_zoo.get_config_file("COCO-Detection/faster_rcnn_R_50_C4_1x.yaml"))
cfg.MODEL.WEIGHTS = model_zoo.get_checkpoint_url("COCO-Detection/faster_rcnn_R_50_C4_1x.yaml")  # Let training initialize from model zoo
cfg.DATALOADER.NUM_WORKERS = 2
cfg.SOLVER.IMS_PER_BATCH = 2
cfg.SOLVER.BASE_LR = 0.00025  # pick a good LR
cfg.SOLVER.MAX_ITER = 1800    # 300 iterations seems good enough for the tutorial dataset; you will need to train longer for a practical dataset
cfg.SOLVER.STEPS = []        # do not decay learning rate
cfg.MODEL.ROI_HEADS.BATCH_SIZE_PER_IMAGE = 128   # faster, and good enough for this toy dataset (default: 512)
cfg.MODEL.ROI_HEADS.NUM_CLASSES = 1  # only has one class (ballon). (see https://detectron2.readthedocs.io/tutorials/datasets.html#update-the-config-for-new-datasets)
# # NOTE: this config means the number of classes, but a few popular unofficial tutorials incorrect uses num_classes+1 here.
#
os.makedirs(cfg.OUTPUT_DIR, exist_ok=True)

Here is an example of the json for a subset of my dataset:

{
    "info": {
        "year": 2022,
        "version": null,
        "description": "dataset created from yolo /content/drive/MyDrive/datasets/dataset_05_mini_gnejna",
        "contributor": "BIOBLU project, University of Malta",
        "date_created": "2022-04-29"
    },
    "images": [
        {
            "id": 0,
            "width": 1824,
            "height": 1825,
            "file_name": "/content/drive/MyDrive/datasets/dataset_05_mini_gnejna_detectron/test/Gnejna_DJI_0684_0-2.tif",
            "license": null,
            "flickr_url": null,
            "coco_url": null,
            "date_captured": null
        },
        {
            "id": 1,
            "width": 1825,
            "height": 1825,
            "file_name": "/content/drive/MyDrive/datasets/dataset_05_mini_gnejna_detectron/test/Gnejna_DJI_0687_0-0.tif",
            "license": null,
            "flickr_url": null,
            "coco_url": null,
            "date_captured": null
        },
        {
            "id": 2,
            "width": 1825,
            "height": 1825,
            "file_name": "/content/drive/MyDrive/datasets/dataset_05_mini_gnejna_detectron/test/Gnejna_DJI_0688_0-0.tif",
            "license": null,
            "flickr_url": null,
            "coco_url": null,
            "date_captured": null
        },
        {
            "id": 3,
            "width": 1824,
            "height": 1825,
            "file_name": "/content/drive/MyDrive/datasets/dataset_05_mini_gnejna_detectron/test/Gnejna_DJI_0691_0-2.tif",
            "license": null,
            "flickr_url": null,
            "coco_url": null,
            "date_captured": null
        },
        {
            "id": 4,
            "width": 1825,
            "height": 1825,
            "file_name": "/content/drive/MyDrive/datasets/dataset_05_mini_gnejna_detectron/test/Gnejna_DJI_0692_0-1.tif",
            "license": null,
            "flickr_url": null,
            "coco_url": null,
            "date_captured": null
        }
    ],
    "annotations": [
        {
            "id": 0,
            "image_id": 0,
            "category_id": 0,
            "segmentation": [],
            "area": null,
            "iscrowd": 0,
            "bbox": [
                157,
                960,
                71,
                109
            ],
            "bbox_mode": 1
        },
        {
            "id": 1,
            "image_id": 0,
            "category_id": 0,
            "segmentation": [],
            "area": null,
            "iscrowd": 0,
            "bbox": [
                428,
                789,
                69,
                73
            ],
            "bbox_mode": 1
        },
        {
            "id": 2,
            "image_id": 3,
            "category_id": 0,
            "segmentation": [],
            "area": null,
            "iscrowd": 0,
            "bbox": [
                177,
                227,
                33,
                17
            ],
            "bbox_mode": 1
        },
        {
            "id": 3,
            "image_id": 3,
            "category_id": 0,
            "segmentation": [],
            "area": null,
            "iscrowd": 0,
            "bbox": [
                659,
                520,
                51,
                64
            ],
            "bbox_mode": 1
        },
        {
            "id": 4,
            "image_id": 4,
            "category_id": 0,
            "segmentation": [],
            "area": null,
            "iscrowd": 0,
            "bbox": [
                992,
                520,
                29,
                19
            ],
            "bbox_mode": 1
        },
        {
            "id": 5,
            "image_id": 4,
            "category_id": 0,
            "segmentation": [],
            "area": null,
            "iscrowd": 0,
            "bbox": [
                613,
                1719,
                11,
                9
            ],
            "bbox_mode": 1
        },
        {
            "id": 6,
            "image_id": 4,
            "category_id": 0,
            "segmentation": [],
            "area": null,
            "iscrowd": 0,
            "bbox": [
                1482,
                825,
                55,
                80
            ],
            "bbox_mode": 1
        }
    ],
    "categories": [
        {
            "id": 0,
            "name": "trash",
            "supercategory": "trash"
        }
    ],
    "licences": []
}

And here are the contents of the cfg:

CUDNN_BENCHMARK: false
DATALOADER:
  ASPECT_RATIO_GROUPING: true
  FILTER_EMPTY_ANNOTATIONS: true
  NUM_WORKERS: 2
  REPEAT_THRESHOLD: 0.0
  SAMPLER_TRAIN: TrainingSampler
DATASETS:
  PRECOMPUTED_PROPOSAL_TOPK_TEST: 1000
  PRECOMPUTED_PROPOSAL_TOPK_TRAIN: 2000
  PROPOSAL_FILES_TEST: []
  PROPOSAL_FILES_TRAIN: []
  TEST:
  - coco_2017_val
  TRAIN:
  - coco_2017_train
GLOBAL:
  HACK: 1.0
INPUT:
  CROP:
    ENABLED: false
    SIZE:
    - 0.9
    - 0.9
    TYPE: relative_range
  FORMAT: BGR
  MASK_FORMAT: polygon
  MAX_SIZE_TEST: 1333
  MAX_SIZE_TRAIN: 1333
  MIN_SIZE_TEST: 800
  MIN_SIZE_TRAIN:
  - 640
  - 672
  - 704
  - 736
  - 768
  - 800
  MIN_SIZE_TRAIN_SAMPLING: choice
  RANDOM_FLIP: horizontal
MODEL:
  ANCHOR_GENERATOR:
    ANGLES:
    - - -90
      - 0
      - 90
    ASPECT_RATIOS:
    - - 0.5
      - 1.0
      - 2.0
    NAME: DefaultAnchorGenerator
    OFFSET: 0.0
    SIZES:
    - - 32
      - 64
      - 128
      - 256
      - 512
  BACKBONE:
    FREEZE_AT: 2
    NAME: build_resnet_backbone
  DEVICE: cuda
  FPN:
    FUSE_TYPE: sum
    IN_FEATURES: []
    NORM: ''
    OUT_CHANNELS: 256
  KEYPOINT_ON: false
  LOAD_PROPOSALS: false
  MASK_ON: false
  META_ARCHITECTURE: GeneralizedRCNN
  PANOPTIC_FPN:
    COMBINE:
      ENABLED: true
      INSTANCES_CONFIDENCE_THRESH: 0.5
      OVERLAP_THRESH: 0.5
      STUFF_AREA_LIMIT: 4096
    INSTANCE_LOSS_WEIGHT: 1.0
  PIXEL_MEAN:
  - 103.53
  - 116.28
  - 123.675
  PIXEL_STD:
  - 1.0
  - 1.0
  - 1.0
  PROPOSAL_GENERATOR:
    MIN_SIZE: 0
    NAME: RPN
  RESNETS:
    DEFORM_MODULATED: false
    DEFORM_NUM_GROUPS: 1
    DEFORM_ON_PER_STAGE:
    - false
    - false
    - false
    - false
    DEPTH: 50
    NORM: FrozenBN
    NUM_GROUPS: 1
    OUT_FEATURES:
    - res4
    RES2_OUT_CHANNELS: 256
    RES5_DILATION: 1
    STEM_OUT_CHANNELS: 64
    STRIDE_IN_1X1: true
    WIDTH_PER_GROUP: 64
  RETINANET:
    BBOX_REG_LOSS_TYPE: smooth_l1
    BBOX_REG_WEIGHTS: &id001
    - 1.0
    - 1.0
    - 1.0
    - 1.0
    FOCAL_LOSS_ALPHA: 0.25
    FOCAL_LOSS_GAMMA: 2.0
    IN_FEATURES:
    - p3
    - p4
    - p5
    - p6
    - p7
    IOU_LABELS:
    - 0
    - -1
    - 1
    IOU_THRESHOLDS:
    - 0.4
    - 0.5
    NMS_THRESH_TEST: 0.5
    NORM: ''
    NUM_CLASSES: 80
    NUM_CONVS: 4
    PRIOR_PROB: 0.01
    SCORE_THRESH_TEST: 0.05
    SMOOTH_L1_LOSS_BETA: 0.1
    TOPK_CANDIDATES_TEST: 1000
  ROI_BOX_CASCADE_HEAD:
    BBOX_REG_WEIGHTS:
    - - 10.0
      - 10.0
      - 5.0
      - 5.0
    - - 20.0
      - 20.0
      - 10.0
      - 10.0
    - - 30.0
      - 30.0
      - 15.0
      - 15.0
    IOUS:
    - 0.5
    - 0.6
    - 0.7
  ROI_BOX_HEAD:
    BBOX_REG_LOSS_TYPE: smooth_l1
    BBOX_REG_LOSS_WEIGHT: 1.0
    BBOX_REG_WEIGHTS:
    - 10.0
    - 10.0
    - 5.0
    - 5.0
    CLS_AGNOSTIC_BBOX_REG: false
    CONV_DIM: 256
    FC_DIM: 1024
    FED_LOSS_FREQ_WEIGHT_POWER: 0.5
    FED_LOSS_NUM_CLASSES: 50
    NAME: ''
    NORM: ''
    NUM_CONV: 0
    NUM_FC: 0
    POOLER_RESOLUTION: 14
    POOLER_SAMPLING_RATIO: 0
    POOLER_TYPE: ROIAlignV2
    SMOOTH_L1_BETA: 0.0
    TRAIN_ON_PRED_BOXES: false
    USE_FED_LOSS: false
    USE_SIGMOID_CE: false
  ROI_HEADS:
    BATCH_SIZE_PER_IMAGE: 128
    IN_FEATURES:
    - res4
    IOU_LABELS:
    - 0
    - 1
    IOU_THRESHOLDS:
    - 0.5
    NAME: Res5ROIHeads
    NMS_THRESH_TEST: 0.5
    NUM_CLASSES: 1
    POSITIVE_FRACTION: 0.25
    PROPOSAL_APPEND_GT: true
    SCORE_THRESH_TEST: 0.05
  ROI_KEYPOINT_HEAD:
    CONV_DIMS:
    - 512
    - 512
    - 512
    - 512
    - 512
    - 512
    - 512
    - 512
    LOSS_WEIGHT: 1.0
    MIN_KEYPOINTS_PER_IMAGE: 1
    NAME: KRCNNConvDeconvUpsampleHead
    NORMALIZE_LOSS_BY_VISIBLE_KEYPOINTS: true
    NUM_KEYPOINTS: 17
    POOLER_RESOLUTION: 14
    POOLER_SAMPLING_RATIO: 0
    POOLER_TYPE: ROIAlignV2
  ROI_MASK_HEAD:
    CLS_AGNOSTIC_MASK: false
    CONV_DIM: 256
    NAME: MaskRCNNConvUpsampleHead
    NORM: ''
    NUM_CONV: 0
    POOLER_RESOLUTION: 14
    POOLER_SAMPLING_RATIO: 0
    POOLER_TYPE: ROIAlignV2
  RPN:
    BATCH_SIZE_PER_IMAGE: 256
    BBOX_REG_LOSS_TYPE: smooth_l1
    BBOX_REG_LOSS_WEIGHT: 1.0
    BBOX_REG_WEIGHTS: *id001
    BOUNDARY_THRESH: -1
    CONV_DIMS:
    - -1
    HEAD_NAME: StandardRPNHead
    IN_FEATURES:
    - res4
    IOU_LABELS:
    - 0
    - -1
    - 1
    IOU_THRESHOLDS:
    - 0.3
    - 0.7
    LOSS_WEIGHT: 1.0
    NMS_THRESH: 0.7
    POSITIVE_FRACTION: 0.5
    POST_NMS_TOPK_TEST: 1000
    POST_NMS_TOPK_TRAIN: 2000
    PRE_NMS_TOPK_TEST: 6000
    PRE_NMS_TOPK_TRAIN: 12000
    SMOOTH_L1_BETA: 0.0
  SEM_SEG_HEAD:
    COMMON_STRIDE: 4
    CONVS_DIM: 128
    IGNORE_VALUE: 255
    IN_FEATURES:
    - p2
    - p3
    - p4
    - p5
    LOSS_WEIGHT: 1.0
    NAME: SemSegFPNHead
    NORM: GN
    NUM_CLASSES: 54
  WEIGHTS: https://dl.fbaipublicfiles.com/detectron2/COCO-Detection/faster_rcnn_R_50_C4_1x/137257644/model_final_721ade.pkl
OUTPUT_DIR: ./output
SEED: -1
SOLVER:
  AMP:
    ENABLED: false
  BASE_LR: 0.00025
  BASE_LR_END: 0.0
  BIAS_LR_FACTOR: 1.0
  CHECKPOINT_PERIOD: 5000
  CLIP_GRADIENTS:
    CLIP_TYPE: value
    CLIP_VALUE: 1.0
    ENABLED: false
    NORM_TYPE: 2.0
  GAMMA: 0.1
  IMS_PER_BATCH: 2
  LR_SCHEDULER_NAME: WarmupMultiStepLR
  MAX_ITER: 1800
  MOMENTUM: 0.9
  NESTEROV: false
  REFERENCE_WORLD_SIZE: 0
  STEPS: []
  WARMUP_FACTOR: 0.001
  WARMUP_ITERS: 1000
  WARMUP_METHOD: linear
  WEIGHT_DECAY: 0.0001
  WEIGHT_DECAY_BIAS: null
  WEIGHT_DECAY_NORM: 0.0
TEST:
  AUG:
    ENABLED: false
    FLIP: true
    MAX_SIZE: 4000
    MIN_SIZES:
    - 400
    - 500
    - 600
    - 700
    - 800
    - 900
    - 1000
    - 1100
    - 1200
  DETECTIONS_PER_IMAGE: 100
  EVAL_PERIOD: 0
  EXPECTED_RESULTS: []
  KEYPOINT_OKS_SIGMAS: []
  PRECISE_BN:
    ENABLED: false
    NUM_ITER: 200
VERSION: 2
VIS_PERIOD: 0

Full error:

---------------------------------------------------------------------------

FileNotFoundError                         Traceback (most recent call last)

[<ipython-input-10-6369bea6f979>](https://localhost:8080/#) in <module>()
----> 1 trainer = DefaultTrainer(cfg)
      2 trainer.resume_or_load(resume=False)
      3 trainer.train()

10 frames

[/usr/local/lib/python3.7/dist-packages/detectron2/engine/defaults.py](https://localhost:8080/#) in __init__(self, cfg)
    376         model = self.build_model(cfg)
    377         optimizer = self.build_optimizer(cfg, model)
--> 378         data_loader = self.build_train_loader(cfg)
    379 
    380         model = create_ddp_model(model, broadcast_buffers=False)

[/usr/local/lib/python3.7/dist-packages/detectron2/engine/defaults.py](https://localhost:8080/#) in build_train_loader(cls, cfg)
    545         Overwrite it if you'd like a different data loader.
    546         """
--> 547         return build_detection_train_loader(cfg)
    548 
    549     @classmethod

[/usr/local/lib/python3.7/dist-packages/detectron2/config/config.py](https://localhost:8080/#) in wrapped(*args, **kwargs)
    205             def wrapped(*args, **kwargs):
    206                 if _called_with_cfg(*args, **kwargs):
--> 207                     explicit_args = _get_args_from_config(from_config, *args, **kwargs)
    208                     return orig_func(**explicit_args)
    209                 else:

[/usr/local/lib/python3.7/dist-packages/detectron2/config/config.py](https://localhost:8080/#) in _get_args_from_config(from_config_func, *args, **kwargs)
    243             if name not in supported_arg_names:
    244                 extra_kwargs[name] = kwargs.pop(name)
--> 245         ret = from_config_func(*args, **kwargs)
    246         # forward the other arguments to __init__
    247         ret.update(extra_kwargs)

[/usr/local/lib/python3.7/dist-packages/detectron2/data/build.py](https://localhost:8080/#) in _train_loader_from_config(cfg, mapper, dataset, sampler)
    342             if cfg.MODEL.KEYPOINT_ON
    343             else 0,
--> 344             proposal_files=cfg.DATASETS.PROPOSAL_FILES_TRAIN if cfg.MODEL.LOAD_PROPOSALS else None,
    345         )
    346         _log_api_usage("dataset." + cfg.DATASETS.TRAIN[0])

[/usr/local/lib/python3.7/dist-packages/detectron2/data/build.py](https://localhost:8080/#) in get_detection_dataset_dicts(names, filter_empty, min_keypoints, proposal_files, check_consistency)
    239         names = [names]
    240     assert len(names), names
--> 241     dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in names]
    242     for dataset_name, dicts in zip(names, dataset_dicts):
    243         assert len(dicts), "Dataset '{}' is empty!".format(dataset_name)

[/usr/local/lib/python3.7/dist-packages/detectron2/data/build.py](https://localhost:8080/#) in <listcomp>(.0)
    239         names = [names]
    240     assert len(names), names
--> 241     dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in names]
    242     for dataset_name, dicts in zip(names, dataset_dicts):
    243         assert len(dicts), "Dataset '{}' is empty!".format(dataset_name)

[/usr/local/lib/python3.7/dist-packages/detectron2/data/catalog.py](https://localhost:8080/#) in get(self, name)
     56                 )
     57             ) from e
---> 58         return f()
     59 
     60     def list(self) -> List[str]:

[/usr/local/lib/python3.7/dist-packages/detectron2/data/datasets/coco.py](https://localhost:8080/#) in <lambda>()
    498     assert isinstance(image_root, (str, os.PathLike)), image_root
    499     # 1. register a function which returns dicts
--> 500     DatasetCatalog.register(name, lambda: load_coco_json(json_file, image_root, name))
    501 
    502     # 2. Optionally, add metadata about this dataset,

[/usr/local/lib/python3.7/dist-packages/detectron2/data/datasets/coco.py](https://localhost:8080/#) in load_coco_json(json_file, image_root, dataset_name, extra_annotation_keys)
     67     json_file = PathManager.get_local_path(json_file)
     68     with contextlib.redirect_stdout(io.StringIO()):
---> 69         coco_api = COCO(json_file)
     70     if timer.seconds() > 1:
     71         logger.info("Loading {} takes {:.2f} seconds.".format(json_file, timer.seconds()))

[/usr/local/lib/python3.7/dist-packages/pycocotools/coco.py](https://localhost:8080/#) in __init__(self, annotation_file)
     79             print('loading annotations into memory...')
     80             tic = time.time()
---> 81             with open(annotation_file, 'r') as f:
     82                 dataset = json.load(f)
     83             assert type(dataset)==dict, 'annotation file format {} not supported'.format(type(dataset))

FileNotFoundError: [Errno 2] No such file or directory: 'datasets/coco/annotations/instances_train2017.json'

Expected behavior:

Start training on my custom dataset instead of looking for coco2017.

Environment:

2022-04-29 12:41:31 URL:https://raw.githubusercontent.com/facebookresearch/detectron2/main/detectron2/utils/collect_env.py [8391/8391] -> "collect_env.py" [1]
----------------------  ----------------------------------------------------------------
sys.platform            linux
Python                  3.7.13 (default, Apr 24 2022, 01:04:09) [GCC 7.5.0]
numpy                   1.21.6
detectron2              0.6 @/usr/local/lib/python3.7/dist-packages/detectron2
Compiler                GCC 7.5
CUDA compiler           CUDA 11.1
detectron2 arch flags   3.7
DETECTRON2_ENV_MODULE   <not set>
PyTorch                 1.11.0+cu113 @/usr/local/lib/python3.7/dist-packages/torch
PyTorch debug build     False
GPU available           Yes
GPU 0                   Tesla K80 (arch=3.7)
Driver version          460.32.03
CUDA_HOME               /usr/local/cuda
Pillow                  7.1.2
torchvision             0.12.0+cu113 @/usr/local/lib/python3.7/dist-packages/torchvision
torchvision arch flags  3.5, 5.0, 6.0, 7.0, 7.5, 8.0, 8.6
fvcore                  0.1.5.post20220414
iopath                  0.1.9
cv2                     4.1.2
----------------------  ----------------------------------------------------------------
PyTorch built with:
  - GCC 7.3
  - C++ Version: 201402
  - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v2.5.2 (Git Hash a9302535553c73243c632ad3c4c80beec3d19a1e)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - LAPACK is enabled (usually provided by MKL)
  - NNPACK is enabled
  - CPU capability usage: AVX2
  - CUDA Runtime 11.3
  - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86
  - CuDNN 8.2
  - Magma 2.5.2
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.3, CUDNN_VERSION=8.2.0, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.11.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=OFF, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, 
github-actions[bot] commented 2 years ago

You've chosen to report an unexpected problem or bug. Unless you already know the root cause of it, please include details about it by filling the issue template. The following information is missing: "Instructions To Reproduce the Issue and Full Logs";

ppwwyyxx commented 2 years ago
cfg.merge_from_file(model_zoo.get_config_file("COCO-Detection/faster_rcnn_R_50_C4_1x.yaml"))

this line should happen before

cfg.DATASETS.TRAIN = ("train",)
cfg.DATASETS.TEST = ()

Otherwise your datasets config are overwritten.