Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The testing results of the whole dataset is empty. #11665

Open
xal-zhang opened this issue Apr 25, 2024 · 0 comments
Open

The testing results of the whole dataset is empty. #11665

xal-zhang opened this issue Apr 25, 2024 · 0 comments
Assignees

Comments

@xal-zhang
Copy link

I
Issue
I tried to run The project in the tutorial that trained the model using balloon datasets, and by round 6, I had the error shown in the title: The testing results of the whole dataset is empty. And some indicators are 0 from the fifth epoch, and the loss are zero.
I hope to get some help. Thank you!

image

Code

新配置继承了基本配置,并做了必要的修改

base = 'D:/mmlab/mmdetection/configs/mask_rcnn/mask-rcnn_r50-caffe_fpn_1x_coco.py'

我们还需要更改 head 中的 num_classes 以匹配数据集中的类别数

model = dict(
roi_head=dict(
bbox_head=dict(num_classes=1), mask_head=dict(num_classes=1)))

修改数据集相关配置

data_root = 'D:/mmlab/mmdetection/mmdet/configs/balloon/balloon_dataset/'
metainfo = {
'classes': ('balloon', ),
'palette': [
(220, 20, 60),
]
}
train_dataloader = dict(
batch_size=1,
dataset=dict(
data_root=data_root,
metainfo=metainfo,
ann_file='annotation/train.json',
data_prefix=dict(img='train/')))
val_dataloader = dict(
dataset=dict(
data_root=data_root,
metainfo=metainfo,
ann_file='annotation/val.json',
data_prefix=dict(img='val/')))
test_dataloader = val_dataloader

修改评价指标相关配置

val_evaluator = dict(ann_file=data_root + 'annotation/val.json')
test_evaluator = val_evaluator

使用预训练的 Mask R-CNN 模型权重来做初始化,可以提高模型性能

load_from = 'https://download.openmmlab.com/mmdetection/v2.0/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_3x_coco/mask_rcnn_r50_caffe_fpn_mstrain-poly_3x_coco_bbox_mAP-0.408__segm_mAP-0.37_20200504_163245-42aa3d00.pth'

Environment
sys.platform: win32
Python: 3.11.4 | packaged by Anaconda, Inc. | (main, Jul 5 2023, 13:38:37) [MSC v.1916 64 bit (AMD64)]
CUDA available: True
MUSA available: False
numpy_random_seed: 2147483648
GPU 0: NVIDIA GeForce GTX 1650
CUDA_HOME: None
GCC: n/a
PyTorch: 2.0.1
PyTorch compiling details: PyTorch built with:

  • C++ Version: 199711
  • MSVC 193431937
  • Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
  • Intel(R) MKL-DNN v2.7.3 (Git Hash 6dbeffbae1f23cbbeae17adb7b5b13f1f37c080e)
  • OpenMP 2019
  • LAPACK is enabled (usually provided by MKL)
  • CPU capability usage: AVX2
  • CUDA Runtime 11.8
  • 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_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=c
    ompute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_90,code=sm_90;-gencode;arch=compute_37,code=compute_37
  • CuDNN 8.7
  • Magma 2.5.4
  • Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.8, CUDNN_VERSION=8.7.0, CXX_COMPILER=C:/cb/pytorch_1000000000000/work/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj /FS -DUSE
    _PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_DISAB
    LE_GPU_ASSERTS=OFF, TORCH_VERSION=2.0.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=OFF, USE_OPENMP=ON, USE_ROCM=OFF,

TorchVision: 0.15.2
OpenCV: 4.7.0
MMEngine: 0.10.3
MMDetection: 3.3.0+cfd5d3a

@xal-zhang xal-zhang closed this as not planned Won't fix, can't repro, duplicate, stale Apr 26, 2024
@xal-zhang xal-zhang reopened this Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants