Team Ai
Apppublic

Arulkumar03/Wheat_HEAD_Detection_Counting_ComputerVision_Model

sourceHugging Facemitupdated 3y agoView on Hugging Face
0likes
setup.py43 linesDownload Raw Back to DensePose
1import re2from pathlib import Path3from setuptools import find_packages, setup4 5try:6    import torch  # noqa: F4017except ImportError as e:8    raise Exception(9        """10You must install PyTorch prior to installing DensePose:11pip install torch12 13For more information:14    https://pytorch.org/get-started/locally/15    """16    ) from e17 18 19def get_detectron2_current_version():20    """Version is not available for import through Python since it is21    above the top level of the package. Instead, we parse it from the22    file with a regex."""23    # Get version info from detectron2 __init__.py24    version_source = (Path(__file__).parents[2] / "detectron2" / "__init__.py").read_text()25    version_number = re.findall(r'__version__ = "([0-9\.]+)"', version_source)[0]26    return version_number27 28 29setup(30    name="detectron2-densepose",31    author="FAIR",32    version=get_detectron2_current_version(),33    url="https://github.com/facebookresearch/detectron2/tree/main/projects/DensePose",34    packages=find_packages(),35    python_requires=">=3.7",36    install_requires=[37        "av>=8.0.3",38        "detectron2@git+https://github.com/facebookresearch/detectron2.git",39        "opencv-python-headless>=4.5.3.56",40        "scipy>=1.5.4",41    ],42)43