-
Notifications
You must be signed in to change notification settings - Fork 45
/
setup.py
executable file
·94 lines (81 loc) · 2.78 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/env python
from importlib.metadata import PackageNotFoundError, version
from setuptools import find_packages, setup
CUR_DFC_VERSION = "3.29.0"
package_name = "hailo-dataflow-compiler"
try:
dfc_version = version(package_name)
if dfc_version != CUR_DFC_VERSION:
print(
f"Warning! The current version of the Dataflow Compiler is {dfc_version}.\n"
f"Current Hailo-Model-Zoo works best with DFC version {CUR_DFC_VERSION}. Please consider updating your DFC"
)
except PackageNotFoundError:
raise PackageNotFoundError(
f"\nThe Dataflow Compiler package {package_name!r} was not found.\n"
f"Please verify working in the correct virtualenv.\n"
f"If you are not an Hailo customer, please visit us at https://hailo.ai/"
) from None
try:
import cpuinfo
cpu_flags = cpuinfo.get_cpu_info()["flags"]
except Exception:
cpu_flags = None
print("Warning! Unable to query CPU for the list of supported features.")
if cpu_flags is not None and "avx" not in cpu_flags:
print("""
This CPU does not support `avx` instructions, and they are needed to run Tensorflow.
It is recommended to run the Dataflow Compiler on another host.
Another option is to compile Tensorflow from sources without `avx` instructions.
""")
def main():
reqs = [
"numba",
"imageio==2.9.0",
"matplotlib",
"numpy",
"opencv-python",
"scipy",
"scikit-learn",
"termcolor",
"tqdm",
"pycocotools",
"lap==0.4.0",
"motmetrics==1.2.5",
"omegaconf==2.3.0",
"pillow<=9.2.0",
"detection-tools==0.3",
"scikit-image==0.19.3",
"nuscenes-devkit==1.1.10",
]
model_zoo_version = "2.13.0"
package_data = {
"hailo_model_zoo": [
"cfg/base/*.yaml",
"cfg/networks/*.yaml",
"cfg/alls/**/*.alls",
"datasets/*",
"cfg/multi-networks/*.yaml",
"cfg/multi-networks/*.yaml",
"core/postprocessing/*.json",
"core/postprocessing/src/*.cc",
"core/postprocessing/cython_utils/cython_nms.pyx",
"core/eval/widerface_evaluation_external/box_overlaps.pyx",
]
}
setup(
name="hailo_model_zoo",
version=model_zoo_version,
description="Hailo machine learning utilities and examples",
url="https://hailo.ai/",
author="Hailo team",
author_email="hailo_model_zoo@hailo.ai",
entry_points={"console_scripts": ["hailomz=hailo_model_zoo.main:main"]},
license="MIT",
packages=find_packages(),
install_requires=reqs,
zip_safe=False,
package_data=package_data,
)
if __name__ == "__main__":
main()