Closed shirish100 closed 4 years ago
Sorry, I did not see your issue until today.
The database used is ElasticSearch.
There are multiple databases here: The cloud database stores info about the cloud data. Each office has its own database for office local data. They all connect together forming a big ES cluster as a distributed database for data replication (local data replicated to the cloud.)
Storage wise, it's similar. There is a cloud storage service, and each office has its own storage service. Recorded media files are stored in the office local storage first. Some of the data are uploaded, via the smart-upload service, to the cloud storage for permanent archival.
dbhost specifies the database URL while sthost specifies the storage manager URL. The database stores sensor information, analytics metadata information, and the URL of the camera recordings where the recordings are stored in the storage service.
https://github.com/OpenVisualCloud/Smart-City-Sample/wiki/Sample-Design
Thankyou @xwu2git for the detailed explanation.
I could map up the design with the code but left with few things to know.
Question 1) In "smtc_cloud_storage" (container) the ingested data is pushed back into dbhost which is already having the same data. i.e It sends a query to locate for the data and then ingest into same dbhost that has the same data ingested by other containers.
I have attached the image which has a comment in line number 129 which states of "copying local data to the cloud". But the ingest function uses the same dbhost.
Question 2)
We are trying to map the analytical data that is pushed into cloud and mp4 that is played. We could reach to the point where we could see the request being made for analytical data but the above question barrier could not help us understand frame-wise mapping of inferenced data.
We noticed that sometimes the object bounding box are drawn at the location after the object passes that location. i. e There is some amount of delay in drawing the bounding box
In the current sample design, the local and cloud db are connected together to form a big db cluster. Thus the difference between local vs. cloud is just different indexes. The local db index has a suffix "$
There are a few reasons that the bounding boxes might be lagging:
(1) The timestamp might be inaccurate on the metadata.
(2) Some recorded files might have a negative start_time. Different browsers handle negative start_time differently. Thus playback time "zero" may not always align correctly with a timestamp=0. We have compensated this problem for chrome, firefox and ie. But certain browsers may still show things a big differently. For example, see issue #290
(3) During an HTML5 playback, the "current" time is a rough estimation with an accuracy about 200ms. Thus overlaying analytics on top of video will have some mismatch within this range.
What kind of lagging do you see?
In the above images, you can see that the bounding box is drawn after the car is passed. So we were troubleshooting & find the root cause.
Will check into it. Most likely it's the timestamp mismatch between the recordings and the metadata.
Click on the setting button and change the Analytics Precision to 40ms (25fps as in the video). See if you get better latency. If so, this is a display issue. The analytics are calculated every 6th frame. The UI tries to smooth the gap by duplicating the results, which might result in the latency as you see.
Is it Chrome, Firefox or Edge? On Windows, Mac, or Linux?
Thank you for the solution. By changing analytics precision to 40ms improved the results. I'm using Chrome and Firefox to visualize & building the application on Linux OS.
Good to know. So there needs a better smoothing algorithm at the UI side.
There are several questions related to how the data is being stored and fetched
1)I find that the data is ingested into the database (here dbhost) using index and office combined together. Example : 'http://db:9200/algorithms$45.539626$-122.929569/_doc' from detectobject.py
2) While ingesting the bulk data URL generated is 'http://db:9200/_bulk' . The ingesting data part consists of index: {"_index": "analytics$45.539626$-122.929569", "_type": "_doc"}.
3)Apart from all this same data is being transmitted (A copy of all data) is again being transmitted from upload.py file. The URL as generated is 'http://db:9200/_bulk'
Can you please clarify what dbhost actually specifies? What is database software being used? Is dbhost storage same as cloud storage? How is video being streamed during offline simulation?