forked from weecology/DeepForest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
109 lines (84 loc) · 3.53 KB
/
setup.py
File metadata and controls
109 lines (84 loc) · 3.53 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
from setuptools import setup, find_packages
import setuptools
from setuptools.extension import Extension
from distutils.command.build_ext import build_ext as DistUtilsBuildExt
NAME ='deepforest'
VERSION = '0.3.8'
DESCRIPTION = 'Tree crown prediction using deep learning retinanets'
URL = 'https://github.com/Weecology/DeepForest'
AUTHOR = 'Ben Weinstein'
LICENCE = 'MIT'
LONG_DESCRIPTION = """
# Deepforest
## Full documentation
[http://deepforest.readthedocs.io/en/latest/](http://deepforest.readthedocs.io/en/latest/)
## Installation
Compiled wheels have been made for linux, osx and windows
```
#Install DeepForest
pip install DeepForest
```
Or install the latest version from Github
```
git clone https://github.com/weecology/DeepForest.git
conda env create --file=environment.yml
conda activate DeepForest
```
## Get in touch
See the [GitHub Repo](https://github.com/Weecology/deepforest) to see the
source code or submit issues and feature requests.
## Citation
If you use this software in your research please cite it as:
Geographic Generalization in Airborne RGB Deep Learning Tree Detection
Ben. G. Weinstein, Sergio Marconi, Stephanie A. Bohlman, Alina Zare, Ethan P. White
bioRxiv 790071; doi: https://doi.org/10.1101/790071
## Acknowledgments
Development of this software was funded by
[the Gordon and Betty Moore Foundation's Data-Driven Discovery Initiative](http://www.moore.org/programs/science/data-driven-discovery) through
[Grant GBMF4563](http://www.moore.org/grants/list/GBMF4563) to Ethan P. White.
"""
#DeepForest wraps of fork of keras-retinanet, see https://github.com/fizyr/keras-retinanet/blob/master/setup.py
class BuildExtension(setuptools.Command):
description = DistUtilsBuildExt.description
user_options = DistUtilsBuildExt.user_options
boolean_options = DistUtilsBuildExt.boolean_options
help_options = DistUtilsBuildExt.help_options
def __init__(self, *args, **kwargs):
from setuptools.command.build_ext import build_ext as SetupToolsBuildExt
# Bypass __setatrr__ to avoid infinite recursion.
self.__dict__['_command'] = SetupToolsBuildExt(*args, **kwargs)
def __getattr__(self, name):
return getattr(self._command, name)
def __setattr__(self, name, value):
setattr(self._command, name, value)
def initialize_options(self, *args, **kwargs):
return self._command.initialize_options(*args, **kwargs)
def finalize_options(self, *args, **kwargs):
ret = self._command.finalize_options(*args, **kwargs)
import numpy
self.include_dirs.append(numpy.get_include())
return ret
def run(self, *args, **kwargs):
return self._command.run(*args, **kwargs)
extensions = [
Extension(
'deepforest.keras_retinanet.utils.compute_overlap',
['deepforest/keras_retinanet/utils/compute_overlap.pyx']
),
]
setup(name=NAME,
version=VERSION,
python_requires='>3.5',
description=DESCRIPTION,
long_description = LONG_DESCRIPTION,
long_description_content_type='text/markdown',
url=URL,
author=AUTHOR,
license=LICENCE,
packages=find_packages(),
include_package_data=True,
cmdclass = {'build_ext': BuildExtension},
install_requires=["tensorflow==1.14.0","keras==2.3.0","keras-resnet==0.1.0","h5py==2.10.0","matplotlib","opencv-python","Pillow","pandas","pyyaml>5.1.0","progressbar2","six","scipy","slidingwindow","tqdm","xmltodict"],
ext_modules = extensions,
setup_requires = ["cython>=0.28", "numpy>=1.14.0"],
zip_safe=False)