I managed to get this up and running on a Jetson Nano a couple of months ago.
Coming back to it now everything has changed! 👍
I'm running both the front-end and the processor on the Nano. I have no experience with docker so was not sure how to get the two parts communicating, eventually I got something though. I detail the steps here just in case.
This seems to be good so far, I start getting the graph appearing in my browser when I visit 192.168.1.104:8000
.
However, the video feeds seem to buffer and stutter a lot. Furthermore, the birds-eye view and the video feed quickly become out-of-sync with one another. If I look back at the running processor I observe something along the following lines (which happens an awful lot):
INFO:libs.distancing:processed frame 3301 for /repo/data/softbio_vid.mp4
INFO:libs.distancing:processed frame 3401 for /repo/data/softbio_vid.mp4
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/uvicorn/protocols/http/h11_impl.py", line 389, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/usr/local/lib/python3.6/dist-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.6/dist-packages/fastapi/applications.py", line 181, in __call__
await super().__call__(scope, receive, send) # pragma: no cover
File "/usr/local/lib/python3.6/dist-packages/starlette/applications.py", line 111, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.6/dist-packages/starlette/middleware/errors.py", line 181, in __call__
raise exc from None
File "/usr/local/lib/python3.6/dist-packages/starlette/middleware/errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.6/dist-packages/starlette/middleware/cors.py", line 86, in __call__
await self.simple_response(scope, receive, send, request_headers=headers)
File "/usr/local/lib/python3.6/dist-packages/starlette/middleware/cors.py", line 142, in simple_response
await self.app(scope, receive, send)
File "/usr/local/lib/python3.6/dist-packages/starlette/exceptions.py", line 82, in __call__
raise exc from None
File "/usr/local/lib/python3.6/dist-packages/starlette/exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.6/dist-packages/starlette/routing.py", line 566, in __call__
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.6/dist-packages/starlette/routing.py", line 376, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.6/dist-packages/starlette/staticfiles.py", line 94, in __call__
await response(scope, receive, send)
File "/usr/local/lib/python3.6/dist-packages/starlette/responses.py", line 314, in __call__
"more_body": more_body,
File "/usr/local/lib/python3.6/dist-packages/starlette/exceptions.py", line 68, in sender
await send(message)
File "/usr/local/lib/python3.6/dist-packages/starlette/middleware/cors.py", line 148, in send
await send(message)
File "/usr/local/lib/python3.6/dist-packages/starlette/middleware/errors.py", line 156, in _send
await send(message)
File "/usr/local/lib/python3.6/dist-packages/uvicorn/protocols/http/h11_impl.py", line 483, in send
output = self.conn.send(event)
File "/usr/local/lib/python3.6/dist-packages/h11/_connection.py", line 469, in send
data_list = self.send_with_data_passthrough(event)
File "/usr/local/lib/python3.6/dist-packages/h11/_connection.py", line 502, in send_with_data_passthrough
writer(event, data_list.append)
File "/usr/local/lib/python3.6/dist-packages/h11/_writers.py", line 78, in __call__
self.send_data(event.data, write)
File "/usr/local/lib/python3.6/dist-packages/h11/_writers.py", line 98, in send_data
raise LocalProtocolError("Too much data for declared Content-Length")
h11._util.LocalProtocolError: Too much data for declared Content-Length
ERROR:uvicorn.error:Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/uvicorn/protocols/http/h11_impl.py", line 389, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/usr/local/lib/python3.6/dist-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.6/dist-packages/fastapi/applications.py", line 181, in __call__
await super().__call__(scope, receive, send) # pragma: no cover
File "/usr/local/lib/python3.6/dist-packages/starlette/applications.py", line 111, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.6/dist-packages/starlette/middleware/errors.py", line 181, in __call__
raise exc from None
File "/usr/local/lib/python3.6/dist-packages/starlette/middleware/errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.6/dist-packages/starlette/middleware/cors.py", line 86, in __call__
await self.simple_response(scope, receive, send, request_headers=headers)
File "/usr/local/lib/python3.6/dist-packages/starlette/middleware/cors.py", line 142, in simple_response
await self.app(scope, receive, send)
File "/usr/local/lib/python3.6/dist-packages/starlette/exceptions.py", line 82, in __call__
raise exc from None
File "/usr/local/lib/python3.6/dist-packages/starlette/exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.6/dist-packages/starlette/routing.py", line 566, in __call__
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.6/dist-packages/starlette/routing.py", line 376, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.6/dist-packages/starlette/staticfiles.py", line 94, in __call__
await response(scope, receive, send)
File "/usr/local/lib/python3.6/dist-packages/starlette/responses.py", line 314, in __call__
"more_body": more_body,
File "/usr/local/lib/python3.6/dist-packages/starlette/exceptions.py", line 68, in sender
await send(message)
File "/usr/local/lib/python3.6/dist-packages/starlette/middleware/cors.py", line 148, in send
await send(message)
File "/usr/local/lib/python3.6/dist-packages/starlette/middleware/errors.py", line 156, in _send
await send(message)
File "/usr/local/lib/python3.6/dist-packages/uvicorn/protocols/http/h11_impl.py", line 483, in send
output = self.conn.send(event)
File "/usr/local/lib/python3.6/dist-packages/h11/_connection.py", line 469, in send
data_list = self.send_with_data_passthrough(event)
File "/usr/local/lib/python3.6/dist-packages/h11/_connection.py", line 502, in send_with_data_passthrough
writer(event, data_list.append)
File "/usr/local/lib/python3.6/dist-packages/h11/_writers.py", line 78, in __call__
self.send_data(event.data, write)
File "/usr/local/lib/python3.6/dist-packages/h11/_writers.py", line 98, in send_data
raise LocalProtocolError("Too much data for declared Content-Length")
h11._util.LocalProtocolError: Too much data for declared Content-Length
My questions are; Is this expected behavior? Is the software not robust/mature enough at this stage? Is there something wrong with how I have configured the docker images or how I am running them? Is it the Nano which is just not powerful enough (e.g. in terms of pfs, or for running both processor and serving front-end)?
I only ask because I seem to recall that the simpler version I used some months back worked better for me. The front-end was super trivial, but it didn't suffer from these issues. I'm happy to roll back to that older version if required but first wanted to check this is not something that can be addressed.