Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Safety Vision Video Processor

This is a simple video processor that reads a video file and processes it frame by frame. The frames are analyzed as a sequence by GPT to detect potential safety issues.

Setup

  1. Requirements

    • PHP 8.3
    • Ffmpeg
    • OpenAI API key
  2. Installation

    git clone git@github.com:chr-hertel/video-processor.git
    cd video-processor
    composer install
  3. Configuration

    Copy the .env file to .env.local and set the OPENAI_API_KEY variable to your OpenAI API key.

  4. Usage

    ./video-processor [--frame-delta=5]

Example Output

  • House Lifting analyzed with a frame delta of 5 seconds:

    The sequence captures a construction site involving multiple workers engaged in brickwork over a short time span of 15 seconds.

    Key findings indicate:

    1. Lack of Personal Protective Equipment (PPE): Throughout the sequence, workers are consistently seen without hard hats and safety glasses, exposing them to significant risks from potential falling debris and other hazards.

    2. Unsafe Working Conditions: The area remains cluttered with bricks and debris, which poses tripping hazards. This clutter, combined with workers being positioned near the edge of the work area without barriers, exacerbates the risk
      of falls.

    3. Improper Handling of Tools: Although there are slight improvements in tool use over the frames, several workers still lack proper technique, raising concerns about potential injuries.

    4. Structural Instability: In the earlier frames, the upper structure appears inadequately supported, which raises alarm about potential collapse risks while workers are actively working underneath.

    5. Quality of Environment: The final frame's blurriness suggests a chaotic environment, which could lead to unsafe conditions if workers are distracted or unable to clearly see their surroundings.

    Overall, there is clear evidence of multiple violations and unsafe situations, particularly evident within the first 10 to 15 seconds of the sequence, highlighting serious risks to worker safety that need urgent remediation.

  • Construction Work analyzed with a frame delta of 10 seconds:

    In the sequence observed over a span of 60 seconds, several critical findings related to safety on the construction
    site are evident:

    1. Cutting Operations: Initial frames show a worker using a cutting tool while standing on an unstable surface (the narrow metal piece) after just 10 seconds into the sequence. This creates a high risk of slips and falls, compounded by loose materials on the ground.

    2. Inadequate PPE: Throughout the sequence, it is apparent that not all workers are wearing the necessary personal protective equipment (PPE), especially hard hats. This is particularly concerning in the vicinity of machinery where
      the risk of injury is heightened, noted by 50 to 60 seconds into the sequence.

    3. Proximity to Heavy Machinery: Multiple workers are seen close to operating machinery without maintaining a safe distance, raising the risk of accidents. This proximity without adequate precautions was notable throughout the
      sequence, especially during the discussions among the workers at the 50-second mark.

    4. Worksite Organization: The site remains cluttered with tools and materials, increasing the risk of trips and
      falls. This disorganization was present throughout the observation period, particularly evident around 40 to 60
      seconds.

    5. Distraction During Operations: Workers engaging in conversations near active machinery indicated a lack of focus on safety protocols, which was especially prominent between 50 to 60 seconds into the sequence.

    Overall, there are clear violations and unsafe situations identified, primarily concerning the handling of tools, PPE
    compliance, proximity to heavy machinery, and poor site organization. These factors collectively contribute to a
    hazardous work environment that demands immediate attention and corrective actions.

  • Chrysler Builder 1900 analyzed with a frame delta of 45 seconds:

    The sequence highlights a series of unsafe working conditions observed at a construction site, spanning 18 frames over a duration of approximately 765 seconds. Throughout the sequence, numerous workers are seen performing tasks at
    significant heights without adequate fall protection measures.

    Key findings include:

    1. Lack of Fall Protection: At no point were workers observed using safety harnesses, guardrails, or safety nets,
      despite being positioned on scaffolding and at the edges of high structures. This absence of safety measures poses a
      severe risk for falls, which is evident from the very first frame where a worker is seated on a steel beam at
      approximately zero seconds and continues throughout the sequence.

    2. Precarious Working Conditions: Several workers were seen climbing and maneuvering in precarious positions, often appearing distracted or focused on their tasks rather than their surroundings. For example, at around 720 seconds, a
      worker is climbing without securing themselves, further highlighting the unsafe practices prevalent during the
      operation.

    3. Environmental Hazards: The visibility issues due to haze persisted throughout the frames, exacerbating the risks associated with working at height. This factor could impair the workers' awareness and ability to react to potential
      hazards, compounding the already unsafe working conditions.

    The overall sequence indicates clear violations of safety protocols and a disregard for basic safety standards, which
    could lead to serious accidents or injuries. Immediate corrective actions are essential to mitigate these risks and
    ensure a safer working environment.

  • Olympia Looping Documentation analyzed with a frame delta of 90 seconds:

    In the analyzed sequence of video frames from an amusement park, various activities related to construction,
    maintenance, and operational tasks were observed. The first half of the sequence depicted individuals engaged in
    preparations and maintenance of rides, with some safety concerns arising from the lack of personal protective equipment (PPE) among workers, particularly in frames 6, 8, and 11.

    Notably, frames 6 and 8 showed workers handling equipment without adequate safety gear, which could lead to potential
    injuries. By frame 11, a worker was seen at a significant height on the roller coaster, raising additional concerns
    about fall protection measures not being clearly demonstrated.

    As the sequence progressed, an emergency response was indicated in frame 12, suggesting a serious incident had
    occurred, which shifted focus from regular operations to crisis management.

    The final frames transitioned back to a busy park scene, highlighting the importance of crowd safety and management
    following the incident.

    Overall, the video captures a range of safety practices, with clear violations noted primarily in the handling of tasks without proper safety equipment and the lack of fall protection for workers at height. The elapsed time of 18 minutes
    (1080 seconds) provided insight into ongoing operational concerns leading up to an emergency situation, necessitating a thorough review of safety compliance on site.

  • Crane Collapse analyzed with a frame delta of 3 seconds:

    During the sequence of video frames captured over approximately 27 seconds, several key observations were made
    regarding safety practices at the construction site.

    1. Proximity of Workers to Lifting Operations: Throughout the video, multiple workers were consistently observed in close proximity to the concrete panel being lifted. This presents a significant safety violation, particularly noted as early as frame 1 (0 seconds) and continuing through frames 2, 3, and 4 (up to 12 seconds). Workers were not maintaining a safe distance from the load, increasing the risk of injury in case of an unstable lift.

    2. Ground Conditions: The concrete surface appeared wet, posing a slip hazard for workers throughout the sequence. This concern was present from frame 1 (0 seconds) and persisted until the last frame (27 seconds), indicating a
      continuous risk that was not addressed.

    3. Lack of Visual Monitoring: Frames 7, 8, 9, and 10 (from 18 to 27 seconds) all suffered from significant
      visibility issues, limiting the ability to assess ongoing safety conditions or active lifting operations effectively.
      This lack of visibility further compounds the risks, as workers may become unaware of hazards.

    In summary, significant safety violations were evident, particularly regarding worker positioning near the lifting
    operation and hazardous ground conditions. Immediate corrective actions are necessary to ensure safety compliance
    on-site, as these issues persisted throughout the sequence.

About

Small app to slice video into frames to get them analyzed

Resources

Stars

Watchers

Forks

Used by

Contributors

Languages