debug: Remove emojis and add debug info for FPS calculation
- Remove all emojis from terminal output formatting for cleaner display - Add debug print statement to track pipeline.get_current_fps() values - Change FPS display to "Pipeline FPS (Output Queue)" for clarity - Simplify output formatting by removing emoji decorations - This will help identify why FPS calculation isn't working as expected 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
7a71e77aae
commit
4b8fb7fead
@ -191,7 +191,9 @@ class DeploymentWorker(QThread):
|
||||
# Set up both GUI and terminal result callbacks
|
||||
def combined_result_callback(result_dict):
|
||||
# Add current FPS from pipeline to result_dict
|
||||
result_dict['current_pipeline_fps'] = pipeline.get_current_fps()
|
||||
current_fps = pipeline.get_current_fps()
|
||||
result_dict['current_pipeline_fps'] = current_fps
|
||||
print(f"DEBUG: Pipeline FPS = {current_fps:.2f}") # Debug info
|
||||
|
||||
# Send to GUI terminal and results display
|
||||
terminal_output = self._format_terminal_results(result_dict)
|
||||
@ -232,7 +234,7 @@ class DeploymentWorker(QThread):
|
||||
pipeline_id = result_dict.get('pipeline_id', 'Unknown')
|
||||
|
||||
output_lines = []
|
||||
output_lines.append(f"\n🔥 INFERENCE RESULT [{timestamp}]")
|
||||
output_lines.append(f"\nINFERENCE RESULT [{timestamp}]")
|
||||
output_lines.append(f" Pipeline ID: {pipeline_id}")
|
||||
output_lines.append(" " + "="*50)
|
||||
|
||||
@ -240,69 +242,69 @@ class DeploymentWorker(QThread):
|
||||
stage_results = result_dict.get('stage_results', {})
|
||||
if stage_results:
|
||||
for stage_id, result in stage_results.items():
|
||||
output_lines.append(f" 📊 Stage: {stage_id}")
|
||||
output_lines.append(f" Stage: {stage_id}")
|
||||
|
||||
if isinstance(result, tuple) and len(result) == 2:
|
||||
# Handle tuple results (probability, result_string) - matching actual format
|
||||
probability, result_string = result
|
||||
output_lines.append(f" ✅ Result: {result_string}")
|
||||
output_lines.append(f" 📈 Probability: {probability:.3f}")
|
||||
output_lines.append(f" Result: {result_string}")
|
||||
output_lines.append(f" Probability: {probability:.3f}")
|
||||
|
||||
# Add confidence level
|
||||
if probability > 0.8:
|
||||
confidence = "🟢 Very High"
|
||||
confidence = "Very High"
|
||||
elif probability > 0.6:
|
||||
confidence = "🟡 High"
|
||||
confidence = "High"
|
||||
elif probability > 0.4:
|
||||
confidence = "🟠 Medium"
|
||||
confidence = "Medium"
|
||||
else:
|
||||
confidence = "🔴 Low"
|
||||
output_lines.append(f" 🎯 Confidence: {confidence}")
|
||||
confidence = "Low"
|
||||
output_lines.append(f" Confidence: {confidence}")
|
||||
|
||||
elif isinstance(result, dict):
|
||||
# Handle dict results
|
||||
for key, value in result.items():
|
||||
if key == 'probability':
|
||||
output_lines.append(f" 📈 {key.title()}: {value:.3f}")
|
||||
output_lines.append(f" {key.title()}: {value:.3f}")
|
||||
elif key == 'result':
|
||||
output_lines.append(f" ✅ {key.title()}: {value}")
|
||||
output_lines.append(f" {key.title()}: {value}")
|
||||
elif key == 'confidence':
|
||||
output_lines.append(f" 🎯 {key.title()}: {value}")
|
||||
output_lines.append(f" {key.title()}: {value}")
|
||||
elif key == 'fused_probability':
|
||||
output_lines.append(f" 🔀 Fused Probability: {value:.3f}")
|
||||
output_lines.append(f" Fused Probability: {value:.3f}")
|
||||
elif key == 'individual_probs':
|
||||
output_lines.append(f" 📋 Individual Probabilities:")
|
||||
output_lines.append(f" Individual Probabilities:")
|
||||
for prob_key, prob_value in value.items():
|
||||
output_lines.append(f" {prob_key}: {prob_value:.3f}")
|
||||
else:
|
||||
output_lines.append(f" 📝 {key}: {value}")
|
||||
output_lines.append(f" {key}: {value}")
|
||||
else:
|
||||
# Handle other result types
|
||||
output_lines.append(f" 📝 Raw Result: {result}")
|
||||
output_lines.append(f" Raw Result: {result}")
|
||||
|
||||
output_lines.append("") # Blank line between stages
|
||||
else:
|
||||
output_lines.append(" ⚠️ No stage results available")
|
||||
output_lines.append(" No stage results available")
|
||||
|
||||
# Processing time if available
|
||||
metadata = result_dict.get('metadata', {})
|
||||
if 'total_processing_time' in metadata:
|
||||
processing_time = metadata['total_processing_time']
|
||||
output_lines.append(f" ⏱️ Processing Time: {processing_time:.3f}s")
|
||||
output_lines.append(f" Processing Time: {processing_time:.3f}s")
|
||||
|
||||
# Real-time FPS calculation based on output queue throughput
|
||||
current_fps = result_dict.get('current_pipeline_fps', 0.0)
|
||||
if current_fps > 0:
|
||||
output_lines.append(f" 🚄 Pipeline FPS: {current_fps:.2f}")
|
||||
output_lines.append(f" Pipeline FPS (Output Queue): {current_fps:.2f}")
|
||||
else:
|
||||
output_lines.append(f" 🚄 Pipeline FPS: Calculating...")
|
||||
output_lines.append(f" Pipeline FPS (Output Queue): Calculating...")
|
||||
|
||||
# Additional metadata
|
||||
if metadata:
|
||||
interesting_keys = ['dongle_count', 'stage_count', 'queue_sizes', 'error_count']
|
||||
for key in interesting_keys:
|
||||
if key in metadata:
|
||||
output_lines.append(f" 📋 {key.replace('_', ' ').title()}: {metadata[key]}")
|
||||
output_lines.append(f" {key.replace('_', ' ').title()}: {metadata[key]}")
|
||||
|
||||
output_lines.append(" " + "="*50)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user