Jittor / JDet

JDet is an object detection benchmark based on Jittor. Mainly focus on aerial image object detection (oriented object detection).
Apache License 2.0
191 stars 34 forks source link

NotImplementedError from jdet/ops/dcn_v1.py #51

Closed Xunius closed 2 years ago

Xunius commented 2 years ago

Hi,

我在运行 https://github.com/Jittor/JDet/blob/master/docs/fair1m_1_5.md 里的 s2anet baseline 时遇到以下问题。 我已经按说明预处理了 FAIR1m1.5 数据。 修改了 configs/s2anet/s2anet_r50_fpn_1x_fair1m_1_5.py 文件里的数据路径,其他地方没有改动。

运行 python tools/run_net.py --config-file configs/s2anet/s2anet_r50_fpn_1x_fair1m_1_5.py --no_cuda 得到以下输出

[i 0816 14:20:39.752772 76 compiler.py:955] Jittor(1.3.5.3) src: /home/guangzhi/.local/anaconda3/envs/jdet/lib/python3.7/site-packages/jittor
[i 0816 14:20:39.757749 76 compiler.py:956] g++ at /usr/bin/g++(12.1.1)
[i 0816 14:20:39.757837 76 compiler.py:957] cache_path: /home/guangzhi/.cache/jittor/jt1.3.5/g++12.1.1/py3.7.13/Linux-5.10.136xc2/AMDRyzen73700Xx25/default
[i 0816 14:20:39.761451 76 __init__.py:411] Found nvcc(11.7.99) at /opt/cuda/bin/nvcc.
[i 0816 14:20:39.768425 76 __init__.py:411] Found addr2line(2.39) at /usr/bin/addr2line.
[i 0816 14:20:39.877018 76 compiler.py:1010] cuda key:cu11.7.99_sm_
[i 0816 14:20:40.065266 76 __init__.py:227] Total mem: 62.78GB, using 16 procs for compiling.
[i 0816 14:20:40.115608 76 jit_compiler.cc:28] Load cc_path: /usr/bin/g++
[i 0816 14:20:40.117752 76 init.cc:62] Found cuda archs: []
[i 0816 14:20:40.179477 76 __init__.py:411] Found mpicc(4.1.4) at /usr/bin/mpicc.
[i 0816 14:20:40.255035 76 compile_extern.py:30] found /opt/cuda/include/cublas.h
[i 0816 14:20:40.259419 76 compile_extern.py:30] found /opt/cuda/lib64/libcublas.so
[i 0816 14:20:40.259539 76 compile_extern.py:30] found /opt/cuda/lib64/libcublasLt.so.11
[i 0816 14:20:40.273131 76 compile_extern.py:30] found /usr/include/cudnn.h
[i 0816 14:20:40.280202 76 compile_extern.py:30] found /usr/lib/libcudnn.so.8
[i 0816 14:20:40.280335 76 compile_extern.py:30] found /usr/lib/libcudnn_ops_infer.so.8
[i 0816 14:20:40.281289 76 compile_extern.py:30] found /usr/lib/libcudnn_ops_train.so.8
[i 0816 14:20:40.282017 76 compile_extern.py:30] found /usr/lib/libcudnn_cnn_infer.so.8
[i 0816 14:20:40.309235 76 compile_extern.py:30] found /usr/lib/libcudnn_cnn_train.so.8
[i 0816 14:20:40.330474 76 compile_extern.py:30] found /opt/cuda/include/curand.h
[i 0816 14:20:40.335617 76 compile_extern.py:30] found /opt/cuda/lib64/libcurand.so
[i 0816 14:20:40.342631 76 compile_extern.py:30] found /opt/cuda/include/cufft.h
[i 0816 14:20:40.350033 76 compile_extern.py:30] found /opt/cuda/lib64/libcufft.so
Loading config from:  configs/s2anet/s2anet_r50_fpn_1x_fair1m_1_5.py
[w 0816 14:20:41.049850 76 __init__.py:1344] load parameter fc.weight failed ...
[w 0816 14:20:41.049903 76 __init__.py:1344] load parameter fc.bias failed ...
[w 0816 14:20:41.050578 76 __init__.py:1363] load total 267 params, 2 failed
Tue Aug 16 14:20:41 2022 Start running
Traceback (most recent call last):
  File "tools/run_net.py", line 56, in <module>
    main()
  File "tools/run_net.py", line 47, in main
    runner.run()
  File "/home/guangzhi/codes/JDet/python/jdet/runner/runner.py", line 84, in run
    self.train()
  File "/home/guangzhi/codes/JDet/python/jdet/runner/runner.py", line 126, in train
    losses = self.model(images,targets)
  File "/home/guangzhi/.local/anaconda3/envs/jdet/lib/python3.7/site-packages/jittor/__init__.py", line 950, in __call__
    return self.execute(*args, **kw)
  File "/home/guangzhi/codes/JDet/python/jdet/models/networks/s2anet.py", line 35, in execute
    outputs = self.bbox_head(features, targets)
  File "/home/guangzhi/.local/anaconda3/envs/jdet/lib/python3.7/site-packages/jittor/__init__.py", line 950, in __call__
    return self.execute(*args, **kw)
  File "/home/guangzhi/codes/JDet/python/jdet/models/roi_heads/s2anet_head.py", line 625, in execute
    outs = multi_apply(self.forward_single, feats, self.anchor_strides)
  File "/home/guangzhi/codes/JDet/python/jdet/utils/general.py", line 53, in multi_apply
    return tuple(map(list, zip(*map_results)))
  File "/home/guangzhi/codes/JDet/python/jdet/models/roi_heads/s2anet_head.py", line 236, in forward_single
    align_feat = self.align_conv(x, refine_anchor.clone(), stride)
  File "/home/guangzhi/.local/anaconda3/envs/jdet/lib/python3.7/site-packages/jittor/__init__.py", line 950, in __call__
    return self.execute(*args, **kw)
  File "/home/guangzhi/codes/JDet/python/jdet/models/roi_heads/s2anet_head.py", line 722, in execute
    x = self.relu(self.deform_conv(x, offset_tensor))
  File "/home/guangzhi/.local/anaconda3/envs/jdet/lib/python3.7/site-packages/jittor/__init__.py", line 950, in __call__
    return self.execute(*args, **kw)
  File "/home/guangzhi/codes/JDet/python/jdet/ops/dcn_v1.py", line 696, in execute
    self.dilation, self.groups, self.deformable_groups)
  File "/home/guangzhi/.local/anaconda3/envs/jdet/lib/python3.7/site-packages/jittor/__init__.py", line 1603, in apply
    return func(*args, **kw)
  File "/home/guangzhi/.local/anaconda3/envs/jdet/lib/python3.7/site-packages/jittor/__init__.py", line 1559, in __call__
    ori_res = self.execute(*args)
  File "/home/guangzhi/codes/JDet/python/jdet/ops/dcn_v1.py", line 589, in execute
    raise NotImplementedError
NotImplementedError

此外运行以下几个测试均没有提示错误:

运行环境:

求帮助!

514flowey commented 2 years ago

这是因为JDet要求在GPU上运行,很多算子是没有实现CPU版本的。事实上如果不使用GPU,训练的耗时可能会难以接受。