Enhances construction site safety using YOLO for object detection, identifying hazards like workers without helmets or safety vests, and proximity to machinery or vehicles. HDBSCAN clusters safety cone coordinates to create monitored zones. Post-processing algorithms improve detection accuracy.
The Pull Request introduces a feature for streaming from YouTube videos. It includes changes to the Dockerfile, the addition of a docker-compose.yml file, modifications to the run_server.sh script, and updates to the src/stream_capture.py file to improve frame capture from streams.
The Dockerfile has been updated to install system dependencies like gcc and g++, and the exposed port has been changed from 80 to 8000 and 8001 for the Gunicorn servers. The CMD directive has been updated to serve as a placeholder since docker-compose will be used to run the container.
A new docker-compose.yml file has been added to define services for a MySQL database, a model server, a stream web application, and the main application. It sets up the necessary environment variables, ports, volumes, and dependencies between services.
The run_server.sh script has been modified to start the Gunicorn server for the Model API and the Stream Web app, with a sleep interval to ensure proper startup.
In src/stream_capture.py, the capture_frames and capture_youtube_frames methods have been updated to reduce latency by setting the buffer size to 1 and to manage frame rate by skipping frames.
Suggestion
Ensure that the Dockerfile and docker-compose.yml are optimized for production use, including security best practices for handling environment variables and secrets.
Consider adding comments to the docker-compose.yml file to explain the purpose of each service and their configuration for better maintainability.
Verify that the sleep intervals in the run_server.sh script are sufficient for the services to start properly and adjust if necessary.
Test the frame skipping logic in src/stream_capture.py to ensure it does not negatively impact the quality of the stream capture.
It might be beneficial to parameterize the number of frames to skip in src/stream_capture.py to allow for easy adjustments based on different stream qualities or requirements.
PR summary
The Pull Request introduces a feature for streaming from YouTube videos. It includes changes to the Dockerfile, the addition of a docker-compose.yml file, modifications to the run_server.sh script, and updates to the src/stream_capture.py file to improve frame capture from streams.
The Dockerfile has been updated to install system dependencies like gcc and g++, and the exposed port has been changed from 80 to 8000 and 8001 for the Gunicorn servers. The CMD directive has been updated to serve as a placeholder since docker-compose will be used to run the container.
A new docker-compose.yml file has been added to define services for a MySQL database, a model server, a stream web application, and the main application. It sets up the necessary environment variables, ports, volumes, and dependencies between services.
The run_server.sh script has been modified to start the Gunicorn server for the Model API and the Stream Web app, with a sleep interval to ensure proper startup.
In src/stream_capture.py, the capture_frames and capture_youtube_frames methods have been updated to reduce latency by setting the buffer size to 1 and to manage frame rate by skipping frames.
Suggestion