abreza commited on
Commit
6ac1aaf
1 Parent(s): f8d1797

move installation to top

Browse files
Files changed (1) hide show
  1. app.py +14 -36
app.py CHANGED
@@ -1,14 +1,5 @@
1
- import matplotlib.pyplot as plt
2
- import torch
3
- import torchvision.transforms as T
4
- from PIL import Image
5
- import gradio as gr
6
- from featup.util import norm, unnorm, pca, remove_axes
7
- from pytorch_lightning import seed_everything
8
- import os
9
- import requests
10
- import csv
11
- import spaces
12
 
13
  from setuptools import setup, find_packages
14
  from torch.utils.cpp_extension import BuildExtension, CUDAExtension, CppExtension
@@ -17,31 +8,6 @@ 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',
@@ -59,6 +25,18 @@ setup(
59
  }
60
  )
61
 
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
  def plot_feats(image, lr, hr):
64
  assert len(image.shape) == len(lr.shape) == len(hr.shape) == 3
 
1
+
2
+
 
 
 
 
 
 
 
 
 
3
 
4
  from setuptools import setup, find_packages
5
  from torch.utils.cpp_extension import BuildExtension, CUDAExtension, CppExtension
 
8
  name='featup',
9
  version='0.1.2',
10
  packages=find_packages(),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  ext_modules=[
12
  CUDAExtension(
13
  'adaptive_conv_cuda_impl',
 
25
  }
26
  )
27
 
28
+ import matplotlib.pyplot as plt
29
+ import torch
30
+ import torchvision.transforms as T
31
+ from PIL import Image
32
+ import gradio as gr
33
+ from featup.util import norm, unnorm, pca, remove_axes
34
+ from pytorch_lightning import seed_everything
35
+ import os
36
+ import requests
37
+ import csv
38
+ import spaces
39
+
40
 
41
  def plot_feats(image, lr, hr):
42
  assert len(image.shape) == len(lr.shape) == len(hr.shape) == 3