Design of a back-end for a camera based person detection system
Legiest, Wouter (2019)
Legiest, Wouter
2019
Teknis-luonnontieteellinen DI-ohjelma - Degree Programme in Science and Engineering
Informaatioteknologian ja viestinnän tiedekunta - Faculty of Information Technology and Communication Sciences
This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Hyväksymispäivämäärä
2019-08-30
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:tuni-201908092857
https://urn.fi/URN:NBN:fi:tuni-201908092857
Tiivistelmä
In this thesis, a back-end web server is developed for the CityTrack project. The project uses modern Deep Learning techniques to provide object and people detection on embedded devices. By using multiple of these devices, detection nodes, statistical data can be collected about a certain venue or event. To expand this project, a web application is needed to visualise the data with the possibility to watch in real time. In addition to the web application, a central database should be established to provide long-time structured storage for the detection data.
To make well-considered choices, different technologies are discussed and weighed against each other. For instance, for the communication between the detection nodes and the web application, the HTTP-based REST architectural style and SOAP protocol are compared to the MQTT protocol. Furthermore, the real time capable communication technologies WebSocket, SeverSent Event and HTTP Long Polling is reviewed. The system uses the REST architectural style due to practical implementation reasons and WebSocket due to the limitations of the other alternatives. The layered architecture is then discussed to arrive at a proposal for a more modern version of the web architecture. The theoretical background and implementations of all components are then discussed. The advantages and disadvantages of each implementation are reviewed and a thoughtful choice was made.
To make a sustained choice, the performance of different WSGI server implementations are tested. A WSGI server is an interface between a web server and a Python-based framework. The ApacheBench stress testing tool examines different aspects of the performance. The result is that the uWSGI server performs the best on both latency and throughput aspect compared to the other candidates tested.
Also, the performance of the various implementations of ASGI server has been tested analogously. An ASGI interface is a superset of WSGI with additional support for asynchronous communication technologies. Implementations of the ASGI interface are tested on the WSGI functionalities. In this way, it is investigated whether the current implementation of ASGI could replace the WSGI server. The results show that the current implementations of various ASGI servers underperform to replace a WSGI server.
To make well-considered choices, different technologies are discussed and weighed against each other. For instance, for the communication between the detection nodes and the web application, the HTTP-based REST architectural style and SOAP protocol are compared to the MQTT protocol. Furthermore, the real time capable communication technologies WebSocket, SeverSent Event and HTTP Long Polling is reviewed. The system uses the REST architectural style due to practical implementation reasons and WebSocket due to the limitations of the other alternatives. The layered architecture is then discussed to arrive at a proposal for a more modern version of the web architecture. The theoretical background and implementations of all components are then discussed. The advantages and disadvantages of each implementation are reviewed and a thoughtful choice was made.
To make a sustained choice, the performance of different WSGI server implementations are tested. A WSGI server is an interface between a web server and a Python-based framework. The ApacheBench stress testing tool examines different aspects of the performance. The result is that the uWSGI server performs the best on both latency and throughput aspect compared to the other candidates tested.
Also, the performance of the various implementations of ASGI server has been tested analogously. An ASGI interface is a superset of WSGI with additional support for asynchronous communication technologies. Implementations of the ASGI interface are tested on the WSGI functionalities. In this way, it is investigated whether the current implementation of ASGI could replace the WSGI server. The results show that the current implementations of various ASGI servers underperform to replace a WSGI server.