Comments (6)
超分网络现在的分辨率是提高两倍,你可以把test_img_size设置成320
from superyolo.
--ch_steam 是用来做中间层融合时两个分支输入通道数
--ch 是做像素级融合输入网络的图像通道数
请问可以展示一下报的错误吗?这样不好给你说明是什么问题
from superyolo.
当然可以,我的需求是输入为RGB图像,不使用MF模块只使用超分模块,命令为
python train.py --cfg models/SRyolo_noFocus_small.yaml --super --train_img_size 640 --hr_input --data data/KFuji.yaml --ch 3 --input_mode RGB --epochs 1 --device 3
执行之后的报错截图如下
from superyolo.
我复现代码的时候遇到了一些问题,跑的也是其他数据集(visdrone-2019),可以帮忙看一下问题吗 @icey-zhang
报错如下:
Namespace(adam=False, artifact_alias='latest', batch_size=2, bbox_interval=-1, bucket='', cache_images=False, cfg='E:\DeepLearning\superyolo\origin\SuperYOLO\models\SRyolo_noFocus_small.yaml', ch=64, ch_steam=3, data='E:\DeepLearning\superyolo\origin\SuperYOLO\data\VisDrone.yaml', device='0', entity=None, epochs=3, evolve=False, exist_ok=False, global_rank=-1, hr_input=True, hyp='E:\DeepLearning\superyolo\origin\SuperYOLO\data\hyp.scratch.yaml', image_weights=False, img_size=[1024, 512], input_mode='RGB', linear_lr=False, local_rank=-1, multi_scale=False, name='exp', noautoanchor=False, nosave=False, notest=False, project='runs/train', quad=False, rect=False, resume=False, save_dir='runs\train\exp65', save_period=-1, single_cls=False, super=True, sync_bn=False, test_img_size=512, total_batch_size=2, train_img_size=1024, upload_dataset=False, weights='', workers=4, world_size=1)
tensorboard: Start with 'tensorboard --logdir runs/train', view at http://localhost:6006/
hyperparameters: lr0=0.01, lrf=0.2, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.5, cls_pw=1.0, obj=1.0, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0
wandb: Install Weights & Biases for YOLOv5 logging with 'pip install wandb' (recommended)
Overriding model.yaml nc=21 with nc=10
from n params module arguments
0 -1 1 18496 models.common.Conv [64, 32, 3, 1]
1 -1 1 18560 models.common.Conv [32, 64, 3, 2]
2 -1 1 18816 models.common.C3 [64, 64, 1]
3 -1 1 73984 models.common.Conv [64, 128, 3, 2]
4 -1 1 156928 models.common.C3 [128, 128, 3]
5 -1 1 295424 models.common.Conv [128, 256, 3, 2]
6 -1 1 625152 models.common.C3 [256, 256, 3]
7 -1 1 1180672 models.common.Conv [256, 512, 3, 2]
8 -1 1 656896 models.common.SPP [512, 512, [5, 9, 13]]
9 -1 1 1182720 models.common.C3 [512, 512, 1, False]
10 -1 1 131584 models.common.Conv [512, 256, 1, 1]
11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest']
12 [-1, 6] 1 0 models.common.Concat [1]
13 -1 1 361984 models.common.C3 [512, 256, 1, False]
14 -1 1 33024 models.common.Conv [256, 128, 1, 1]
15 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest']
16 [-1, 4] 1 0 models.common.Concat [1]
17 -1 1 90880 models.common.C3 [256, 128, 1, False]
18 [17] 1 5805 models.SRyolo.Detect [10, [[10, 13, 16, 30, 33, 23]], [128]]
Traceback (most recent call last):
File "E:/DeepLearning/superyolo/origin/SuperYOLO/train.py", line 673, in
train(hyp, opt, device, tb_writer)
File "E:/DeepLearning/superyolo/origin/SuperYOLO/train.py", line 102, in train
model = Model(opt.cfg, input_mode = opt.input_mode ,ch_steam=opt.ch_steam,ch=opt.ch, nc=nc, anchors=hyp.get('anchors'),config=None,sr=opt.super,factor=down_factor).to(device) # create
File "E:\DeepLearning\superyolo\origin\SuperYOLO\models\SRyolo.py", line 117, in init
m.stride = torch.tensor([s / x.shape[-2] for x in self.forward(torch.zeros(1, ch_steam, s, s),torch.zeros(1, ch_steam, s, s),input_mode)[0]]) # forward
File "E:\DeepLearning\superyolo\origin\SuperYOLO\models\SRyolo.py", line 190, in forward
y,output_sr,features = self.forward_once(steam,'yolo', profile) #zjq
File "E:\DeepLearning\superyolo\origin\SuperYOLO\models\SRyolo.py", line 232, in forward_once
x = m(x) # run
File "D:\Code_Tools\conda\envs\py25\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "E:\DeepLearning\superyolo\origin\SuperYOLO\models\common.py", line 49, in forward
y = self.act(self.bn(self.conv(x)))
File "D:\Code_Tools\conda\envs\py25\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\Code_Tools\conda\envs\py25\lib\site-packages\torch\nn\modules\conv.py", line 399, in forward
return self._conv_forward(input, self.weight, self.bias)
File "D:\Code_Tools\conda\envs\py25\lib\site-packages\torch\nn\modules\conv.py", line 395, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Given groups=1, weight of size [32, 64, 3, 3], expected input[1, 3, 256, 256] to have 64 channels, but got 3 channels instead
Process finished with exit code 1
from superyolo.
我复现代码的时候遇到了一些问题,跑的也是其他数据集(visdrone-2019),可以帮忙看一下问题吗 @icey-zhang
报错如下: Namespace(adam=False, artifact_alias='latest', batch_size=2, bbox_interval=-1, bucket='', cache_images=False, cfg='E:\DeepLearning\superyolo\origin\SuperYOLO\models\SRyolo_noFocus_small.yaml', ch=64, ch_steam=3, data='E:\DeepLearning\superyolo\origin\SuperYOLO\data\VisDrone.yaml', device='0', entity=None, epochs=3, evolve=False, exist_ok=False, global_rank=-1, hr_input=True, hyp='E:\DeepLearning\superyolo\origin\SuperYOLO\data\hyp.scratch.yaml', image_weights=False, img_size=[1024, 512], input_mode='RGB', linear_lr=False, local_rank=-1, multi_scale=False, name='exp', noautoanchor=False, nosave=False, notest=False, project='runs/train', quad=False, rect=False, resume=False, save_dir='runs\train\exp65', save_period=-1, single_cls=False, super=True, sync_bn=False, test_img_size=512, total_batch_size=2, train_img_size=1024, upload_dataset=False, weights='', workers=4, world_size=1) tensorboard: Start with 'tensorboard --logdir runs/train', view at http://localhost:6006/ hyperparameters: lr0=0.01, lrf=0.2, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.5, cls_pw=1.0, obj=1.0, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0 wandb: Install Weights & Biases for YOLOv5 logging with 'pip install wandb' (recommended) Overriding model.yaml nc=21 with nc=10
from n params module arguments
0 -1 1 18496 models.common.Conv [64, 32, 3, 1] 1 -1 1 18560 models.common.Conv [32, 64, 3, 2] 2 -1 1 18816 models.common.C3 [64, 64, 1] 3 -1 1 73984 models.common.Conv [64, 128, 3, 2] 4 -1 1 156928 models.common.C3 [128, 128, 3] 5 -1 1 295424 models.common.Conv [128, 256, 3, 2] 6 -1 1 625152 models.common.C3 [256, 256, 3] 7 -1 1 1180672 models.common.Conv [256, 512, 3, 2] 8 -1 1 656896 models.common.SPP [512, 512, [5, 9, 13]] 9 -1 1 1182720 models.common.C3 [512, 512, 1, False] 10 -1 1 131584 models.common.Conv [512, 256, 1, 1] 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 12 [-1, 6] 1 0 models.common.Concat [1] 13 -1 1 361984 models.common.C3 [512, 256, 1, False] 14 -1 1 33024 models.common.Conv [256, 128, 1, 1] 15 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 16 [-1, 4] 1 0 models.common.Concat [1] 17 -1 1 90880 models.common.C3 [256, 128, 1, False] 18 [17] 1 5805 models.SRyolo.Detect [10, [[10, 13, 16, 30, 33, 23]], [128]] Traceback (most recent call last): File "E:/DeepLearning/superyolo/origin/SuperYOLO/train.py", line 673, in train(hyp, opt, device, tb_writer) File "E:/DeepLearning/superyolo/origin/SuperYOLO/train.py", line 102, in train model = Model(opt.cfg, input_mode = opt.input_mode ,ch_steam=opt.ch_steam,ch=opt.ch, nc=nc, anchors=hyp.get('anchors'),config=None,sr=opt.super,factor=down_factor).to(device) # create File "E:\DeepLearning\superyolo\origin\SuperYOLO\models\SRyolo.py", line 117, in init m.stride = torch.tensor([s / x.shape[-2] for x in self.forward(torch.zeros(1, ch_steam, s, s),torch.zeros(1, ch_steam, s, s),input_mode)[0]]) # forward File "E:\DeepLearning\superyolo\origin\SuperYOLO\models\SRyolo.py", line 190, in forward y,output_sr,features = self.forward_once(steam,'yolo', profile) #zjq File "E:\DeepLearning\superyolo\origin\SuperYOLO\models\SRyolo.py", line 232, in forward_once x = m(x) # run File "D:\Code_Tools\conda\envs\py25\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "E:\DeepLearning\superyolo\origin\SuperYOLO\models\common.py", line 49, in forward y = self.act(self.bn(self.conv(x))) File "D:\Code_Tools\conda\envs\py25\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "D:\Code_Tools\conda\envs\py25\lib\site-packages\torch\nn\modules\conv.py", line 399, in forward return self._conv_forward(input, self.weight, self.bias) File "D:\Code_Tools\conda\envs\py25\lib\site-packages\torch\nn\modules\conv.py", line 395, in _conv_forward return F.conv2d(input, weight, bias, self.stride, RuntimeError: Given groups=1, weight of size [32, 64, 3, 3], expected input[1, 3, 256, 256] to have 64 channels, but got 3 channels instead
Process finished with exit code 1
把ch设置成3
from superyolo.
--ch_steam 是用来做中间层融合时两个分支输入通道数 --ch 是做像素级融合输入网络的图像通道数
请问可以展示一下报的错误吗?这样不好给你说明是什么问题
您好,我看您对--ch
的备注是3 4 16 midfusion1:64 midfusion2,3:128 midfusion4:256
,这不是做中间层融合时的输入通道数嘛?@icey-zhang
from superyolo.
Related Issues (20)
- 请问MF模块的输入为什么是256尺寸的,imgsz不是1024吗?
- 关于MF过程的疑问 HOT 1
- AttributeError: 'Model' object has no attribute 'steam'
- AttributeError: module 'numpy' has no attribute 'int'. HOT 4
- Question about annotation HOT 2
- test结果 HOT 6
- 请问loss.py中补充的LevelAttention_loss有使用到吗
- 测试使用作者提供的预训练权重问题 HOT 1
- 请问作者在export过程中是否有遇到过索引越界问题,具体问题在commom.py的MF类中 HOT 1
- 测试模型参数和GFLOPs问题 HOT 5
- 作者什么时候能更新superyolo版本的export.py HOT 1
- how super resolution work and where?
- 训练时无法找到标签
- Welcome to SuperYOLO Discussions! HOT 6
- SR的效果如何体现 HOT 3
- About multimodal results on YOLOv5
- 请问VEDAI数据集为什么在论文结果对比和代码中只保留了8类,删去了vehicle呢?
- SR网络 HOT 1
- Tag corresponding category
- SR分支
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superyolo.