You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 12, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+42-2Lines changed: 42 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,8 @@ This repository provides the [keras](https://keras.io/) model to be used from Py
39
39
[Docker](https://www.docker.com/) makes it easy to reproduce the results and install all requirements. If you have docker installed, run the following steps to predict a count from the provided test sample.
40
40
41
41
* Build the docker image: `docker build -t countnet .`
42
-
* Predict from example: `docker run -i countnet python predict.py --model CRNN examples/5_speakers.wav`
42
+
* Run like this: `docker run -i countnet python predict.py ...` (see usage details below)
43
+
* Mount your data into the container: `docker run -v /path/to/your/data:/data -i countnet python predict.py ... /data/your_audio.wav`
43
44
44
45
### Manual Installation
45
46
@@ -49,7 +50,46 @@ To install the requirements using Anaconda Python, run
49
50
50
51
You can now run the command line script and process wav files using the pre-trained model `CRNN` (best peformance).
There is also a simple JSON API to send audio data to (not production ready; only for development!). To run the server:
67
+
68
+
```
69
+
python predict_api.py --model CRNN
70
+
71
+
# With Docker:
72
+
docker run -p5000:5000 -i countnet python predict_api.py --model CRNN
73
+
```
74
+
75
+
The server expects a JSON list of base64 encoded arrays of 16 kHz, float32 audio arrays. It returns a JSON list of integers. If estimation failed for any of the arrays, its result is set to `null` instead.
0 commit comments