abreza commited on
Commit
f8d1797
1 Parent(s): 7174f3a

add setup in runtime

Browse files
Files changed (1) hide show
  1. app.py +49 -0
app.py CHANGED
@@ -10,6 +10,55 @@ import requests
10
  import csv
11
  import spaces
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
  def plot_feats(image, lr, hr):
15
  assert len(image.shape) == len(lr.shape) == len(hr.shape) == 3
 
10
  import csv
11
  import spaces
12
 
13
+ from setuptools import setup, find_packages
14
+ from torch.utils.cpp_extension import BuildExtension, CUDAExtension, CppExtension
15
+
16
+ setup(
17
+ name='featup',
18
+ version='0.1.2',
19
+ packages=find_packages(),
20
+ install_requires=[
21
+ 'torch',
22
+ 'kornia',
23
+ 'omegaconf',
24
+ 'pytorch-lightning',
25
+ 'torchvision',
26
+ 'tqdm',
27
+ 'torchmetrics',
28
+ 'scikit-learn',
29
+ 'numpy',
30
+ 'matplotlib',
31
+ 'timm==0.4.12',
32
+ ],
33
+ author='Mark Hamilton, Stephanie Fu',
34
+ author_email='markth@mit.edu, fus@berkeley.edu',
35
+ description='Official code for "FeatUp: A Model-Agnostic Frameworkfor Features at Any Resolution" ICLR 2024',
36
+ long_description=open('README.md').read(),
37
+ long_description_content_type='text/markdown',
38
+ url='https://github.com/mhamilton723/FeatUp',
39
+ classifiers=[
40
+ 'Programming Language :: Python :: 3',
41
+ 'License :: OSI Approved :: MIT License',
42
+ 'Operating System :: OS Independent',
43
+ ],
44
+ python_requires='>=3.6',
45
+ ext_modules=[
46
+ CUDAExtension(
47
+ 'adaptive_conv_cuda_impl',
48
+ [
49
+ 'featup/adaptive_conv_cuda/adaptive_conv_cuda.cpp',
50
+ 'featup/adaptive_conv_cuda/adaptive_conv_kernel.cu',
51
+ ]),
52
+ CppExtension(
53
+ 'adaptive_conv_cpp_impl',
54
+ ['featup/adaptive_conv_cuda/adaptive_conv.cpp'],
55
+ undef_macros=["NDEBUG"]),
56
+ ],
57
+ cmdclass={
58
+ 'build_ext': BuildExtension
59
+ }
60
+ )
61
+
62
 
63
  def plot_feats(image, lr, hr):
64
  assert len(image.shape) == len(lr.shape) == len(hr.shape) == 3