Skip to content

Commit 967d3b6

Browse files
committed
Update README.md
1 parent 8bd1b5d commit 967d3b6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ You can disable auto-start using:
9898
## Deepstack, Home Assistant & UI
9999
This API can be used as a drop in replacement for [deepstack object detection](https://github.com/robmarkcole/HASS-Deepstack-object) and [deepstack face detection](https://github.com/robmarkcole/HASS-Deepstack-face) (configuring `detect_only: True`) in Home Assistant. I also created a UI for viewing the predictions of the object detection model [here](https://github.com/robmarkcole/deepstack-ui).
100100

101+
## FastAPI vs Flask
102+
The master branch is using FastAPI whilst I am also maintaining a Flask branch. FastAPI offers a few nice features like less boilerplate code and auto generated docs. FastAPI is also widely considered to be faster than Flask, but my own testing (below) shows this not to be the case (benchmarking notebook [here](https://github.com/robmarkcole/deepstack-analytics/blob/master/speedtest.ipynb)).
103+
104+
| Platform | Speed | Number of predictions |
105+
| :----------------------------------- | :---: | --------------------: |
106+
| Mac Pro with tflite-server (fastapi) | 2.2 | 178 |
107+
| Mac Pro with tflite-server (flask) | 2.1 | 176 |
108+
| RPi4 with tflite-server (fastapi) | 14 | 176 |
109+
| RPi4 with tflite-server (flask) | 11.8 | 159 |
110+
101111
## Development
102112
I am developing on a mac/pi4 using VScode, with black formatting & line length 120.
103113

0 commit comments

Comments
 (0)