tzzcl / psol Goto Github PK
View Code? Open in Web Editor NEWcode repository of “Rethinking the Route Towards Weakly Supervised Object Localization” in CVPR 2020
code repository of “Rethinking the Route Towards Weakly Supervised Object Localization” in CVPR 2020
class1 cls-loc acc is 0.0, loc acc is 1.0
class2 cls-loc acc is 0.0, loc acc is 0.75
loading from ground truth bbox
class3 cls-loc acc is 0.0, loc acc is 1.0
[0.0, 0.0, 0.0]
Cls-Loc acc 0.0
Cls-Loc acc Top 5 0.0
GT Loc acc 0.9166666666666666
resnet50 cls acc 0.0
Class loss Accuracy is always Zero in my case.Can you guide on this ?
There need to load 'cache_groundtruth.mat' in the file 'loader/imagenet_loader.py ':
def load_val_bbox(label_dict,all_imgs,gt_location):
........
gt_label = sio.loadmat(os.path.join(gt_location,'cache_groundtruth.mat'))
locs = [(x[0].split('/')[-1],x[0],x[1]) for x in all_imgs]
locs.sort()
final_bbox_dict = {}
for i in range(len(locs)):
#gt_label['rec'][:,1][0][0][0], if multilabel then get length, for final eval
final_bbox_dict[locs[i][1]] = gt_label['rec'][:,i][0][0][0][0][1][0]
return final_bbox_dict
But I can not find this file in annotations of Imagenet. How to get it?
Hi Chenlin,
Thanks for sharing your great work. When will you release the training codes, I am looking forward to it.
Thanks!
My classification accuracy is only 70% TnT
Hi Zhang,
In imagenet_loader.py there is a function
def load_val_bbox(label_dict,all_imgs,gt_location):
.........................
import scipy.io as sio
gt_label = sio.loadmat(os.path.join(gt_location,'cache_groundtruth.mat'))
..........................
Could you please share this file at [email protected]?
Thanks,
Shiven
I modified 'generate_box_imagenet.py' to 'generate_box_cub200.py'. However, I got the accuracy of GT known Loc is 88.5% which is much higher than paper claimed 84.55% in Tab.1. Cloud you please give some explanations ? or release your own 'generate_box_cub200.py'.
Thanks,
我是做医学图像检测的,我自己的数据集只有一类,可以使用您提出的方法吗?需要修改那些地方呢?我看redme中只有公开数据集的使用方法。谢谢您。
Hi Zhang,
Could you please provide the XML files or the XML format that is mentioned in _myval/ (groundtruth annotation xml file) folder_
as mentioned in the Github page for PSOL.
Appreciate your response on this!!!
Thanks,
Shiven
请问在论文report的数据中,是否所有模型都使用了ten_crop? 还是VGG使用了ten_crop而ResNet没有用?
我比较好奇的是用ten_crop来提升分类的精度是否是所有模型分类通用做法?我看到的一些分类问题使用ResNet的时候并没有用ten_crop。比如ResNet50在ImageNet分类里达到76.2的Top1精度,是没有用ten_crop的?
Hi Zhang,
Could you please share thee ImageNet dataset along with XML annotation files?
Thanks,
Shiven
请问您论文中pytorch和python是那个版本?谢谢
Hi Zhang,
For testing - python PSOL_inference.py --loc-model {$LOC_MODEL} --cls-model {$CLS_MODEL} {--ten-crop}
I am using this cmd-
_python PSOL_inference.py --loc-model vgg16 --cls-model vgg16 {--ten-crop}_
How to specify path of the model in this ?Getting this error:
_FileNotFoundError: [Errno 2] No such file or directory: 'vgg16loc.pth.tar'_
I have kepts the pre-trained model tar files in model directory.
Please guide on this!!!!
Hello author, I have read your paper and find it very inspiring! Here is my question:
when I test the code which you use to generate gt_bbox :
def load_val_bbox(label_dict,all_imgs,gt_location):
#gt_location ='/data/zhangcl/DDT-code/ImageNet_gt'
import scipy.io as sio
gt_label = sio.loadmat(os.path.join(gt_location,'cache_groundtruth.mat'))
locs = [(x[0].split('/')[-1],x[0],x[1]) for x in all_imgs]
locs.sort()
final_bbox_dict = {}
for i in range(len(locs)):
#gt_label['rec'][:,1][0][0][0], if multilabel then get length, for final eval
final_bbox_dict[locs[i][1]] = gt_label['rec'][:,i][0][0][0][0][1][0]
return final_bbox_dic
I find that if there is more than one target object in an image, it will choose the first object's localization as the gt_bbox, for example: No.2,No.23 image in validation set of ILSVRC.
However . this is unreasonable and will decrease the accuracy rate. So, what is your evaluation criterion on ILSVRC?
您好!ILSVRC的验证集具有50000个没有类别标签的图像,请问我应当如何将这些图像组织成readme中描述的格式:“val/class1,2,3,4.../image”?感谢您的回复!
hello,I want to know how to modify this file to read the annotations of the validation set during training,Thanks!!!
My file structure is the same as the README
def load_val_bbox(label_dict,all_imgs,gt_location):
#gt_location ='/data/zhangcl/DDT-code/ImageNet_gt'
import scipy.io as sio
gt_label = sio.loadmat(os.path.join(gt_location,'cache_groundtruth.mat'))
locs = [(x[0].split('/')[-1],x[0],x[1]) for x in all_imgs]
locs.sort()
final_bbox_dict = {}
for i in range(len(locs)):
#gt_label['rec'][:,1][0][0][0], if multilabel then get length, for final eval
final_bbox_dict[locs[i][1]] = gt_label['rec'][:,i][0][0][0][0][1][0]
print(final_bbox_dict)
return final_bbox_dict
Hello,
Thanks for the great works. Table 1 presents the GT-Known Loc of pseudo labels extracted from DDT model on ImageNet. Would you like to share the evaluation code for it?
我在CUB数据集上运行了您的train文件 在训练集可以达到90+的loc acc 但是测试集只有20左右的loc acc 请问这是什么
out_CUB_vgg.log
原因
请问验证集ground_th的mat文件是怎么生成的 我想生成CUB数据集的
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.