Skip to content

Commit f490457

Browse files
committed
Update readme
1 parent e8a8511 commit f490457

File tree

4 files changed

+95
-68
lines changed

4 files changed

+95
-68
lines changed

README.md

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,41 @@
33
[![build status](http://img.shields.io/travis/robmarkcole/deepstack-python/master.svg?style=flat)](https://travis-ci.org/robmarkcole/deepstack-python)
44

55
# deepstack-python
6-
Unofficial python API for [DeepStack](https://python.deepstack.cc/). Provides class for making requests to the object detection endpoint, and functions for processing the result. See the Jupyter notebooks for usage.
7-
Run deepstack (CPU, noAVX mode):
6+
Unofficial python API for [DeepStack](https://python.deepstack.cc/). Provides classes for making requests to the object detection & face detection/recognition endpoints. Also includes some helper functions for processing the results. See the Jupyter notebooks for usage.
7+
8+
Run deepstack with all three endpoints active (CPU, noAVX mode):
9+
```
10+
docker run \
11+
-e VISION-SCENE=True \
12+
-e VISION-DETECTION=True \
13+
-e VISION-FACE=True \
14+
-v localstorage:/datastore \
15+
-p 5000:5000 \
16+
-e API-KEY="" \
17+
--name deepstack deepquestai/deepstack:noavx
18+
```
19+
Check deepstack is running using curl (from root of this repo):
20+
```
21+
curl -X POST -F image=@tests/images/test-image3.jpg 'http://localhost:5000/v1/vision/detection'
822
```
9-
docker run -e VISION-DETECTION=True -e VISION-FACE=True -e MODE=High -d \
10-
-v localstorage:/datastore -p 5000:5000 \
11-
-e API-KEY="Mysecretkey" \
12-
--name deepstack deepquestai/deepstack:noavx
23+
If all goes well you should see the following returned:
24+
```
25+
{"success":true,"predictions":[{"confidence":0.9998661,"label":"person","y_min":0,"x_min":258,"y_max":676,"x_max":485},{"confidence":0.9996547,"label":"person","y_min":0,"x_min":405,"y_max":652,"x_max":639},{"confidence":0.99745613,"label":"dog","y_min":311,"x_min":624,"y_max":591,"x_max":825}]}
1326
```
1427

1528
## Development
16-
* Use `venv` -> `source venv/bin/activate`
17-
* `pip install -r requirements-dev.txt`
29+
* Create venv -> `python3.7 -m venv venv`
30+
* Use venv -> `source venv/bin/activate`
31+
* `pip3 install -r requirements.txt` and `pip3 install -r requirements-dev.txt`
1832
* Run tests with `venv/bin/pytest tests/*`
1933
* Black format with `venv/bin/black deepstack/core.py` and `venv/bin/black tests/test_deepstack.py`
34+
35+
## Jupyter
36+
* Docs are created using Jupyter notebooks
37+
* Install in venv with -> `pip3 install jupyterlab`
38+
* Run -> `venv/bin/jupyter lab`
39+
40+
## Deployment to pypi
41+
* Generate requirements with -> `pip3 freeze > requirements.txt`
42+
* Create a distribution with -> `python3 setup.py sdist` (creates dist)
43+
* Upload packages with twine with -> `twine upload dist/*`

requirements-dev.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
pytest
22
black
3-
requests_mock
3+
requests_mock
4+
matplotlib

usage-face-recognition.ipynb

Lines changed: 35 additions & 33 deletions
Large diffs are not rendered by default.

usage-object-detection.ipynb

Lines changed: 26 additions & 26 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)