summaryrefslogtreecommitdiff
path: root/python-das.spec
blob: 524dad5dbe254071923ce05730d86cc6a4e632d2 (plain)
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
%global _empty_manifest_terminate_build 0
Name:		python-das
Version:	0.30.0
Release:	1
Summary:	DAS
License:	None
URL:		https://github.com/janclemenslab/das
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/40/4f/ea2bd7979e95bb9dc3e904f0723ef68736d7ce5304a6049f4e1a1298b0d2/das-0.30.0.tar.gz
BuildArch:	noarch

Requires:	python3-numpy
Requires:	python3-h5py
Requires:	python3-scipy
Requires:	python3-scikit-learn
Requires:	python3-pyyaml
Requires:	python3-peakutils
Requires:	python3-zarr
Requires:	python3-flammkuchen
Requires:	python3-defopt
Requires:	python3-matplotlib
Requires:	python3-pandas
Requires:	python3-librosa
Requires:	python3-matplotlib
Requires:	python3-matplotlib_scalebar
Requires:	python3-colorcet
Requires:	python3-keras-tuner
Requires:	python3-kt-legacy
Requires:	python3-rich

%description
<!-- [![Test install](https://github.com/janclemenslab/das/actions/workflows/main.yml/badge.svg)](https://github.com/janclemenslab/das/actions/workflows/main.yml) -->

# Deep Audio Segmenter
_DAS_ is a method for automatically annotating song from raw audio recordings based on a deep neural network. _DAS_ can be used with a graphical user interface, from the terminal, or from within python scripts.

If you have questions, feedback, or find bugs please raise an [issue](https://github.com/janclemenslab/das/issues).

Please cite _DAS_ as:

Elsa Steinfath, Adrian Palacios, Julian Rottschäfer, Deniz Yuezak, Jan Clemens (2021).
_Fast and accurate annotation of acoustic signals with deep neural networks._
[eLife](https://doi.org/10.7554/eLife.68837)

## Installation
### Pre-requisites


__Anaconda__: _DAS_ is installed using an anaconda environment. For that, first install the [anaconda python distribution](https://docs.anaconda.com/anaconda/install/) (or [miniconda](https://docs.conda.io/en/latest/miniconda.html)).

If you have conda already installed, make sure you have conda v4.8.4+. If not, update from an older version with `conda update conda`.

<!-- ```shell
curl https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh
sh miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
``` -->
<!--
__CUDA libraries for using the GPU__: While _DAS_ works well for annotating song using the CPU, a GPU will greatly improve annotation speed and is recommended for training a _DAS_ network. The network is implemented in the deep-learning framework Tensorflow. To make sure that Tensorflow can use your GPU, the required CUDA libraries need to be installed. See the [tensorflow docs](https://www.tensorflow.org/install/gpu) for details. -->

__Libsoundfile on linux__: The graphical user interface (GUI) reads audio data using [soundfile](http://pysoundfile.readthedocs.io/), which relies on `libsndfile`. `libsndfile` will be automatically installed on Windows and macOS. On Linux, the library needs to be installed manually with: `sudo apt-get install libsndfile1`. Note that _DAS_ will work w/o `libsndfile` but will not be able to load exotic audio formats.

### Install _DAS_
Create an anaconda environment called `das` that contains all the required packages:
```shell
conda install mamba -c conda-forge -n base -y
mamba create python=3.9 das -c conda-forge -c ncb -c anaconda -c nvidia -n das -y
```

For linux, the last line needs to be:
```shell
CONDA_OVERRIDE_CUDA=11.2 mamba create python=3.9 das -c conda-forge -c ncb -c anaconda -c nvidia -n das -y
```

## Usage
To start the graphical user interface:
```shell
conda activate das
das gui
```

The documentation at [https://janclemenslab.org/das/](https://janclemenslab.org/das/) provides information on the usage of _DAS_:

- A [quick start tutorial](https://janclemenslab.org/das/quickstart.html) walks through all steps from manually annotating song, over training a network, to generating new annotations.
- How to use the [graphical user interface](https://janclemenslab.org/das/tutorials_gui/tutorials_gui.html).
- How to use _DAS_ [from the terminal or from python scripts](https://janclemenslab.org/das/tutorials/tutorials.html).



## Acknowledgements
The following packages were modified and integrated into das:

- Keras implementation of TCN models modified from [keras-tcn](https://github.com/philipperemy/keras-tcn) (in `das.tcn`)
- Trainable STFT layer implementation modified from [kapre](https://github.com/keunwoochoi/kapre) (in `das.kapre`)

See the sub-module directories for the original READMEs.


%package -n python3-das
Summary:	DAS
Provides:	python-das
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-das
<!-- [![Test install](https://github.com/janclemenslab/das/actions/workflows/main.yml/badge.svg)](https://github.com/janclemenslab/das/actions/workflows/main.yml) -->

# Deep Audio Segmenter
_DAS_ is a method for automatically annotating song from raw audio recordings based on a deep neural network. _DAS_ can be used with a graphical user interface, from the terminal, or from within python scripts.

If you have questions, feedback, or find bugs please raise an [issue](https://github.com/janclemenslab/das/issues).

Please cite _DAS_ as:

Elsa Steinfath, Adrian Palacios, Julian Rottschäfer, Deniz Yuezak, Jan Clemens (2021).
_Fast and accurate annotation of acoustic signals with deep neural networks._
[eLife](https://doi.org/10.7554/eLife.68837)

## Installation
### Pre-requisites


__Anaconda__: _DAS_ is installed using an anaconda environment. For that, first install the [anaconda python distribution](https://docs.anaconda.com/anaconda/install/) (or [miniconda](https://docs.conda.io/en/latest/miniconda.html)).

If you have conda already installed, make sure you have conda v4.8.4+. If not, update from an older version with `conda update conda`.

<!-- ```shell
curl https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh
sh miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
``` -->
<!--
__CUDA libraries for using the GPU__: While _DAS_ works well for annotating song using the CPU, a GPU will greatly improve annotation speed and is recommended for training a _DAS_ network. The network is implemented in the deep-learning framework Tensorflow. To make sure that Tensorflow can use your GPU, the required CUDA libraries need to be installed. See the [tensorflow docs](https://www.tensorflow.org/install/gpu) for details. -->

__Libsoundfile on linux__: The graphical user interface (GUI) reads audio data using [soundfile](http://pysoundfile.readthedocs.io/), which relies on `libsndfile`. `libsndfile` will be automatically installed on Windows and macOS. On Linux, the library needs to be installed manually with: `sudo apt-get install libsndfile1`. Note that _DAS_ will work w/o `libsndfile` but will not be able to load exotic audio formats.

### Install _DAS_
Create an anaconda environment called `das` that contains all the required packages:
```shell
conda install mamba -c conda-forge -n base -y
mamba create python=3.9 das -c conda-forge -c ncb -c anaconda -c nvidia -n das -y
```

For linux, the last line needs to be:
```shell
CONDA_OVERRIDE_CUDA=11.2 mamba create python=3.9 das -c conda-forge -c ncb -c anaconda -c nvidia -n das -y
```

## Usage
To start the graphical user interface:
```shell
conda activate das
das gui
```

The documentation at [https://janclemenslab.org/das/](https://janclemenslab.org/das/) provides information on the usage of _DAS_:

- A [quick start tutorial](https://janclemenslab.org/das/quickstart.html) walks through all steps from manually annotating song, over training a network, to generating new annotations.
- How to use the [graphical user interface](https://janclemenslab.org/das/tutorials_gui/tutorials_gui.html).
- How to use _DAS_ [from the terminal or from python scripts](https://janclemenslab.org/das/tutorials/tutorials.html).



## Acknowledgements
The following packages were modified and integrated into das:

- Keras implementation of TCN models modified from [keras-tcn](https://github.com/philipperemy/keras-tcn) (in `das.tcn`)
- Trainable STFT layer implementation modified from [kapre](https://github.com/keunwoochoi/kapre) (in `das.kapre`)

See the sub-module directories for the original READMEs.


%package help
Summary:	Development documents and examples for das
Provides:	python3-das-doc
%description help
<!-- [![Test install](https://github.com/janclemenslab/das/actions/workflows/main.yml/badge.svg)](https://github.com/janclemenslab/das/actions/workflows/main.yml) -->

# Deep Audio Segmenter
_DAS_ is a method for automatically annotating song from raw audio recordings based on a deep neural network. _DAS_ can be used with a graphical user interface, from the terminal, or from within python scripts.

If you have questions, feedback, or find bugs please raise an [issue](https://github.com/janclemenslab/das/issues).

Please cite _DAS_ as:

Elsa Steinfath, Adrian Palacios, Julian Rottschäfer, Deniz Yuezak, Jan Clemens (2021).
_Fast and accurate annotation of acoustic signals with deep neural networks._
[eLife](https://doi.org/10.7554/eLife.68837)

## Installation
### Pre-requisites


__Anaconda__: _DAS_ is installed using an anaconda environment. For that, first install the [anaconda python distribution](https://docs.anaconda.com/anaconda/install/) (or [miniconda](https://docs.conda.io/en/latest/miniconda.html)).

If you have conda already installed, make sure you have conda v4.8.4+. If not, update from an older version with `conda update conda`.

<!-- ```shell
curl https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh
sh miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
``` -->
<!--
__CUDA libraries for using the GPU__: While _DAS_ works well for annotating song using the CPU, a GPU will greatly improve annotation speed and is recommended for training a _DAS_ network. The network is implemented in the deep-learning framework Tensorflow. To make sure that Tensorflow can use your GPU, the required CUDA libraries need to be installed. See the [tensorflow docs](https://www.tensorflow.org/install/gpu) for details. -->

__Libsoundfile on linux__: The graphical user interface (GUI) reads audio data using [soundfile](http://pysoundfile.readthedocs.io/), which relies on `libsndfile`. `libsndfile` will be automatically installed on Windows and macOS. On Linux, the library needs to be installed manually with: `sudo apt-get install libsndfile1`. Note that _DAS_ will work w/o `libsndfile` but will not be able to load exotic audio formats.

### Install _DAS_
Create an anaconda environment called `das` that contains all the required packages:
```shell
conda install mamba -c conda-forge -n base -y
mamba create python=3.9 das -c conda-forge -c ncb -c anaconda -c nvidia -n das -y
```

For linux, the last line needs to be:
```shell
CONDA_OVERRIDE_CUDA=11.2 mamba create python=3.9 das -c conda-forge -c ncb -c anaconda -c nvidia -n das -y
```

## Usage
To start the graphical user interface:
```shell
conda activate das
das gui
```

The documentation at [https://janclemenslab.org/das/](https://janclemenslab.org/das/) provides information on the usage of _DAS_:

- A [quick start tutorial](https://janclemenslab.org/das/quickstart.html) walks through all steps from manually annotating song, over training a network, to generating new annotations.
- How to use the [graphical user interface](https://janclemenslab.org/das/tutorials_gui/tutorials_gui.html).
- How to use _DAS_ [from the terminal or from python scripts](https://janclemenslab.org/das/tutorials/tutorials.html).



## Acknowledgements
The following packages were modified and integrated into das:

- Keras implementation of TCN models modified from [keras-tcn](https://github.com/philipperemy/keras-tcn) (in `das.tcn`)
- Trainable STFT layer implementation modified from [kapre](https://github.com/keunwoochoi/kapre) (in `das.kapre`)

See the sub-module directories for the original READMEs.


%prep
%autosetup -n das-0.30.0

%build
%py3_build

%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
	find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-das -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Tue May 30 2023 Python_Bot <Python_Bot@openeuler.org> - 0.30.0-1
- Package Spec generated