|
|
""" |
|
|
Setup script for GAP-CLIP (Guaranteed Attribute Positioning in CLIP) |
|
|
|
|
|
This setup file allows installation of the GAP-CLIP package and its dependencies. |
|
|
|
|
|
Installation: |
|
|
pip install -e . # Editable/development install |
|
|
pip install . # Standard install |
|
|
pip install -e ".[dev]" # Install with development dependencies |
|
|
pip install -e ".[optuna]" # Install with hyperparameter optimization tools |
|
|
""" |
|
|
|
|
|
from setuptools import setup, find_packages |
|
|
import os |
|
|
|
|
|
|
|
|
def read_readme(): |
|
|
"""Read README.md for the long description.""" |
|
|
readme_path = os.path.join(os.path.dirname(__file__), 'README.md') |
|
|
if os.path.exists(readme_path): |
|
|
with open(readme_path, 'r', encoding='utf-8') as f: |
|
|
return f.read() |
|
|
return "" |
|
|
|
|
|
|
|
|
INSTALL_REQUIRES = [ |
|
|
'torch>=2.0.0', |
|
|
'torchvision>=0.15.0', |
|
|
'transformers>=4.30.0', |
|
|
'huggingface-hub>=0.16.0', |
|
|
'pillow>=9.0.0', |
|
|
'pandas>=1.5.0', |
|
|
'numpy>=1.24.0', |
|
|
'scikit-learn>=1.3.0', |
|
|
'tqdm>=4.65.0', |
|
|
'matplotlib>=3.7.0', |
|
|
'seaborn>=0.12.0', |
|
|
'requests>=2.28.0', |
|
|
'aiohttp>=3.8.0', |
|
|
] |
|
|
|
|
|
|
|
|
OPTUNA_REQUIRES = [ |
|
|
'optuna>=3.0.0', |
|
|
] |
|
|
|
|
|
|
|
|
DEV_REQUIRES = [ |
|
|
'pytest>=7.0.0', |
|
|
'black>=23.0.0', |
|
|
'flake8>=6.0.0', |
|
|
'mypy>=1.0.0', |
|
|
'jupyter>=1.0.0', |
|
|
'ipython>=8.0.0', |
|
|
] |
|
|
|
|
|
|
|
|
EXTRAS_REQUIRE = { |
|
|
'optuna': OPTUNA_REQUIRES, |
|
|
'dev': DEV_REQUIRES, |
|
|
'all': OPTUNA_REQUIRES + DEV_REQUIRES, |
|
|
} |
|
|
|
|
|
setup( |
|
|
name='gap-clip', |
|
|
version='1.0.0', |
|
|
author='Lea Attia Sarfati', |
|
|
author_email='lea.attia@gmail.com', |
|
|
description='GAP-CLIP: Guaranteed Attribute Positioning in CLIP Embeddings for Fashion Search', |
|
|
long_description=read_readme(), |
|
|
long_description_content_type='text/markdown', |
|
|
url='https://github.com/Leacb4/gap-clip', |
|
|
project_urls={ |
|
|
'Documentation': 'https://github.com/Leacb4/gap-clip#readme', |
|
|
'Source': 'https://github.com/Leacb4/gap-clip', |
|
|
'Bug Reports': 'https://github.com/Leacb4/gap-clip/issues', |
|
|
'Hugging Face': 'https://huggingface.co/Leacb4/gap-clip', |
|
|
}, |
|
|
packages=find_packages(exclude=['tests', 'tests.*', 'evaluation', 'optuna', 'data']), |
|
|
classifiers=[ |
|
|
'Development Status :: 4 - Beta', |
|
|
'Intended Audience :: Developers', |
|
|
'Intended Audience :: Science/Research', |
|
|
'License :: OSI Approved :: MIT License', |
|
|
'Programming Language :: Python :: 3', |
|
|
'Programming Language :: Python :: 3.8', |
|
|
'Programming Language :: Python :: 3.9', |
|
|
'Programming Language :: Python :: 3.10', |
|
|
'Programming Language :: Python :: 3.11', |
|
|
'Topic :: Scientific/Engineering :: Artificial Intelligence', |
|
|
'Topic :: Scientific/Engineering :: Image Recognition', |
|
|
'Topic :: Software Development :: Libraries :: Python Modules', |
|
|
], |
|
|
python_requires='>=3.8', |
|
|
install_requires=INSTALL_REQUIRES, |
|
|
extras_require=EXTRAS_REQUIRE, |
|
|
entry_points={ |
|
|
'console_scripts': [ |
|
|
'gap-clip-train=train_main_model:main', |
|
|
'gap-clip-example=example_usage:main', |
|
|
], |
|
|
}, |
|
|
include_package_data=True, |
|
|
package_data={ |
|
|
'': [ |
|
|
'*.json', |
|
|
'*.md', |
|
|
], |
|
|
}, |
|
|
keywords=[ |
|
|
'machine-learning', |
|
|
'deep-learning', |
|
|
'computer-vision', |
|
|
'fashion', |
|
|
'clip', |
|
|
'multimodal', |
|
|
'image-search', |
|
|
'text-search', |
|
|
'embeddings', |
|
|
'contrastive-learning', |
|
|
'pytorch', |
|
|
'transformers', |
|
|
], |
|
|
zip_safe=False, |
|
|
) |
|
|
|