deep-person-reid/torchreid/utils/GPU-Re-Ranking/extension/adjacency_matrix/setup.py

37 lines
1.2 KiB
Python
Raw Normal View History

2021-01-15 15:29:44 +08:00
"""
Understanding Image Retrieval Re-Ranking: A Graph Neural Network Perspective
Xuanmeng Zhang, Minyue Jiang, Zhedong Zheng, Xiao Tan, Errui Ding, Yi Yang
Project Page : https://github.com/Xuanmeng-Zhang/gnn-re-ranking
Paper: https://arxiv.org/abs/2012.07620v2
======================================================================
On the Market-1501 dataset, we accelerate the re-ranking processing from 89.2s to 9.4ms
with one K40m GPU, facilitating the real-time post-processing. Similarly, we observe
that our method achieves comparable or even better retrieval results on the other four
image retrieval benchmarks, i.e., VeRi-776, Oxford-5k, Paris-6k and University-1652,
with limited time cost.
"""
2021-02-14 11:25:24 +08:00
from setuptools import Extension, setup
2021-01-15 15:29:44 +08:00
import torch
import torch.nn as nn
from torch.autograd import Function
2021-02-14 11:25:24 +08:00
from torch.utils.cpp_extension import CUDAExtension, BuildExtension
2021-01-15 15:29:44 +08:00
setup(
name='build_adjacency_matrix',
ext_modules=[
2021-02-14 11:25:24 +08:00
CUDAExtension(
'build_adjacency_matrix', [
'build_adjacency_matrix.cpp',
'build_adjacency_matrix_kernel.cu',
]
),
2021-01-15 15:29:44 +08:00
],
2021-02-14 11:25:24 +08:00
cmdclass={'build_ext': BuildExtension}
)