{
  "id": 704898,
  "title": "ResNet18-Based Baseline for AUTOPILOT-VQA Video Understanding",
  "content": "<h2>Overview</h2>\n<p>For the AUTOPILOT-VQA competition, I developed a simple computer vision baseline without any task-specific fine-tuning. The approach combines:</p>\n<ul>\n<li>Frame sampling from dashcam videos</li>\n<li>Visual feature extraction using a pretrained ResNet18 model</li>\n<li>Heuristic rules based on image brightness and visual statistics</li>\n</ul>\n<p>The goal was to generate automatic predictions for a subset of the VQA tasks, specifically:</p>\n<ul>\n<li>Time of Day (Q1.a)</li>\n<li>Weather Condition (Q1.b)</li>\n</ul>\n<p>All remaining VQA fields were initialized with default values.</p>\n<hr>\n<h2>Data Processing</h2>\n<h3>Frame Extraction</h3>\n<p>For each video, I extracted 5 frames uniformly distributed across the entire video duration.</p>\n<pre><code>idxs = np.linspace(0, total - 1, num_frames).astype(int)\n</code></pre>\n<p>This strategy was chosen to capture the overall visual context of the video while keeping computation lightweight.</p>\n<hr>\n<h2>Visual Feature Extraction</h2>\n<p>I used a pretrained ResNet18 model from the torchvision library.</p>\n<pre><code>model = models.resnet18(\n    weights=models.ResNet18_Weights.DEFAULT\n)\n</code></pre>\n<p>The final classification layer was removed so that the network acted purely as a feature extractor.</p>\n<pre><code>model = torch.nn.Sequential(\n    *list(model.children())[:-1]\n)\n</code></pre>\n<p>For each frame:</p>\n<ol>\n<li>Resize to 224×224 pixels</li>\n<li>Normalize using ImageNet statistics</li>\n<li>Extract visual embeddings using ResNet18</li>\n</ol>\n<hr>\n<h2>Feature Aggregation</h2>\n<p>Feature vectors extracted from all sampled frames were averaged to produce a single representation for each video.</p>\n<pre><code>aggregate_features(feats)\n</code></pre>\n<p>This aggregated feature vector was used together with image statistics for prediction.</p>\n<hr>\n<h2>Time of Day Prediction</h2>\n<p>Time-of-day classification was based on a combination of:</p>\n<ul>\n<li>Average image brightness</li>\n<li>Mean value of the extracted ResNet features</li>\n</ul>\n<p>The score was calculated as:</p>\n<pre><code>score = brightness * 0.6 + feat_score * 100\n</code></pre>\n<p>Threshold-based rules were then applied:</p>\n<pre><code>if score &gt; 140:\n    return 0\nelif score &gt; 100:\n    return 1\nelif score &gt; 60:\n    return 2\nelse:\n    return 3\n</code></pre>\n<p>The underlying assumption is that daytime scenes generally exhibit higher brightness levels than nighttime scenes.</p>\n<hr>\n<h2>Weather Prediction</h2>\n<p>Weather conditions were estimated using image contrast statistics.</p>\n<p>For each frame, the standard deviation of pixel intensities was computed:</p>\n<pre><code>np.std(frame)\n</code></pre>\n<p>The average standard deviation across all sampled frames was then used to classify weather conditions.</p>\n<p>The heuristic rules were:</p>\n<pre><code>if std &lt; 40:\n    return 5\nelif std &lt; 70:\n    return 1\nelse:\n    return 0\n</code></pre>\n<p>The intuition behind this approach is that weather conditions such as fog, rain, or low visibility often reduce image contrast compared to clear weather conditions.</p>\n<hr>\n<h2>Submission Generation</h2>\n<p>The submission file was created using the official <code>sample_submission.csv</code> provided by the competition.</p>\n<p>All VQA columns were initially filled with default values:</p>\n<pre><code>submission[col] = 0\n</code></pre>\n<p>Predictions were then generated only for:</p>\n<ul>\n<li>Q1.a: Time of Day</li>\n<li>Q1.b: Weather Condition</li>\n</ul>\n<p>All other question fields retained their default values.</p>\n<hr>\n<h2>Limitations</h2>\n<p>This solution was intentionally designed as a lightweight baseline and therefore has several limitations:</p>\n<ol>\n<li>No task-specific training was performed on the competition dataset.</li>\n<li>Temporal information from videos was not explicitly modeled.</li>\n<li>Most VQA questions were not directly predicted.</li>\n<li>Predictions relied on manually designed thresholds.</li>\n<li>No Vision-Language Models (VLMs) or multimodal reasoning techniques were used.</li>\n</ol>\n<hr>\n<h2>Conclusion</h2>\n<p>This solution demonstrates a simple baseline for incident-related video understanding using pretrained visual features and image-based heuristics. By combining frame sampling, ResNet18 feature extraction, and rule-based classification, the approach provides a lightweight starting point for tackling structured VQA tasks in autonomous driving scenarios. While limited in scope, it establishes a foundation that could be extended with more advanced video understanding and multimodal learning methods.</p>",
  "comments": [],
  "comment_count": 0,
  "messages": [
    {
      "id": 3467724,
      "postDate": "2026-06-07T07:20:44.773Z",
      "content": "<h2>Overview</h2>\n<p>For the AUTOPILOT-VQA competition, I developed a simple computer vision baseline without any task-specific fine-tuning. The approach combines:</p>\n<ul>\n<li>Frame sampling from dashcam videos</li>\n<li>Visual feature extraction using a pretrained ResNet18 model</li>\n<li>Heuristic rules based on image brightness and visual statistics</li>\n</ul>\n<p>The goal was to generate automatic predictions for a subset of the VQA tasks, specifically:</p>\n<ul>\n<li>Time of Day (Q1.a)</li>\n<li>Weather Condition (Q1.b)</li>\n</ul>\n<p>All remaining VQA fields were initialized with default values.</p>\n<hr>\n<h2>Data Processing</h2>\n<h3>Frame Extraction</h3>\n<p>For each video, I extracted 5 frames uniformly distributed across the entire video duration.</p>\n<pre><code>idxs = np.linspace(0, total - 1, num_frames).astype(int)\n</code></pre>\n<p>This strategy was chosen to capture the overall visual context of the video while keeping computation lightweight.</p>\n<hr>\n<h2>Visual Feature Extraction</h2>\n<p>I used a pretrained ResNet18 model from the torchvision library.</p>\n<pre><code>model = models.resnet18(\n    weights=models.ResNet18_Weights.DEFAULT\n)\n</code></pre>\n<p>The final classification layer was removed so that the network acted purely as a feature extractor.</p>\n<pre><code>model = torch.nn.Sequential(\n    *list(model.children())[:-1]\n)\n</code></pre>\n<p>For each frame:</p>\n<ol>\n<li>Resize to 224×224 pixels</li>\n<li>Normalize using ImageNet statistics</li>\n<li>Extract visual embeddings using ResNet18</li>\n</ol>\n<hr>\n<h2>Feature Aggregation</h2>\n<p>Feature vectors extracted from all sampled frames were averaged to produce a single representation for each video.</p>\n<pre><code>aggregate_features(feats)\n</code></pre>\n<p>This aggregated feature vector was used together with image statistics for prediction.</p>\n<hr>\n<h2>Time of Day Prediction</h2>\n<p>Time-of-day classification was based on a combination of:</p>\n<ul>\n<li>Average image brightness</li>\n<li>Mean value of the extracted ResNet features</li>\n</ul>\n<p>The score was calculated as:</p>\n<pre><code>score = brightness * 0.6 + feat_score * 100\n</code></pre>\n<p>Threshold-based rules were then applied:</p>\n<pre><code>if score &gt; 140:\n    return 0\nelif score &gt; 100:\n    return 1\nelif score &gt; 60:\n    return 2\nelse:\n    return 3\n</code></pre>\n<p>The underlying assumption is that daytime scenes generally exhibit higher brightness levels than nighttime scenes.</p>\n<hr>\n<h2>Weather Prediction</h2>\n<p>Weather conditions were estimated using image contrast statistics.</p>\n<p>For each frame, the standard deviation of pixel intensities was computed:</p>\n<pre><code>np.std(frame)\n</code></pre>\n<p>The average standard deviation across all sampled frames was then used to classify weather conditions.</p>\n<p>The heuristic rules were:</p>\n<pre><code>if std &lt; 40:\n    return 5\nelif std &lt; 70:\n    return 1\nelse:\n    return 0\n</code></pre>\n<p>The intuition behind this approach is that weather conditions such as fog, rain, or low visibility often reduce image contrast compared to clear weather conditions.</p>\n<hr>\n<h2>Submission Generation</h2>\n<p>The submission file was created using the official <code>sample_submission.csv</code> provided by the competition.</p>\n<p>All VQA columns were initially filled with default values:</p>\n<pre><code>submission[col] = 0\n</code></pre>\n<p>Predictions were then generated only for:</p>\n<ul>\n<li>Q1.a: Time of Day</li>\n<li>Q1.b: Weather Condition</li>\n</ul>\n<p>All other question fields retained their default values.</p>\n<hr>\n<h2>Limitations</h2>\n<p>This solution was intentionally designed as a lightweight baseline and therefore has several limitations:</p>\n<ol>\n<li>No task-specific training was performed on the competition dataset.</li>\n<li>Temporal information from videos was not explicitly modeled.</li>\n<li>Most VQA questions were not directly predicted.</li>\n<li>Predictions relied on manually designed thresholds.</li>\n<li>No Vision-Language Models (VLMs) or multimodal reasoning techniques were used.</li>\n</ol>\n<hr>\n<h2>Conclusion</h2>\n<p>This solution demonstrates a simple baseline for incident-related video understanding using pretrained visual features and image-based heuristics. By combining frame sampling, ResNet18 feature extraction, and rule-based classification, the approach provides a lightweight starting point for tackling structured VQA tasks in autonomous driving scenarios. While limited in scope, it establishes a foundation that could be extended with more advanced video understanding and multimodal learning methods.</p>",
      "rawMarkdown": "## Overview\n\nFor the AUTOPILOT-VQA competition, I developed a simple computer vision baseline without any task-specific fine-tuning. The approach combines:\n\n* Frame sampling from dashcam videos\n* Visual feature extraction using a pretrained ResNet18 model\n* Heuristic rules based on image brightness and visual statistics\n\nThe goal was to generate automatic predictions for a subset of the VQA tasks, specifically:\n\n* Time of Day (Q1.a)\n* Weather Condition (Q1.b)\n\nAll remaining VQA fields were initialized with default values.\n\n---\n\n## Data Processing\n\n### Frame Extraction\n\nFor each video, I extracted 5 frames uniformly distributed across the entire video duration.\n\n```python\nidxs = np.linspace(0, total - 1, num_frames).astype(int)\n```\n\nThis strategy was chosen to capture the overall visual context of the video while keeping computation lightweight.\n\n---\n\n## Visual Feature Extraction\n\nI used a pretrained ResNet18 model from the torchvision library.\n\n```python\nmodel = models.resnet18(\n    weights=models.ResNet18_Weights.DEFAULT\n)\n```\n\nThe final classification layer was removed so that the network acted purely as a feature extractor.\n\n```python\nmodel = torch.nn.Sequential(\n    *list(model.children())[:-1]\n)\n```\n\nFor each frame:\n\n1. Resize to 224×224 pixels\n2. Normalize using ImageNet statistics\n3. Extract visual embeddings using ResNet18\n\n---\n\n## Feature Aggregation\n\nFeature vectors extracted from all sampled frames were averaged to produce a single representation for each video.\n\n```python\naggregate_features(feats)\n```\n\nThis aggregated feature vector was used together with image statistics for prediction.\n\n---\n\n## Time of Day Prediction\n\nTime-of-day classification was based on a combination of:\n\n* Average image brightness\n* Mean value of the extracted ResNet features\n\nThe score was calculated as:\n\n```python\nscore = brightness * 0.6 + feat_score * 100\n```\n\nThreshold-based rules were then applied:\n\n```python\nif score > 140:\n    return 0\nelif score > 100:\n    return 1\nelif score > 60:\n    return 2\nelse:\n    return 3\n```\n\nThe underlying assumption is that daytime scenes generally exhibit higher brightness levels than nighttime scenes.\n\n---\n\n## Weather Prediction\n\nWeather conditions were estimated using image contrast statistics.\n\nFor each frame, the standard deviation of pixel intensities was computed:\n\n```python\nnp.std(frame)\n```\n\nThe average standard deviation across all sampled frames was then used to classify weather conditions.\n\nThe heuristic rules were:\n\n```python\nif std < 40:\n    return 5\nelif std < 70:\n    return 1\nelse:\n    return 0\n```\n\nThe intuition behind this approach is that weather conditions such as fog, rain, or low visibility often reduce image contrast compared to clear weather conditions.\n\n---\n\n## Submission Generation\n\nThe submission file was created using the official `sample_submission.csv` provided by the competition.\n\nAll VQA columns were initially filled with default values:\n\n```python\nsubmission[col] = 0\n```\n\nPredictions were then generated only for:\n\n* Q1.a: Time of Day\n* Q1.b: Weather Condition\n\nAll other question fields retained their default values.\n\n---\n\n## Limitations\n\nThis solution was intentionally designed as a lightweight baseline and therefore has several limitations:\n\n1. No task-specific training was performed on the competition dataset.\n2. Temporal information from videos was not explicitly modeled.\n3. Most VQA questions were not directly predicted.\n4. Predictions relied on manually designed thresholds.\n5. No Vision-Language Models (VLMs) or multimodal reasoning techniques were used.\n\n---\n\n## Conclusion\n\nThis solution demonstrates a simple baseline for incident-related video understanding using pretrained visual features and image-based heuristics. By combining frame sampling, ResNet18 feature extraction, and rule-based classification, the approach provides a lightweight starting point for tackling structured VQA tasks in autonomous driving scenarios. While limited in scope, it establishes a foundation that could be extended with more advanced video understanding and multimodal learning methods.\n",
      "votes": 2
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-20T06:29:34Z",
  "competition_id": 131778,
  "competition_slug": "AUTOPILOT-VQA",
  "team_id": 15534915,
  "solution_url": "/competitions/AUTOPILOT-VQA/writeups/resnet18-based-baseline-for-autopilot-vqa-video-un"
}