liangheming / cascade_rcnn Goto Github PK
View Code? Open in Web Editor NEWpytorch implement of CascadeRCNN,736px(max side),41.2mAP(COCO),21.94fps(RTX 2080TI)
License: MIT License
pytorch implement of CascadeRCNN,736px(max side),41.2mAP(COCO),21.94fps(RTX 2080TI)
License: MIT License
请问博主是否有写好的推理预测的代码脚本吗?我自己写的和ChatGPT写的都不能加载我训练好的权重进行预测,请问博主或者其他好心人是否愿意开源推理预测代码呢?谢谢啦!!!
Traceback (most recent call last):
File "main.py", line 7, in
processor.run()
File "/root/cascade_rcnn-master/solver/ddp_mix_solver.py", line 211, in run
self.val(epoch)
File "/root/miniconda3/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 26, in decorate_context
return func(*args, **kwargs)
File "/root/cascade_rcnn-master/solver/ddp_mix_solver.py", line 202, in val
torch.save(cpkt, last_weight_path)
File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 369, in save
with _open_file_like(f, 'wb') as opened_file:
File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 230, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 211, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'weights/cascade_rcnn_resnet50_last.pth'
Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/root/miniconda3/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/root/miniconda3/lib/python3.8/site-packages/torch/distributed/launch.py", line 260, in
main()
File "/root/miniconda3/lib/python3.8/site-packages/torch/distributed/launch.py", line 255, in main
raise subprocess.CalledProcessError(returncode=process.returncode,
subprocess.CalledProcessError: Command '['/root/miniconda3/bin/python', '-u', 'main.py', '--local_rank=0']' returned non-zero exit status 1.
您好,在调试您的代码的过程中遇到了这个错误,我用的自己的数据集,请问问题是出在哪里呢?具体报错如下所示,非常期待您的回复!
/root/miniconda3/envs/my-env/lib/python3.7/site-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /opt/conda/conda-bld/pytorch_1634272126608/work/aten/src/ATen/native/TensorShape.cpp:2157.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
/opt/conda/conda-bld/pytorch_1634272126608/work/aten/src/ATen/native/cuda/Loss.cu:247: nll_loss_forward_reduce_cuda_kernel_2d: block: [0,0,0], thread: [2,0,0] Assertion t >= 0 && t < n_classes
failed.
/opt/conda/conda-bld/pytorch_1634272126608/work/aten/src/ATen/native/cuda/Loss.cu:247: nll_loss_forward_reduce_cuda_kernel_2d: block: [0,0,0], thread: [3,0,0] Assertion t >= 0 && t < n_classes
failed.
/opt/conda/conda-bld/pytorch_1634272126608/work/aten/src/ATen/native/cuda/Loss.cu:247: nll_loss_forward_reduce_cuda_kernel_2d: block: [0,0,0], thread: [5,0,0] Assertion t >= 0 && t < n_classes
failed.
/opt/conda/conda-bld/pytorch_1634272126608/work/aten/src/ATen/native/cuda/Loss.cu:247: nll_loss_forward_reduce_cuda_kernel_2d: block: [0,0,0], thread: [6,0,0] Assertion t >= 0 && t < n_classes
failed.
0%| | 0/1125 [00:02<?, ?it/s]
Traceback (most recent call last):
File "main.py", line 7, in
processor.run()
File "/root/cascade-rcnn/solver/ddp_mix_solver.py", line 213, in run
self.train(epoch)
File "/root/cascade-rcnn/solver/ddp_mix_solver.py", line 113, in train
targets={"target": targets_tensor, "batch_len": batch_len})
File "/root/miniconda3/envs/my-env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/root/miniconda3/envs/my-env/lib/python3.7/site-packages/torch/nn/parallel/distributed.py", line 886, in forward
output = self.module(*inputs[0], **kwargs[0])
File "/root/miniconda3/envs/my-env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/root/cascade-rcnn/nets/cascade_rcnn.py", line 702, in forward
box_predicts, cls_predicts, roi_losses = self.cascade_head(feature_dict, boxes, valid_size, targets)
File "/root/miniconda3/envs/my-env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/root/cascade-rcnn/nets/cascade_rcnn.py", line 621, in forward
boxes, cls, loss = self.roi_heads[i](feature_dict, boxes, valid_size, targets)
File "/root/miniconda3/envs/my-env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/root/cascade-rcnn/nets/cascade_rcnn.py", line 590, in forward
cls_loss, box_loss = self.compute_loss(proposals, cls_predicts, box_predicts, targets)
File "/root/cascade-rcnn/nets/cascade_rcnn.py", line 564, in compute_loss
cls_loss = self.ce(loss_cls_predicts, loss_cls_targets)
File "/root/miniconda3/envs/my-env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/root/miniconda3/envs/my-env/lib/python3.7/site-packages/torch/nn/modules/loss.py", line 1152, in forward
label_smoothing=self.label_smoothing)
File "/root/miniconda3/envs/my-env/lib/python3.7/site-packages/torch/nn/functional.py", line 2846, in cross_entropy
return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index, label_smoothing)
RuntimeError: CUDA error: device-side assert triggered
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: -6) local_rank: 0 (pid: 2085) of binary: /root/miniconda3/envs/my-env/bin/python
您好,项目中缺少权重文件,无法训练,请问这个faster_rcnn_resnet50_last.pth权重文件在哪里下载呀
您好,请问有对数据集图片大小有限制吗,比如coco2017都是640以内的图片尺寸
新版本torchvision将load_state_dict_from_url移到了torch中,将
from torchvision.models.utils import load_state_dict_from_url
改成
from torch.hub import load_state_dict_from_url
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.