Comments (17)
这个是对应位置的缩进不对齐所致,我上传的文件在我本地上都是对齐的,可能有些地方上传后不对齐了,你需要调整一下,再运行eval.py
这修改好之后出现新问题,我觉得下面eval.py程序需要改一下:
if args.cross_class_nms = True:
nms='cross class'
else:
nms='not use cross class'
if args.fast_nms = True:
num_count = num_count + 1
if args.cluster_nms = True:
num_count = num_count + 1
if args.cluster_diounms = True:
num_count = num_count + 1
if args.spm = True:
num_count = num_count + 1
if args.spm_dist = True:
num_count = num_count + 1
if args.spm_dist_weighted = True:
改成
if args.cross_class_nms == True:
nms='cross class'
else:
nms='not use cross class'
if args.fast_nms == True:
num_count = num_count + 1
if args.cluster_nms == True:
num_count = num_count + 1
if args.cluster_diounms == True:
num_count = num_count + 1
if args.spm == True:
num_count = num_count + 1
if args.spm_dist == True:
num_count = num_count + 1
if args.spm_dist_weighted == True:
num_count = num_count + 1
训练出现了新的问题:
Traceback (most recent call last):
File "train.py", line 504, in
train()
File "train.py", line 371, in train
compute_validation_map(epoch, iteration, yolact_net, val_dataset, log if args.log else None)
File "train.py", line 492, in compute_validation_map
val_info = eval_script.evaluate(yolact_net, dataset, train_mode=True)
File "/home/song/CIoU-master/eval.py", line 964, in evaluate
preds = net(batch)
File "/home/song/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/home/song/CIoU-master/yolact.py", line 676, in forward
return self.detect(pred_outs, self)
File "/home/song/CIoU-master/layers/functions/detection.py", line 76, in call
result = self.detect(batch_idx, conf_preds, decoded_boxes, mask_data, inst_data)
File "/home/song/CIoU-master/layers/functions/detection.py", line 122, in detect
boxes, masks, classes, scores = self.cluster_diounms(boxes, masks, scores, self.nms_thresh, self.top_k)
File "/home/song/CIoU-master/layers/functions/detection.py", line 347, in cluster_diounms
scores, idx = scores.sort(1, descending=True)
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)
请问这个怎么改?
from ciou.
这个是对应位置的缩进不对齐所致,我上传的文件在我本地上都是对齐的,可能有些地方上传后不对齐了,你需要调整一下,再运行eval.py
from ciou.
eval.py中,换成其他的nms看看是否会报错,比如fast_nms
from ciou.
eval.py中,换成其他的nms看看是否会报错,比如fast_nms
fast_nms好使,可以训练,其他的有相同的问题
from ciou.
这就很奇怪了,因为我看你报错是cluster_diounms的第一步scores.sort(1, descending=True),而这一步对fast_nms也是一样的第一步。详情可查看layers/functions/detection.py
from ciou.
这就很奇怪了,因为我看你报错是cluster_diounms的第一步scores.sort(1, descending=True),而这一步对fast_nms也是一样的第一步。详情可查看layers/functions/detection.py
其他的nms都可以训练,就这个还是有问题 spm_dist_weighted
Traceback (most recent call last):
File "train.py", line 504, in
train()
File "train.py", line 371, in train
compute_validation_map(epoch, iteration, yolact_net, val_dataset, log if args.log else None)
File "train.py", line 492, in compute_validation_map
val_info = eval_script.evaluate(yolact_net, dataset, train_mode=True)
File "/home/song/CIoU-master/eval.py", line 964, in evaluate
preds = net(batch)
File "/home/song/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, *kwargs)
File "/home/song/CIoU-master/yolact.py", line 676, in forward
return self.detect(pred_outs, self)
File "/home/song/CIoU-master/layers/functions/detection.py", line 76, in call
result = self.detect(batch_idx, conf_preds, decoded_boxes, mask_data, inst_data)
File "/home/song/CIoU-master/layers/functions/detection.py", line 128, in detect
boxes, masks, classes, scores = self.cluster_SPM_dist_weighted_nms(boxes, masks, scores, self.nms_thresh, self.top_k)
File "/home/song/CIoU-master/layers/functions/detection.py", line 489, in cluster_SPM_dist_weighted_nms
weights = (B(B>0.8).float() + torch.eye(n).cuda().expand(80,n,n)) * (scores.unsqueeze(2).expand(80,n,n))
RuntimeError: The size of tensor a (4) must match the size of tensor b (80) at non-singleton dimension 0
detection.py的489行改成 weights = (B*(B>0.8).float() + torch.eye(n).cuda().expand(4,n,n)) * (scores.unsqueeze(2).expand(4,n,n))(scores.unsqueeze(2).expand(4,n,n))就可以训练了
from ciou.
请问加入ciou损失和Cluster-NMS后,为什么ap mask的值会提升?我的理解是ap box会提升,因为是对边界框的优化。yolact检测和分割是分开进行的,如何解释ap mask会提升呢?谢谢回复。
from ciou.
YOLACT是基于检测的实例分割算法,因此box会影响裁剪出的mask的效果
from ciou.
YOLACT是基于检测的实例分割算法,因此box会影响裁剪出的mask的效果
可以讲的具体一点嘛,因为分割分支直接产生mask,似乎和box没什么关系
from ciou.
你看NMS的代码,mask是根据box的结果来裁剪的。box越正确,mask的结果也就越正确
from ciou.
你看NMS的代码,mask是根据box的结果来裁剪的。box越正确,mask的结果也就越正确
谢谢,那ciou对ap mask的提升怎么理解呢
from ciou.
CIoU用于bbox regression,可以提升box的质量
from ciou.
CIoU用于bbox regression,可以提升box的质量
非常感谢
from ciou.
还有一个小问题,看了一下代码,还是不太清楚ap mask是如何计算的,是计算每个像素吗
from ciou.
我看到你论文中Balancing precision and recall by different values of β in Cluster-NMS S+D,并且让β等于0.6,但是代码中并没有β的设置
from ciou.
@yishunzhijian 看 layers/box_utils.py
distance
函数
from ciou.
cluster_nms 出现同样问题,请问您解决了吗
from ciou.
Related Issues (20)
- 关于ciou loss的实现代码 HOT 4
- 请问论文中1/(w^2+h^2) 替换成1如何实现? HOT 2
- The measure of aspect ratio in ciou loss HOT 3
- Cluster-NMS HOT 7
- 预训练权重无法下载
- CIoU loss in semantic segmentation HOT 3
- Evaluation Error HOT 6
- About the results
- There may be some syntax bugs in eval.py
- 关于Complete-IoU Loss and Cluster-NMS for Improving Object Detection and Instance Segmentation HOT 3
- RuntimeError: CUDA error: device-side assert triggered HOT 2
- eval.py里面遇到的问题 HOT 3
- test_dev 上的evaluation 执行python eval.py --trained_model=weights/yolact_base_54_800000.pth --output_coco_json --dataset=coco2017_testdev_dataset命令后 生成bbox和mask两个json文件,而非一个json文件 HOT 2
- 关于eval.py中发现的一点小问题
- Request for a basic documentation for NMS inputs HOT 2
- No `distance` function HOT 1
- CIoU loss error HOT 1
- All the 5, 000 × 7 × 7 anchor boxes HOT 3
- the ciou loss vs. computeciou HOT 8
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 ciou.