在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):yxgeee/OpenIBL开源软件地址(OpenSource Url):https://github.com/yxgeee/OpenIBL开源编程语言(OpenSource Language):Python 93.1%开源软件介绍(OpenSource Introduction):OpenIBLIntroduction
Official implementation:
Unofficial implementation:
FAQ
Quick Start without InstallationExtract descriptor for a single imageimport torch
from torchvision import transforms
from PIL import Image
# load the best model with PCA (trained by our SFRS)
model = torch.hub.load('yxgeee/OpenIBL', 'vgg16_netvlad', pretrained=True).eval()
# read image
img = Image.open('image.jpg').convert('RGB') # modify the image path according to your need
transformer = transforms.Compose([transforms.Resize((480, 640)), # (height, width)
transforms.ToTensor(),
transforms.Normalize(mean=[0.48501960784313836, 0.4579568627450961, 0.4076039215686255],
std=[0.00392156862745098, 0.00392156862745098, 0.00392156862745098])])
img = transformer(img)
# use GPU (optional)
model = model.cuda()
img = img.cuda()
# extract descriptor (4096-dim)
with torch.no_grad():
des = model(img.unsqueeze(0))[0]
des = des.cpu().numpy() InstallationPlease refer to INSTALL.md for installation and dataset preparation. Train & TestTo reproduce the results in papers, you could train and test the models following the instruction in REPRODUCTION.md. Model ZooPlease refer to MODEL_ZOO.md for trained models. License
CitationIf you find this repo useful for your research, please consider citing the paper
AcknowledgementsThe structure of this repo is inspired by open-reid, and part of the code is inspired by pytorch-NetVlad. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论