Closed anirbankonar123 closed 2 years ago
No runnable code is given so we cannot investigate the issue further. Please check existing issues for solutions: https://github.com/facebookresearch/detectron2/issues?q=Results+do+not+correspond+to+current+coco+set
if hasattr(_metadata, "json_file"): del _metadata.json_file
This will not remove the cache file and the cache file may still be used. As https://github.com/facebookresearch/detectron2/issues/1631 mentioned there will be a warning whenever cache file is used.
If you do not know the root cause of the problem, please post according to this template:
Instructions To Reproduce the Issue:
Check https://stackoverflow.com/help/minimal-reproducible-example for how to ask good questions. Simplify the steps to reproduce the issue using suggestions from the above link, and provide them below:
@classmethod def build_test_loader( cls, cfg: CfgNode, dataset_name: str, augmentations: Optional[List[Augmentation]] = None ) -> DataLoader: # type: ignore """ Create a test data loader.
data_analysis.py:
def computekpis(cfg: CfgNode) -> DatasetEvaluatorResults: """Compute the KPIs for a given model and config.""" cfg = cfg.clone() # cfg can be modified by model model = CFUTrainer.buildmodel(cfg)
2021-08-18 03:10:48 gpu-003 fvcore.common.checkpoint[26853] INFO [Checkpointer] Loading from ../models/02a08239-8220-48d0-85f2-c0c0425b4224/model_final.pth ... [08/18 03:10:48 d2.data.dataset_mapper]: [DatasetMapper] Augmentations used in inference: [RandomRotation(angle=[0.0, 360.0], interp=2)] [08/18 03:10:48 d2.data.datasets.coco]: Loaded 2 images in COCO format from /home/..../cfu_test/test.json [08/18 03:10:48 d2.data.common]: Serializing 2 elements to byte tensors and concatenating them all ... [08/18 03:10:48 d2.data.common]: Serialized dataset takes 0.00 MiB 2021-08-18 03:10:48 gpu-003 vxgioq_cfu_counting_ml.training.trainer[26853] INFO Overwriting existing: ../models/02a08239-8220-48d0-85f2-c0c0425b4224/inference. 2021-08-18 03:10:48 gpu-003 vxgioq_cfu_counting_ml.utils.conf[26853] INFO Deleting: ../models/02a08239-8220-48d0-85f2-c0c0425b4224/inference if exists... WARNING [08/18 03:10:48 d2.evaluation.coco_evaluation]: COCO Evaluator instantiated using config, this is deprecated behavior. Please pass in explicit arguments instead. [08/18 03:10:48 d2.evaluation.coco_evaluation]: 'coco_test' is not registered by
register_coco_instances
. Therefore trying to convert it to COCO format ... [08/18 03:10:48 d2.data.datasets.coco]: Converting annotations of dataset 'coco_test' to COCO format ...) [08/18 03:10:48 d2.data.datasets.coco]: Loaded 2 images in COCO format from /home/..../cfu_test/test.json [08/18 03:10:48 d2.data.datasets.coco]: Converting dataset dicts into COCO format [08/18 03:10:48 d2.data.datasets.coco]: Conversion finished, #images: 2, #annotations: 4 [08/18 03:10:48 d2.data.datasets.coco]: Caching COCO format annotations at '../models/02a08239-8220-48d0-85f2-c0c0425b4224/inference/coco_test_coco_format.json' ... [08/18 03:10:48 d2.evaluation.evaluator]: Start inference on 2 batches [08/18 03:10:49 d2.evaluation.evaluator]: Total inference time: 0:00:00.304959 (0.304959 s / iter per device, on 1 devices) [08/18 03:10:49 d2.evaluation.evaluator]: Total inference pure compute time: 0:00:00 (0.226768 s / iter per device, on 1 devices) [08/18 03:10:49 d2.evaluation.coco_evaluation]: Preparing results for COCO format ... [08/18 03:10:49 d2.evaluation.coco_evaluation]: Saving results to ../models/02a08239-8220-48d0-85f2-c0c0425b4224/inference/coco_instances_results.json [08/18 03:10:49 d2.evaluation.coco_evaluation]: Evaluating predictions with unofficial COCO API... Loading and preparing results...AssertionError Traceback (most recent call last)