Closed 2000YWQ closed 1 month ago
You can share your problems about converting format to coco and I am willing to help you. As for the codes, there are many resources available online to help you to address your problems.
The format of the processed data is the same for the coco dataset and the pascal_voc dataset in detectron2/data/datasets/coco.py and /detectron2/data/datasets/pascal_voc.py,so I've created a soft connection to VOC2007.my yaml is:
DATASETS: TRAIN: ("voc_2007_train",) TEST: ("voc_2007_val",)
and I've modified detectron2/data/datasets/pascal_voc.py:
CLASS_NAMES = ( "A220", "A320/321", "A330", "ARJ21", "Boeing737", "Boeing787", "other" )
Finally It automatically generates the voc_2007_val_coco_format.json file.
But my result is bad
there is my log: `[04/10 06:18:32] detectron2 INFO: Full config saved to ./output/config.yaml [04/10 06:18:36] d2.checkpoint.detection_checkpoint INFO: [DetectionCheckpointer] Loading from detectron2://ImageNetPretrained/torchvision/R-50.pkl ... [04/10 06:18:36] fvcore.common.checkpoint INFO: [Checkpointer] Loading from /root/.torch/iopath_cache/detectron2/ImageNetPretrained/torchvision/R-50.pkl ... [04/10 06:18:36] fvcore.common.checkpoint INFO: Reading a file from 'torchvision' [04/10 06:18:36] d2.checkpoint.c2_model_loading INFO: Following weights matched with submodule backbone.bottom_up - Total num: 53 [04/10 06:18:36] fvcore.common.checkpoint WARNING: Some model parameters or buffers are not found in the checkpoint: [34malphas_cumprod[0m [34malphas_cumprod_prev[0m [34mbackbone.fpn_lateral2.{bias, weight}[0m [34mbackbone.fpn_lateral3.{bias, weight}[0m [34mbackbone.fpn_lateral4.{bias, weight}[0m [34mbackbone.fpn_lateral5.{bias, weight}[0m [34mbackbone.fpn_output2.{bias, weight}[0m [34mbackbone.fpn_output3.{bias, weight}[0m [34mbackbone.fpn_output4.{bias, weight}[0m [34mbackbone.fpn_output5.{bias, weight}[0m [34mbetas[0m [34mdiff_conv5.weight[0m [34mhead.head_series.0.bboxes_delta.{bias, weight}[0m [34mhead.head_series.0.block_time_mlp.1.{bias, weight}[0m [34mhead.head_series.0.class_logits.{bias, weight}[0m [34mhead.head_series.0.cls_module.0.weight[0m [34mhead.head_series.0.cls_module.1.{bias, weight}[0m [34mhead.head_series.0.inst_interact.dynamic_layer.{bias, weight}[0m [34mhead.head_series.0.inst_interact.norm1.{bias, weight}[0m [34mhead.head_series.0.inst_interact.norm2.{bias, weight}[0m [34mhead.head_series.0.inst_interact.norm3.{bias, weight}[0m [34mhead.head_series.0.inst_interact.out_layer.{bias, weight}[0m [34mhead.head_series.0.linear1.{bias, weight}[0m [34mhead.head_series.0.linear2.{bias, weight}[0m [34mhead.head_series.0.norm1.{bias, weight}[0m [34mhead.head_series.0.norm2.{bias, weight}[0m [34mhead.head_series.0.norm3.{bias, weight}[0m [34mhead.head_series.0.reg_module.0.weight[0m [34mhead.head_series.0.reg_module.1.{bias, weight}[0m [34mhead.head_series.0.reg_module.3.weight[0m [34mhead.head_series.0.reg_module.4.{bias, weight}[0m [34mhead.head_series.0.reg_module.6.weight[0m [34mhead.head_series.0.reg_module.7.{bias, weight}[0m [34mhead.head_series.0.self_attn.out_proj.{bias, weight}[0m [34mhead.head_series.0.self_attn.{in_proj_bias, in_proj_weight}[0m [34mhead.head_series.1.bboxes_delta.{bias, weight}[0m [34mhead.head_series.1.block_time_mlp.1.{bias, weight}[0m [34mhead.head_series.1.class_logits.{bias, weight}[0m [34mhead.head_series.1.cls_module.0.weight[0m [34mhead.head_series.1.cls_module.1.{bias, weight}[0m [34mhead.head_series.1.inst_interact.dynamic_layer.{bias, weight}[0m [34mhead.head_series.1.inst_interact.norm1.{bias, weight}[0m [34mhead.head_series.1.inst_interact.norm2.{bias, weight}[0m [34mhead.head_series.1.inst_interact.norm3.{bias, weight}[0m [34mhead.head_series.1.inst_interact.out_layer.{bias, weight}[0m [34mhead.head_series.1.linear1.{bias, weight}[0m [34mhead.head_series.1.linear2.{bias, weight}[0m [34mhead.head_series.1.norm1.{bias, weight}[0m [34mhead.head_series.1.norm2.{bias, weight}[0m [34mhead.head_series.1.norm3.{bias, weight}[0m [34mhead.head_series.1.reg_module.0.weight[0m [34mhead.head_series.1.reg_module.1.{bias, weight}[0m [34mhead.head_series.1.reg_module.3.weight[0m [34mhead.head_series.1.reg_module.4.{bias, weight}[0m [34mhead.head_series.1.reg_module.6.weight[0m [34mhead.head_series.1.reg_module.7.{bias, weight}[0m [34mhead.head_series.1.self_attn.out_proj.{bias, weight}[0m [34mhead.head_series.1.self_attn.{in_proj_bias, in_proj_weight}[0m [34mhead.head_series.2.bboxes_delta.{bias, weight}[0m [34mhead.head_series.2.block_time_mlp.1.{bias, weight}[0m [34mhead.head_series.2.class_logits.{bias, weight}[0m [34mhead.head_series.2.cls_module.0.weight[0m [34mhead.head_series.2.cls_module.1.{bias, weight}[0m [34mhead.head_series.2.inst_interact.dynamic_layer.{bias, weight}[0m [34mhead.head_series.2.inst_interact.norm1.{bias, weight}[0m [34mhead.head_series.2.inst_interact.norm2.{bias, weight}[0m [34mhead.head_series.2.inst_interact.norm3.{bias, weight}[0m [34mhead.head_series.2.inst_interact.out_layer.{bias, weight}[0m [34mhead.head_series.2.linear1.{bias, weight}[0m [34mhead.head_series.2.linear2.{bias, weight}[0m [34mhead.head_series.2.norm1.{bias, weight}[0m [34mhead.head_series.2.norm2.{bias, weight}[0m [34mhead.head_series.2.norm3.{bias, weight}[0m [34mhead.head_series.2.reg_module.0.weight[0m [34mhead.head_series.2.reg_module.1.{bias, weight}[0m [34mhead.head_series.2.reg_module.3.weight[0m [34mhead.head_series.2.reg_module.4.{bias, weight}[0m [34mhead.head_series.2.reg_module.6.weight[0m [34mhead.head_series.2.reg_module.7.{bias, weight}[0m [34mhead.head_series.2.self_attn.out_proj.{bias, weight}[0m [34mhead.head_series.2.self_attn.{in_proj_bias, in_proj_weight}[0m [34mhead.head_series.3.bboxes_delta.{bias, weight}[0m [34mhead.head_series.3.block_time_mlp.1.{bias, weight}[0m [34mhead.head_series.3.class_logits.{bias, weight}[0m [34mhead.head_series.3.cls_module.0.weight[0m [34mhead.head_series.3.cls_module.1.{bias, weight}[0m [34mhead.head_series.3.inst_interact.dynamic_layer.{bias, weight}[0m [34mhead.head_series.3.inst_interact.norm1.{bias, weight}[0m [34mhead.head_series.3.inst_interact.norm2.{bias, weight}[0m [34mhead.head_series.3.inst_interact.norm3.{bias, weight}[0m [34mhead.head_series.3.inst_interact.out_layer.{bias, weight}[0m [34mhead.head_series.3.linear1.{bias, weight}[0m [34mhead.head_series.3.linear2.{bias, weight}[0m [34mhead.head_series.3.norm1.{bias, weight}[0m [34mhead.head_series.3.norm2.{bias, weight}[0m [34mhead.head_series.3.norm3.{bias, weight}[0m [34mhead.head_series.3.reg_module.0.weight[0m [34mhead.head_series.3.reg_module.1.{bias, weight}[0m [34mhead.head_series.3.reg_module.3.weight[0m [34mhead.head_series.3.reg_module.4.{bias, weight}[0m [34mhead.head_series.3.reg_module.6.weight[0m [34mhead.head_series.3.reg_module.7.{bias, weight}[0m [34mhead.head_series.3.self_attn.out_proj.{bias, weight}[0m [34mhead.head_series.3.self_attn.{in_proj_bias, in_proj_weight}[0m [34mhead.head_series.4.bboxes_delta.{bias, weight}[0m [34mhead.head_series.4.block_time_mlp.1.{bias, weight}[0m [34mhead.head_series.4.class_logits.{bias, weight}[0m [34mhead.head_series.4.cls_module.0.weight[0m [34mhead.head_series.4.cls_module.1.{bias, weight}[0m [34mhead.head_series.4.inst_interact.dynamic_layer.{bias, weight}[0m [34mhead.head_series.4.inst_interact.norm1.{bias, weight}[0m [34mhead.head_series.4.inst_interact.norm2.{bias, weight}[0m [34mhead.head_series.4.inst_interact.norm3.{bias, weight}[0m [34mhead.head_series.4.inst_interact.out_layer.{bias, weight}[0m [34mhead.head_series.4.linear1.{bias, weight}[0m [34mhead.head_series.4.linear2.{bias, weight}[0m [34mhead.head_series.4.norm1.{bias, weight}[0m [34mhead.head_series.4.norm2.{bias, weight}[0m [34mhead.head_series.4.norm3.{bias, weight}[0m [34mhead.head_series.4.reg_module.0.weight[0m [34mhead.head_series.4.reg_module.1.{bias, weight}[0m [34mhead.head_series.4.reg_module.3.weight[0m [34mhead.head_series.4.reg_module.4.{bias, weight}[0m [34mhead.head_series.4.reg_module.6.weight[0m [34mhead.head_series.4.reg_module.7.{bias, weight}[0m [34mhead.head_series.4.self_attn.out_proj.{bias, weight}[0m [34mhead.head_series.4.self_attn.{in_proj_bias, in_proj_weight}[0m [34mhead.head_series.5.bboxes_delta.{bias, weight}[0m [34mhead.head_series.5.block_time_mlp.1.{bias, weight}[0m [34mhead.head_series.5.class_logits.{bias, weight}[0m [34mhead.head_series.5.cls_module.0.weight[0m [34mhead.head_series.5.cls_module.1.{bias, weight}[0m [34mhead.head_series.5.inst_interact.dynamic_layer.{bias, weight}[0m [34mhead.head_series.5.inst_interact.norm1.{bias, weight}[0m [34mhead.head_series.5.inst_interact.norm2.{bias, weight}[0m [34mhead.head_series.5.inst_interact.norm3.{bias, weight}[0m [34mhead.head_series.5.inst_interact.out_layer.{bias, weight}[0m [34mhead.head_series.5.linear1.{bias, weight}[0m [34mhead.head_series.5.linear2.{bias, weight}[0m [34mhead.head_series.5.norm1.{bias, weight}[0m [34mhead.head_series.5.norm2.{bias, weight}[0m [34mhead.head_series.5.norm3.{bias, weight}[0m [34mhead.head_series.5.reg_module.0.weight[0m [34mhead.head_series.5.reg_module.1.{bias, weight}[0m [34mhead.head_series.5.reg_module.3.weight[0m [34mhead.head_series.5.reg_module.4.{bias, weight}[0m [34mhead.head_series.5.reg_module.6.weight[0m [34mhead.head_series.5.reg_module.7.{bias, weight}[0m [34mhead.head_series.5.self_attn.out_proj.{bias, weight}[0m [34mhead.head_series.5.self_attn.{in_proj_bias, in_proj_weight}[0m [34mhead.time_mlp.1.{bias, weight}[0m [34mhead.time_mlp.3.{bias, weight}[0m [34mlog_one_minus_alphas_cumprod[0m [34mposterior_log_variance_clipped[0m [34mposterior_mean_coef1[0m [34mposterior_mean_coef2[0m [34mposterior_variance[0m [34msqrt_alphas_cumprod[0m [34msqrt_one_minus_alphas_cumprod[0m [34msqrt_recip_alphas_cumprod[0m [34msqrt_recipm1_alphas_cumprod[0m [04/10 06:18:36] fvcore.common.checkpoint WARNING: The checkpoint state_dict contains keys that are not used by the model: [35mstem.fc.{bias, weight}[0m [04/10 06:18:36] d2.data.build INFO: Distribution of instances among all 7 categories: [36m | category | #instances | category | #instances | category | #instances |
---|---|---|---|---|---|---|
A220 | 247 | A320/321 | 82 | A330 | 27 | |
ARJ21 | 378 | Boeing737 | 252 | Boeing787 | 261 | |
other | 715 | |||||
total | 1962 | [0m |
[04/10 06:18:36] d2.data.dataset_mapper INFO: [DatasetMapper] Augmentations used in inference: [ResizeShortestEdge(short_edge_length=(800, 800), max_size=1800, sample_style='choice')] [04/10 06:18:36] d2.data.common INFO: Serializing the dataset using: <class 'detectron2.data.common._TorchSerializedList'> [04/10 06:18:36] d2.data.common INFO: Serializing 442 elements to byte tensors and concatenating them all ... [04/10 06:18:36] d2.data.common INFO: Serialized dataset takes 0.23 MiB [04/10 06:18:36] d2.evaluation.coco_evaluation INFO: Fast COCO eval is not built. Falling back to official COCO eval. [04/10 06:18:36] d2.evaluation.coco_evaluation WARNING: COCO Evaluator instantiated using config, this is deprecated behavior. Please pass in explicit arguments instead. [04/10 06:18:36] d2.evaluation.coco_evaluation INFO: Trying to convert 'voc_2007_val' to COCO format ... [04/10 06:18:36] d2.data.datasets.coco WARNING: Using previously cached COCO format annotations at './output/inference/voc_2007_val_coco_format.json'. You need to clear the cache file if your dataset has been modified. [04/10 06:18:36] d2.evaluation.evaluator INFO: Start inference on 442 batches [04/10 06:18:37] d2.evaluation.evaluator INFO: Inference done 11/442. Dataloading: 0.0007 s/iter. Inference: 0.0795 s/iter. Eval: 0.0003 s/iter. Total: 0.0805 s/iter. ETA=0:00:34 [04/10 06:18:42] d2.evaluation.evaluator INFO: Inference done 73/442. Dataloading: 0.0011 s/iter. Inference: 0.0792 s/iter. Eval: 0.0003 s/iter. Total: 0.0807 s/iter. ETA=0:00:29 [04/10 06:18:47] d2.evaluation.evaluator INFO: Inference done 133/442. Dataloading: 0.0011 s/iter. Inference: 0.0804 s/iter. Eval: 0.0003 s/iter. Total: 0.0820 s/iter. ETA=0:00:25 [04/10 06:18:53] d2.evaluation.evaluator INFO: Inference done 196/442. Dataloading: 0.0012 s/iter. Inference: 0.0799 s/iter. Eval: 0.0003 s/iter. Total: 0.0815 s/iter. ETA=0:00:20 [04/10 06:18:58] d2.evaluation.evaluator INFO: Inference done 258/442. Dataloading: 0.0012 s/iter. Inference: 0.0798 s/iter. Eval: 0.0003 s/iter. Total: 0.0814 s/iter. ETA=0:00:14 [04/10 06:19:03] d2.evaluation.evaluator INFO: Inference done 321/442. Dataloading: 0.0012 s/iter. Inference: 0.0796 s/iter. Eval: 0.0003 s/iter. Total: 0.0812 s/iter. ETA=0:00:09 [04/10 06:19:08] d2.evaluation.evaluator INFO: Inference done 384/442. Dataloading: 0.0012 s/iter. Inference: 0.0795 s/iter. Eval: 0.0003 s/iter. Total: 0.0811 s/iter. ETA=0:00:04 [04/10 06:19:12] d2.evaluation.evaluator INFO: Total inference time: 0:00:35.438219 (0.081094 s / iter per device, on 1 devices) [04/10 06:19:12] d2.evaluation.evaluator INFO: Total inference pure compute time: 0:00:34 (0.079390 s / iter per device, on 1 devices) [04/10 06:19:13] d2.evaluation.coco_evaluation INFO: Preparing results for COCO format ... [04/10 06:19:13] d2.evaluation.coco_evaluation INFO: Saving results to ./output/inference/coco_eval_instances_results.json [04/10 06:19:13] d2.evaluation.coco_evaluation INFO: Evaluating predictions with official COCO API... [04/10 06:19:17] d2.evaluation.coco_evaluation INFO: Evaluation results for bbox: | AP | AP50 | AP75 | APs | APm | APl |
---|---|---|---|---|---|---|
0.000 | 0.000 | 0.000 | nan | 0.000 | 0.000 |
[04/10 06:19:17] d2.evaluation.coco_evaluation INFO: Some metrics cannot be computed and is shown as NaN. [04/10 06:19:17] d2.evaluation.coco_evaluation INFO: Per-category bbox AP: | category | AP | category | AP | category | AP |
---|---|---|---|---|---|---|
A220 | 0.000 | A320/321 | 0.000 | A330 | 0.000 | |
ARJ21 | 0.000 | Boeing737 | 0.000 | Boeing787 | 0.000 | |
other | 0.000 |
[04/10 06:19:17] d2.engine.defaults INFO: Evaluation results for voc_2007_val in csv format: [04/10 06:19:17] d2.evaluation.testing INFO: copypaste: Task: bbox [04/10 06:19:17] d2.evaluation.testing INFO: copypaste: AP,AP50,AP75,APs,APm,APl [04/10 06:19:17] d2.evaluation.testing INFO: copypaste: 0.0000,0.0000,0.0000,nan,0.0000,0.0000 [04/10 06:22:43] detectron2 INFO: Rank of current process: 0. World size: 1 [04/10 06:22:44] detectron2 INFO: Environment info:
sys.platform linux
Python 3.9.19 (main, Mar 21 2024, 17:11:28) [GCC 11.2.0]
numpy 1.26.4
detectron2 0.6 @/workspace/DiffDet4SAR/detectron2
detectron2._C not built correctly: No module named 'detectron2._C'
Compiler ($CXX) c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
DETECTRON2_ENV_MODULE
PyTorch built with:
[04/10 06:22:44] detectron2 INFO: Command line arguments: Namespace(config_file='configs/diffdet.voc.res50.yaml', resume=False, eval_only=True, num_gpus=1, num_machines=1, machine_rank=0, dist_url='tcp://127.0.0.1:49152', opts=[]) [04/10 06:22:44] detectron2 INFO: Contents of args.config_file=configs/diffdet.voc.res50.yaml: BASE: "Base-DiffusionDet.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/torchvision/R-50.pkl" RESNETS: DEPTH: 50 STRIDE_IN_1X1: False DiffusionDet: NUM_PROPOSALS: 500 NUM_CLASSES: 7 DATASETS: TRAIN: ("voc_2007_train",) TEST: ("voc_2007_val",) SOLVER: STEPS: (350000, 420000) MAX_ITER: 450000 INPUT: CROP: ENABLED: True FORMAT: "RGB"
[04/10 06:22:44] detectron2 INFO: Running with full config: CUDNN_BENCHMARK: false DATALOADER: ASPECT_RATIO_GROUPING: true FILTER_EMPTY_ANNOTATIONS: false NUM_WORKERS: 4 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:
[04/10 06:22:44] detectron2 INFO: Full config saved to ./output/config.yaml [04/10 06:22:48] d2.checkpoint.detection_checkpoint INFO: [DetectionCheckpointer] Loading from detectron2://ImageNetPretrained/torchvision/R-50.pkl ... [04/10 06:22:48] fvcore.common.checkpoint INFO: [Checkpointer] Loading from /root/.torch/iopath_cache/detectron2/ImageNetPretrained/torchvision/R-50.pkl ... [04/10 06:22:48] fvcore.common.checkpoint INFO: Reading a file from 'torchvision' [04/10 06:22:48] d2.checkpoint.c2_model_loading INFO: Following weights matched with submodule backbone.bottom_up - Total num: 53 [04/10 06:22:48] fvcore.common.checkpoint WARNING: Some model parameters or buffers are not found in the checkpoint: [34malphas_cumprod[0m [34malphas_cumprod_prev[0m [34mbackbone.fpn_lateral2.{bias, weight}[0m [34mbackbone.fpn_lateral3.{bias, weight}[0m [34mbackbone.fpn_lateral4.{bias, weight}[0m [34mbackbone.fpn_lateral5.{bias, weight}[0m [34mbackbone.fpn_output2.{bias, weight}[0m [34mbackbone.fpn_output3.{bias, weight}[0m [34mbackbone.fpn_output4.{bias, weight}[0m [34mbackbone.fpn_output5.{bias, weight}[0m [34mbetas[0m [34mdiff_conv5.weight[0m [34mhead.head_series.0.bboxes_delta.{bias, weight}[0m [34mhead.head_series.0.block_time_mlp.1.{bias, weight}[0m [34mhead.head_series.0.class_logits.{bias, weight}[0m [34mhead.head_series.0.cls_module.0.weight[0m [34mhead.head_series.0.cls_module.1.{bias, weight}[0m [34mhead.head_series.0.inst_interact.dynamic_layer.{bias, weight}[0m [34mhead.head_series.0.inst_interact.norm1.{bias, weight}[0m [34mhead.head_series.0.inst_interact.norm2.{bias, weight}[0m [34mhead.head_series.0.inst_interact.norm3.{bias, weight}[0m [34mhead.head_series.0.inst_interact.out_layer.{bias, weight}[0m [34mhead.head_series.0.linear1.{bias, weight}[0m [34mhead.head_series.0.linear2.{bias, weight}[0m [34mhead.head_series.0.norm1.{bias, weight}[0m [34mhead.head_series.0.norm2.{bias, weight}[0m [34mhead.head_series.0.norm3.{bias, weight}[0m [34mhead.head_series.0.reg_module.0.weight[0m [34mhead.head_series.0.reg_module.1.{bias, weight}[0m [34mhead.head_series.0.reg_module.3.weight[0m [34mhead.head_series.0.reg_module.4.{bias, weight}[0m [34mhead.head_series.0.reg_module.6.weight[0m [34mhead.head_series.0.reg_module.7.{bias, weight}[0m [34mhead.head_series.0.self_attn.out_proj.{bias, weight}[0m [34mhead.head_series.0.self_attn.{in_proj_bias, in_proj_weight}[0m [34mhead.head_series.1.bboxes_delta.{bias, weight}[0m [34mhead.head_series.1.block_time_mlp.1.{bias, weight}[0m [34mhead.head_series.1.class_logits.{bias, weight}[0m [34mhead.head_series.1.cls_module.0.weight[0m [34mhead.head_series.1.cls_module.1.{bias, weight}[0m [34mhead.head_series.1.inst_interact.dynamic_layer.{bias, weight}[0m [34mhead.head_series.1.inst_interact.norm1.{bias, weight}[0m [34mhead.head_series.1.inst_interact.norm2.{bias, weight}[0m [34mhead.head_series.1.inst_interact.norm3.{bias, weight}[0m [34mhead.head_series.1.inst_interact.out_layer.{bias, weight}[0m [34mhead.head_series.1.linear1.{bias, weight}[0m [34mhead.head_series.1.linear2.{bias, weight}[0m [34mhead.head_series.1.norm1.{bias, weight}[0m [34mhead.head_series.1.norm2.{bias, weight}[0m [34mhead.head_series.1.norm3.{bias, weight}[0m [34mhead.head_series.1.reg_module.0.weight[0m [34mhead.head_series.1.reg_module.1.{bias, weight}[0m [34mhead.head_series.1.reg_module.3.weight[0m [34mhead.head_series.1.reg_module.4.{bias, weight}[0m [34mhead.head_series.1.reg_module.6.weight[0m [34mhead.head_series.1.reg_module.7.{bias, weight}[0m [34mhead.head_series.1.self_attn.out_proj.{bias, weight}[0m [34mhead.head_series.1.self_attn.{in_proj_bias, in_proj_weight}[0m [34mhead.head_series.2.bboxes_delta.{bias, weight}[0m [34mhead.head_series.2.block_time_mlp.1.{bias, weight}[0m [34mhead.head_series.2.class_logits.{bias, weight}[0m [34mhead.head_series.2.cls_module.0.weight[0m [34mhead.head_series.2.cls_module.1.{bias, weight}[0m [34mhead.head_series.2.inst_interact.dynamic_layer.{bias, weight}[0m [34mhead.head_series.2.inst_interact.norm1.{bias, weight}[0m [34mhead.head_series.2.inst_interact.norm2.{bias, weight}[0m [34mhead.head_series.2.inst_interact.norm3.{bias, weight}[0m [34mhead.head_series.2.inst_interact.out_layer.{bias, weight}[0m [34mhead.head_series.2.linear1.{bias, weight}[0m [34mhead.head_series.2.linear2.{bias, weight}[0m [34mhead.head_series.2.norm1.{bias, weight}[0m [34mhead.head_series.2.norm2.{bias, weight}[0m [34mhead.head_series.2.norm3.{bias, weight}[0m [34mhead.head_series.2.reg_module.0.weight[0m [34mhead.head_series.2.reg_module.1.{bias, weight}[0m [34mhead.head_series.2.reg_module.3.weight[0m [34mhead.head_series.2.reg_module.4.{bias, weight}[0m [34mhead.head_series.2.reg_module.6.weight[0m [34mhead.head_series.2.reg_module.7.{bias, weight}[0m [34mhead.head_series.2.self_attn.out_proj.{bias, weight}[0m [34mhead.head_series.2.self_attn.{in_proj_bias, in_proj_weight}[0m [34mhead.head_series.3.bboxes_delta.{bias, weight}[0m [34mhead.head_series.3.block_time_mlp.1.{bias, weight}[0m [34mhead.head_series.3.class_logits.{bias, weight}[0m [34mhead.head_series.3.cls_module.0.weight[0m [34mhead.head_series.3.cls_module.1.{bias, weight}[0m [34mhead.head_series.3.inst_interact.dynamic_layer.{bias, weight}[0m [34mhead.head_series.3.inst_interact.norm1.{bias, weight}[0m [34mhead.head_series.3.inst_interact.norm2.{bias, weight}[0m [34mhead.head_series.3.inst_interact.norm3.{bias, weight}[0m [34mhead.head_series.3.inst_interact.out_layer.{bias, weight}[0m [34mhead.head_series.3.linear1.{bias, weight}[0m [34mhead.head_series.3.linear2.{bias, weight}[0m [34mhead.head_series.3.norm1.{bias, weight}[0m [34mhead.head_series.3.norm2.{bias, weight}[0m [34mhead.head_series.3.norm3.{bias, weight}[0m [34mhead.head_series.3.reg_module.0.weight[0m [34mhead.head_series.3.reg_module.1.{bias, weight}[0m [34mhead.head_series.3.reg_module.3.weight[0m [34mhead.head_series.3.reg_module.4.{bias, weight}[0m [34mhead.head_series.3.reg_module.6.weight[0m [34mhead.head_series.3.reg_module.7.{bias, weight}[0m [34mhead.head_series.3.self_attn.out_proj.{bias, weight}[0m [34mhead.head_series.3.self_attn.{in_proj_bias, in_proj_weight}[0m [34mhead.head_series.4.bboxes_delta.{bias, weight}[0m [34mhead.head_series.4.block_time_mlp.1.{bias, weight}[0m [34mhead.head_series.4.class_logits.{bias, weight}[0m [34mhead.head_series.4.cls_module.0.weight[0m [34mhead.head_series.4.cls_module.1.{bias, weight}[0m [34mhead.head_series.4.inst_interact.dynamic_layer.{bias, weight}[0m [34mhead.head_series.4.inst_interact.norm1.{bias, weight}[0m [34mhead.head_series.4.inst_interact.norm2.{bias, weight}[0m [34mhead.head_series.4.inst_interact.norm3.{bias, weight}[0m [34mhead.head_series.4.inst_interact.out_layer.{bias, weight}[0m [34mhead.head_series.4.linear1.{bias, weight}[0m [34mhead.head_series.4.linear2.{bias, weight}[0m [34mhead.head_series.4.norm1.{bias, weight}[0m [34mhead.head_series.4.norm2.{bias, weight}[0m [34mhead.head_series.4.norm3.{bias, weight}[0m [34mhead.head_series.4.reg_module.0.weight[0m [34mhead.head_series.4.reg_module.1.{bias, weight}[0m [34mhead.head_series.4.reg_module.3.weight[0m [34mhead.head_series.4.reg_module.4.{bias, weight}[0m [34mhead.head_series.4.reg_module.6.weight[0m [34mhead.head_series.4.reg_module.7.{bias, weight}[0m [34mhead.head_series.4.self_attn.out_proj.{bias, weight}[0m [34mhead.head_series.4.self_attn.{in_proj_bias, in_proj_weight}[0m [34mhead.head_series.5.bboxes_delta.{bias, weight}[0m [34mhead.head_series.5.block_time_mlp.1.{bias, weight}[0m [34mhead.head_series.5.class_logits.{bias, weight}[0m [34mhead.head_series.5.cls_module.0.weight[0m [34mhead.head_series.5.cls_module.1.{bias, weight}[0m [34mhead.head_series.5.inst_interact.dynamic_layer.{bias, weight}[0m [34mhead.head_series.5.inst_interact.norm1.{bias, weight}[0m [34mhead.head_series.5.inst_interact.norm2.{bias, weight}[0m [34mhead.head_series.5.inst_interact.norm3.{bias, weight}[0m [34mhead.head_series.5.inst_interact.out_layer.{bias, weight}[0m [34mhead.head_series.5.linear1.{bias, weight}[0m [34mhead.head_series.5.linear2.{bias, weight}[0m [34mhead.head_series.5.norm1.{bias, weight}[0m [34mhead.head_series.5.norm2.{bias, weight}[0m [34mhead.head_series.5.norm3.{bias, weight}[0m [34mhead.head_series.5.reg_module.0.weight[0m [34mhead.head_series.5.reg_module.1.{bias, weight}[0m [34mhead.head_series.5.reg_module.3.weight[0m [34mhead.head_series.5.reg_module.4.{bias, weight}[0m [34mhead.head_series.5.reg_module.6.weight[0m [34mhead.head_series.5.reg_module.7.{bias, weight}[0m [34mhead.head_series.5.self_attn.out_proj.{bias, weight}[0m [34mhead.head_series.5.self_attn.{in_proj_bias, in_proj_weight}[0m [34mhead.time_mlp.1.{bias, weight}[0m [34mhead.time_mlp.3.{bias, weight}[0m [34mlog_one_minus_alphas_cumprod[0m [34mposterior_log_variance_clipped[0m [34mposterior_mean_coef1[0m [34mposterior_mean_coef2[0m [34mposterior_variance[0m [34msqrt_alphas_cumprod[0m [34msqrt_one_minus_alphas_cumprod[0m [34msqrt_recip_alphas_cumprod[0m [34msqrt_recipm1_alphas_cumprod[0m [04/10 06:22:48] fvcore.common.checkpoint WARNING: The checkpoint state_dict contains keys that are not used by the model: [35mstem.fc.{bias, weight}[0m [04/10 06:22:48] d2.data.build INFO: Distribution of instances among all 7 categories: [36m | category | #instances | category | #instances | category | #instances |
---|---|---|---|---|---|---|
A220 | 247 | A320/321 | 82 | A330 | 27 | |
ARJ21 | 378 | Boeing737 | 252 | Boeing787 | 261 | |
other | 715 | |||||
total | 1962 | [0m |
[04/10 06:22:48] d2.data.dataset_mapper INFO: [DatasetMapper] Augmentations used in inference: [ResizeShortestEdge(short_edge_length=(800, 800), max_size=1800, sample_style='choice')] [04/10 06:22:48] d2.data.common INFO: Serializing the dataset using: <class 'detectron2.data.common._TorchSerializedList'> [04/10 06:22:48] d2.data.common INFO: Serializing 442 elements to byte tensors and concatenating them all ... [04/10 06:22:48] d2.data.common INFO: Serialized dataset takes 0.23 MiB [04/10 06:22:48] d2.evaluation.coco_evaluation INFO: Fast COCO eval is not built. Falling back to official COCO eval. [04/10 06:22:48] d2.evaluation.coco_evaluation WARNING: COCO Evaluator instantiated using config, this is deprecated behavior. Please pass in explicit arguments instead. [04/10 06:22:48] d2.evaluation.coco_evaluation INFO: Trying to convert 'voc_2007_val' to COCO format ... [04/10 06:22:48] d2.data.datasets.coco WARNING: Using previously cached COCO format annotations at './output/inference/voc_2007_val_coco_format.json'. You need to clear the cache file if your dataset has been modified. [04/10 06:22:48] d2.evaluation.evaluator INFO: Start inference on 442 batches [04/10 06:22:50] d2.evaluation.evaluator INFO: Inference done 11/442. Dataloading: 0.0007 s/iter. Inference: 0.0793 s/iter. Eval: 0.0003 s/iter. Total: 0.0803 s/iter. ETA=0:00:34 [04/10 06:22:55] d2.evaluation.evaluator INFO: Inference done 73/442. Dataloading: 0.0012 s/iter. Inference: 0.0791 s/iter. Eval: 0.0003 s/iter. Total: 0.0807 s/iter. ETA=0:00:29 [04/10 06:23:00] d2.evaluation.evaluator INFO: Inference done 134/442. Dataloading: 0.0012 s/iter. Inference: 0.0799 s/iter. Eval: 0.0003 s/iter. Total: 0.0816 s/iter. ETA=0:00:25 [04/10 06:23:05] d2.evaluation.evaluator INFO: Inference done 196/442. Dataloading: 0.0013 s/iter. Inference: 0.0796 s/iter. Eval: 0.0003 s/iter. Total: 0.0813 s/iter. ETA=0:00:19 [04/10 06:23:10] d2.evaluation.evaluator INFO: Inference done 259/442. Dataloading: 0.0013 s/iter. Inference: 0.0794 s/iter. Eval: 0.0003 s/iter. Total: 0.0811 s/iter. ETA=0:00:14 [04/10 06:23:15] d2.evaluation.evaluator INFO: Inference done 322/442. Dataloading: 0.0013 s/iter. Inference: 0.0793 s/iter. Eval: 0.0003 s/iter. Total: 0.0810 s/iter. ETA=0:00:09 [04/10 06:23:20] d2.evaluation.evaluator INFO: Inference done 384/442. Dataloading: 0.0013 s/iter. Inference: 0.0793 s/iter. Eval: 0.0003 s/iter. Total: 0.0809 s/iter. ETA=0:00:04 [04/10 06:23:25] d2.evaluation.evaluator INFO: Total inference time: 0:00:35.390397 (0.080985 s / iter per device, on 1 devices) [04/10 06:23:25] d2.evaluation.evaluator INFO: Total inference pure compute time: 0:00:34 (0.079222 s / iter per device, on 1 devices) [04/10 06:23:25] d2.evaluation.coco_evaluation INFO: Preparing results for COCO format ... [04/10 06:23:25] d2.evaluation.coco_evaluation INFO: Saving results to ./output/inference/coco_eval_instances_results.json [04/10 06:23:25] d2.evaluation.coco_evaluation INFO: Evaluating predictions with official COCO API... [04/10 06:23:29] d2.evaluation.coco_evaluation INFO: Evaluation results for bbox: | AP | AP50 | AP75 | APs | APm | APl |
---|---|---|---|---|---|---|
0.000 | 0.000 | 0.000 | nan | 0.000 | 0.000 |
[04/10 06:23:29] d2.evaluation.coco_evaluation INFO: Some metrics cannot be computed and is shown as NaN. [04/10 06:23:29] d2.evaluation.coco_evaluation INFO: Per-category bbox AP: | category | AP | category | AP | category | AP |
---|---|---|---|---|---|---|
A220 | 0.000 | A320/321 | 0.000 | A330 | 0.000 | |
ARJ21 | 0.000 | Boeing737 | 0.000 | Boeing787 | 0.000 | |
other | 0.000 |
[04/10 06:23:29] d2.engine.defaults INFO: Evaluation results for voc_2007_val in csv format: [04/10 06:23:29] d2.evaluation.testing INFO: copypaste: Task: bbox [04/10 06:23:29] d2.evaluation.testing INFO: copypaste: AP,AP50,AP75,APs,APm,APl [04/10 06:23:29] d2.evaluation.testing INFO: copypaste: 0.0000,0.0000,0.0000,nan,0.0000,0.0000`
It seems that there were something wrong with your data-processing, resulting the training invalid.
I‘ve uploaded my code 'voc2coco.py' to my repository and you can download it, hoping that can address your issue.
:)
When I use your voc2coco.py, I still get the same result.
This is the part of the json I converted:
{"info": ["none"], "license": ["none"], "images": [{"file_name": "0000001.jpg", "height": 1500, "width": 1500, "id": 1}, {"file_name": "0000002.jpg", "height": 1200, "width": 1200, "id": 2}, {"file_name": "0000003.jpg", "height": 1200, "width": 1200, "id": 3}, {"file_name": "0000004.jpg", "height": 1500, "width": 1500, "id": 4}, {"file_name": "0000005.jpg", "height": 1200, "width": 1200, "id": 5}, {"file_name": "0000006.jpg", "height": 800, "width": 800, "id": 6}, {"file_name": "0000007.jpg", "height": 800, "width": 800, "id": 7}, {"file_name": "0000008.jpg", "height": 1000, "width": 1000, "id": 8}, {"file_name": "0000010.jpg", "height": 1500, "width": 1500, "id": 10}, {"file_name": "0000012.jpg", "height": 800, "width": 800, "id": 12}, {"file_name": "0000015.jpg", "height": 800, "width": 800, "id": 15}, {"file_name": "0000017.jpg", "height": 800, "width": 800, "id": 17}, {"file_name": "0000018.jpg", "height": 800, "width": 800, "id": 18}, {"file_name": "0000019.jpg", "height": 800, "width": 800, "id": 19}, {"file_name": "0000021.jpg", "height": 1500, "width": 1500, "id": 21}, {"file_name": "0000022.jpg", "height": 800, "width": 800, "id": 22}, {"file_name": "0000024.jpg", "height": 800, "width": 800, "id": 24}, {"file_name": "0000025.jpg", "height": 1200, "width": 1200, "id": 25}, {"file_name": "0000026.jpg", "height": 1000, "width": 1000, "id": 26}, {"file_name": "0000027.jpg", "height": 800, "width": 800, "id": 27}, {"file_name": "0000028.jpg", "height": 800, "width": 800, "id": 28}, {"file_name": "0000029.jpg", "height": 1500, "width": 1500, "id": 29}, {"file_name": "0000031.jpg", "height": 1500, "width": 1500, "id": 31}, {"file_name": "0000032.jpg", "height": 1200, "width": 1200, "id": 32},
I also have the same problem, the calculated ap is all 0.I'm sure my labels are fine because they work fine on other models.
Have you trained the model?.... you should train the model on your dataset and get the weight(.pth), then update it in config and default. From both of your results, I do not think you have run the codes rightly.......
I am having some problems converting SAR-AIRcraft 1.0 dataset format to COCO format.Thank you very much.