# FLAME AI Second Place Solution

First of all, thank you to the hosts for organizing this competition. It was a truly great experience competing with all of you!
My Solution
Feature Engineering
Inclusion of Fire-Line Differences:
I computed the difference between the fire-line at the current timestep and the previous timestep
Inclusion of Surrounding Positions:
To improve spatial awareness, I included information from surrounding positions.
Model Architecture
The model architecture consists of four main parts: CNN -> ConvLSTM -> Transformer -> Decoder.
CNN
The CNN handles spatial feature extraction with two branches:
Local Branch: This branch captures fine-grained, localized information from the fire-line.
Global Branch: Inspired by U-Net, this branch captures broader spatial context.
Both branches are concatenated and passed through a convolution block for further processing.
I used a MBConvolution-like block with ECA (Efficient Channel Attention) and spatial attention.
ConvLSTM
The ConvLSTM layer plays a crucial role as the main autoregressive component, predicting the next frame in the form of a latent vector.
Transformer
The Transformer refines the latent vector by leveraging attention mechanisms, enabling the model to capture long-range  temporal dependencies.
Decoder
The Decoder takes the refined latent vector and outputs the predicted fire-line for the next timestep.
Edit:
Training notebook:
[https://www.kaggle.com/code/jobayerhossain/flame-ai-training/notebook](https://www.kaggle.com/code/jobayerhossain/flame-ai-training/notebook)
Inference notebook:
[https://www.kaggle.com/code/jobayerhossain/flameai-inference/notebook](https://www.kaggle.com/code/jobayerhossain/flameai-inference/notebook)