adding pyproject.toml
parent
566a56a2cb
commit
71b3e269cb
|
@ -0,0 +1,42 @@
|
|||
[project]
|
||||
name = "torchreid"
|
||||
authors = [
|
||||
{name = "Kaiyang Zhou"},
|
||||
]
|
||||
license = {file = "LICENSE"}
|
||||
requires-python = ">=3.11"
|
||||
version="1.4.0"
|
||||
dependencies = [
|
||||
"numpy==1.26.4",
|
||||
"opencv-python==4.9.0.80",
|
||||
"torch==2.3.1",
|
||||
"scipy==1.14.0",
|
||||
"pillow==10.4.0",
|
||||
"torchvision==0.18.1",
|
||||
"gdown==5.2.0",
|
||||
"tensorboard==2.17.0",
|
||||
]
|
||||
readme = "README.rst"
|
||||
description = "A library for deep learning person re-ID in PyTorch"
|
||||
keywords = [
|
||||
'Person Re-Identification',
|
||||
'Deep Learning',
|
||||
'Computer Vision'
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = [
|
||||
"cython==3.0.10",
|
||||
"numpy==1.26.4",
|
||||
"setuptools>=45",
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["."]
|
||||
|
||||
[project.urls]
|
||||
"Homepage" = "https://kaiyangzhou.github.io"
|
||||
"Bug Reports" = "https://github.com/KaiyangZhou/deep-person-reid/issues"
|
||||
"Source" = "https://github.com/KaiyangZhou/deep-person-reid"
|
||||
|
44
setup.py
44
setup.py
|
@ -1,57 +1,19 @@
|
|||
import numpy as np
|
||||
import os.path as osp
|
||||
from setuptools import setup, find_packages
|
||||
from distutils.extension import Extension
|
||||
from setuptools import setup, Extension, find_packages
|
||||
from Cython.Build import cythonize
|
||||
|
||||
|
||||
def readme():
|
||||
with open('README.rst') as f:
|
||||
content = f.read()
|
||||
return content
|
||||
|
||||
|
||||
def find_version():
|
||||
version_file = 'torchreid/__init__.py'
|
||||
with open(version_file, 'r') as f:
|
||||
exec(compile(f.read(), version_file, 'exec'))
|
||||
return locals()['__version__']
|
||||
|
||||
|
||||
def numpy_include():
|
||||
try:
|
||||
numpy_include = np.get_include()
|
||||
except AttributeError:
|
||||
numpy_include = np.get_numpy_include()
|
||||
return numpy_include
|
||||
|
||||
|
||||
ext_modules = [
|
||||
Extension(
|
||||
'torchreid.metrics.rank_cylib.rank_cy',
|
||||
['torchreid/metrics/rank_cylib/rank_cy.pyx'],
|
||||
include_dirs=[numpy_include()],
|
||||
include_dirs=[np.get_include()],
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
def get_requirements(filename='requirements.txt'):
|
||||
here = osp.dirname(osp.realpath(__file__))
|
||||
with open(osp.join(here, filename), 'r') as f:
|
||||
requires = [line.replace('\n', '') for line in f.readlines()]
|
||||
return requires
|
||||
|
||||
|
||||
setup(
|
||||
name='torchreid',
|
||||
version=find_version(),
|
||||
description='A library for deep learning person re-ID in PyTorch',
|
||||
author='Kaiyang Zhou',
|
||||
license='MIT',
|
||||
long_description=readme(),
|
||||
url='https://github.com/KaiyangZhou/deep-person-reid',
|
||||
packages=find_packages(),
|
||||
install_requires=get_requirements(),
|
||||
keywords=['Person Re-Identification', 'Deep Learning', 'Computer Vision'],
|
||||
ext_modules=cythonize(ext_modules)
|
||||
)
|
||||
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
from __future__ import print_function, absolute_import
|
||||
|
||||
from torchreid import data, optim, utils, engine, losses, models, metrics
|
||||
|
||||
__version__ = '1.4.0'
|
||||
__author__ = 'Kaiyang Zhou'
|
||||
__homepage__ = 'https://kaiyangzhou.github.io/'
|
||||
__description__ = 'Deep learning person re-identification in PyTorch'
|
||||
__url__ = 'https://github.com/KaiyangZhou/deep-person-reid'
|
||||
|
|
Loading…
Reference in New Issue