cortictechnology / cep

CEP is a software platform designed for users that want to learn or rapidly prototype using standard A.I. components.
MIT License
166 stars 21 forks source link

Merging bug fixes and speed improvement from test branch to main branch #2

Closed michaelhwn closed 3 years ago

michaelhwn commented 3 years ago

Bug fixed:

  1. On a slow SD card, the CURT backend service will finish starting up much later than the CAIT frontend service. When this happens, if the user starts executing CAIT program without knowing the CURT backend hasn't started, an "Undefined" error appears as an alert box. To fix this, we implemented a waiting procedure. The CAIT frontend will not start the program execution until it receives a message from the CURT backend, notifying it has fully started.

  2. Occasionally, the video stream in CAIT's visual programming interface freezes after the program is run for some time. This is because both the video streaming function in CAIT and the frame grabbing function in the user's program request frames from the CURT backend simultaneously. However, since MQTT can only retain one message at any time, sometimes the frame returning to the video streaming function was overwritten by the frame returning to the frame grabbing function, or vice versa. Therefore, we implemented a buffer to store all incoming results (frames in this situation) and assigned the results to the corresponding function in a later stage. This prevents the loss of any results from the backend.

Improvement:

  1. Bug fix 2 improved the speed of video stream and visual programming execution.