wsx000 / YOLOv4-LibTorch-GPU-deployment

This is a YOLOv4 post-processing code used gpu based on pure libtorch API
GNU General Public License v2.0
14 stars 7 forks source link

maybe a bug #2

Closed happyboyneu closed 3 years ago

happyboyneu commented 3 years ago

image in utils.cpp,this line will lead an error. because at::unique_consecutive is "Eliminates all but the first element from every consecutive group of equivalent elements.". Not same with torch.unique().

wsx000 commented 3 years ago

thanks!you are right!I have found that the classes i get from this code only have one kind recently,But I never figured out what the problem was. now i think the problem is just as you said。But I haven't found the right function yet, Do you have a solution?

happyboyneu commented 3 years ago

看你的readme应该是中国人吧,直接中文回复了,libtorch里面没找到torch.unique()对应的实现,所以在遍历类别的时候,我直接使用了num_class。 image 有个限制就是要求类别id是从0开始连续的

wsx000 commented 3 years ago

哎都是中国人早说嘛哈哈,终于找到之前的问题所在了,你这个思路确实可以,感谢提醒!