VishalD1234 commited on
Commit
df1bbd1
·
verified ·
1 Parent(s): 935353c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -35
app.py CHANGED
@@ -111,46 +111,12 @@ Task Context:
111
  You are analyzing video footage from Step {step_number} of a tire manufacturing process where a delay has been detected. Your task is to determine the most likely cause of the delay from the following possible reasons:
112
  {', '.join(possible_reasons)}
113
  Required Analysis:
114
- Carefully observe the video for visual cues indicating production interruption.Analyse frames and contours around the object.
115
  If no person is visible in any of the frames, the reason probably might be due to his absence.
116
  If a person is visible in the video and is observed touching and modifying the layers of the tire, it means there is a issue with tyre being patched hence he is repatching it.
117
  Compare observed evidence against each possible delay reason.
118
  Select the most likely reason based on visual evidence.
119
 
120
- 1. Contour Detection and Annotation
121
- Detect contours around machinery and objects in each frame using OpenCV.
122
- Assign specific contours to different manufacturing steps (e.g., bead placement machine, ply machine).
123
- Label contours with the corresponding manufacturing step (e.g., Step 1: Bead Insertion).
124
- 2. Time Analysis for Each Step
125
- Extract timestamps for when objects (e.g., beads, inner liner, ply) enter and exit the area of interest for each step.
126
- Measure the duration spent in each step by comparing these timestamps.
127
- 3. Standard Time Validation
128
- Compare the observed duration against the standard times provided for each step.
129
- Highlight steps where the duration exceeds the standard time.
130
- 4. Delay Diagnostics
131
- For steps exceeding the standard time, log potential causes based on specific analyses:
132
- Bead Insertion: Detect missing beads or pauses in technician/machine movement.
133
- Inner Liner Apply: Observe for manual adjustments indicating alignment issues.
134
- Ply1 Apply: Track object positioning and machine alignment changes.
135
- Bead Set: Monitor bead alignment and machine operation pauses.
136
- Turnup: Look for interruptions in material application.
137
- Sidewall Apply & Stitching: Check for excessive handling or speed fluctuations.
138
- Carcass Unload: Track technician presence and delays in object removal.
139
- 5. Trajectory and Movement Analysis
140
- Use object tracking algorithms to monitor the movement of objects and machinery across frames.
141
- Correlate motion paths with the expected operational flow of each step to identify inefficiencies or anomalies.
142
- 6. Visualization
143
- Annotate frames with contours, timestamps, and detected delays for each step.
144
- Save annotated videos for further review.
145
- Generate summary charts showing step-wise delays, bottlenecks, and technician involvement.
146
- 7. Output Reports
147
- Provide a detailed log of delays with root-cause suggestions for each step.
148
- Include metrics like:
149
- Total delays per step.
150
- Percentage of delays exceeding the standard time.
151
- Frequency of technician or machine interventions.
152
-
153
-
154
  Please provide your analysis in the following format:
155
  1. Selected Reason: [State the most likely reason from the given options]
156
  2. Visual Evidence: [Describe specific visual cues that support your selection]
@@ -160,6 +126,7 @@ Please provide your analysis in the following format:
160
  Important: Base your analysis solely on visual evidence from the video. Focus on concrete, observable details rather than assumptions. Clearly state if no person or specific activity is observed."""
161
 
162
 
 
163
  # Load model globally
164
  model, tokenizer = load_model()
165
 
 
111
  You are analyzing video footage from Step {step_number} of a tire manufacturing process where a delay has been detected. Your task is to determine the most likely cause of the delay from the following possible reasons:
112
  {', '.join(possible_reasons)}
113
  Required Analysis:
114
+ Carefully observe the video for visual cues indicating production interruption.Analyse frames and contours around the objects: 'h-stock_left','h-stock_right','conveyor1','conveyor2','compressor_metal','person','orange_roller_metal_left','orange_roller_metal_right','white_down_roller_left','white_down_roller_right','vaccum_blue'.
115
  If no person is visible in any of the frames, the reason probably might be due to his absence.
116
  If a person is visible in the video and is observed touching and modifying the layers of the tire, it means there is a issue with tyre being patched hence he is repatching it.
117
  Compare observed evidence against each possible delay reason.
118
  Select the most likely reason based on visual evidence.
119
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  Please provide your analysis in the following format:
121
  1. Selected Reason: [State the most likely reason from the given options]
122
  2. Visual Evidence: [Describe specific visual cues that support your selection]
 
126
  Important: Base your analysis solely on visual evidence from the video. Focus on concrete, observable details rather than assumptions. Clearly state if no person or specific activity is observed."""
127
 
128
 
129
+
130
  # Load model globally
131
  model, tokenizer = load_model()
132