{% extends "base.html" %} {% block title %}Langvio Media Analyzer - Results{% endblock %} {% block content %}

Analysis Results

New Analysis

Query: "{{ query }}" ({{ task_type|title }} analysis, processed in {{ processing_time }} seconds) {% if highlighted_objects_count > 0 %} {{ highlighted_objects_count }} objects highlighted {% endif %}

Processed Media
{% if is_video %} {% else %} Processed image {% endif %}
Download {% if target_objects %}
Searched for: {{ target_objects|join(", ") }}
{% endif %}
Explanation
{{ explanation|safe }}
{% if object_counts %}
Object Counts
{% for label, count in object_counts.items() %} {% endfor %}
{{ label|title }} {{ count }}
{% endif %} {% if not is_video and image_stats %}
Image Analysis
{% if image_stats.resolution %} {% endif %} {% if image_stats.total_objects is defined %} {% endif %} {% if image_stats.unique_types is defined %} {% endif %} {% if image_stats.by_position %} {% for position, count in image_stats.by_position.items() %} {% endfor %} {% endif %} {% if image_stats.by_size %} {% for size, count in image_stats.by_size.items() %} {% endfor %} {% endif %} {% if image_stats.by_color %} {% for color, count in image_stats.by_color.items() %} {% endfor %} {% endif %}
Resolution {{ image_stats.resolution }}
Total Objects {{ image_stats.total_objects }}
Unique Types {{ image_stats.unique_types }}
By Position
{{ position|replace('-', ' ')|title }} {{ count }}
By Size
{{ size|title }} {{ count }}
By Color
{{ color|replace('_', ' ')|title }} {{ count }}
{% if image_stats.notable_patterns %}
Notable Patterns:
    {% for pattern in image_stats.notable_patterns %}
  • {{ pattern }}
  • {% endfor %}
{% endif %}
{% endif %} {% if is_video and video_stats %}
Video Analysis
{% if video_stats.duration is defined %} {% endif %} {% if video_stats.resolution %} {% endif %} {% if video_stats.activity_level %} {% endif %} {% if video_stats.frames_analyzed is defined and video_stats.total_frames is defined %} {% endif %} {% if video_stats.yolo11_enabled is defined %} {% endif %}
Duration {{ "%.1f"|format(video_stats.duration) }}s
Resolution {{ video_stats.resolution }}
Activity Level {{ video_stats.activity_level|replace('_', ' ')|title }}
Frames Analyzed {{ video_stats.frames_analyzed }} / {{ video_stats.total_frames }}
Enhanced Analysis {{ "✅ YOLO11" if video_stats.yolo11_enabled else "❌ Basic" }}
{% if video_stats.primary_objects %}
Primary Objects:
{% for obj in video_stats.primary_objects[:5] %} {{ obj|title }} {% endfor %}
{% endif %}
{% if video_stats.counting %}
YOLO11 Counting Analysis
{% if video_stats.counting.most_active_type %} {% endif %}
Total Crossings {{ video_stats.counting.total_crossings }}
Objects Entered {{ video_stats.counting.objects_entered }}
Objects Exited {{ video_stats.counting.objects_exited }}
Net Flow {{ video_stats.counting.net_flow }} ({{ video_stats.counting.flow_direction }})
Most Active Type {{ video_stats.counting.most_active_type|title }}
{% if video_stats.counting.by_object_type %}
By Object Type:
{% for obj_type, counts in video_stats.counting.by_object_type.items() %} {% endfor %}
Type In Out Net
{{ obj_type|title }} {{ counts.entered }} {{ counts.exited }} {{ counts.net_flow }}
{% endif %}
{% endif %} {% if video_stats.speed %}
Speed Analysis
{% if video_stats.speed.average_speed_kmh %} {% endif %} {% if video_stats.speed.fastest_type %} {% endif %}
Objects with Speed {{ video_stats.speed.objects_with_speed }}
Average Speed {{ video_stats.speed.average_speed_kmh }} km/h ({{ video_stats.speed.speed_category|replace('_', ' ')|title }})
Fastest Type {{ video_stats.speed.fastest_type|title }}
{% if video_stats.speed.by_object_type %}
Speed by Object Type:
{% for obj_type, speed_info in video_stats.speed.by_object_type.items() %} {% endfor %}
Type Avg Speed (km/h) Category
{{ obj_type|title }} {{ speed_info.average_speed }} {{ speed_info.speed_category|replace('_', ' ')|title }}
{% endif %}
{% endif %} {% if video_stats.movement %}
Movement Analysis
Stationary Objects {{ video_stats.movement.stationary_count }}
Moving Objects {{ video_stats.movement.moving_count }}
Fast Moving Objects {{ video_stats.movement.fast_moving_count }}
{% if video_stats.movement.primary_directions %}
Primary Movement Directions:
{% for direction, count in video_stats.movement.primary_directions.items() %} {{ direction|replace('_', ' ')|title }}: {{ count if count is number else count|length }} {% endfor %}
{% endif %}
{% endif %} {% if video_stats.primary_insights %}
Key Insights
    {% for insight in video_stats.primary_insights %}
  • {{ insight }}
  • {% endfor %}
{% endif %} {% endif %} {% if detailed_objects %}
Detected Objects Details {% if detailed_objects|length >= 10 %} (showing first 10) {% endif %}
{% if is_video %} {% endif %} {% for obj in detailed_objects %} {% if is_video %} {% endif %} {% endfor %}
ID Object ConfidenceFrameAttributes
{{ obj.id }} {{ obj.label|title }} {% if obj.track_id %}
Track: {{ obj.track_id }} {% endif %}
{{ "%.2f"|format(obj.confidence) }}{{ obj.frame }} {% if obj.attributes %}
{% for attr, value in obj.attributes.items() %} {% if value and value != "unknown" %} {{ attr }}: {{ value|replace('_', ' ')|title }} {% endif %} {% endfor %}
{% else %} None {% endif %}
{% endif %} {% if query_params %}
Analysis Configuration
{% if query_params.count_objects %} {% endif %} {% if target_objects %} {% endif %} {% if requested_attributes %} {% endif %} {% if query_params.spatial_relations %} {% endif %} {% if query_params.activities %} {% endif %}
Task Type {{ task_type|replace('_', ' ')|title }}
Counting Enabled ✅ Yes
Target Objects {{ target_objects|join(", ")|title }}
Requested Attributes {% for attr in requested_attributes %} {{ attr.attribute if attr.attribute else 'unknown' }}:{{ attr.value if attr.value else 'any' }} {% endfor %}
Spatial Relations {% for rel in query_params.spatial_relations %} {{ rel.relation if rel.relation else 'unknown' }} {% endfor %}
Activity Detection {{ query_params.activities|join(", ")|title }}
{% endif %}
Processing Information
  • Media Type: {{ "Video" if is_video else "Image" }}
  • Processing Time: {{ processing_time }}s
  • Objects Highlighted: {{ highlighted_objects_count }}
  • {% if is_video and video_stats.yolo11_enabled is defined %}
  • YOLO11 Enhanced: {{ "Yes" if video_stats.yolo11_enabled else "No" }}
  • {% endif %}
Query Analysis
  • Original Query: "{{ query }}"
  • Analysis Type: {{ task_type|replace('_', ' ')|title }}
  • {% if query_params.custom_instructions %}
  • Custom Instructions: {{ query_params.custom_instructions }}
  • {% endif %}
{% if is_video and video_stats.spatial %}
Spatial Relationship Patterns
{% if video_stats.spatial.common_relations %}
Common Relations:
    {% for relation, count in video_stats.spatial.common_relations.items() %}
  • {{ relation|replace('_', ' ')|title }}: {{ count }}
  • {% endfor %}
{% endif %} {% if video_stats.spatial.frequent_pairs %}
Frequent Pairs:
    {% for pair, count in video_stats.spatial.frequent_pairs.items() %}
  • {{ pair }}: {{ count }}
  • {% endfor %}
{% endif %} {% if video_stats.spatial.spatial_patterns %}
Spatial Patterns:
    {% for pattern, count in video_stats.spatial.spatial_patterns.items() %}
  • {{ pattern|replace('-', ' → ')|replace('_', ' ') }}: {{ count }}
  • {% endfor %}
{% endif %}
{% endif %}
{% endblock %} {% block scripts %} {% endblock %}