Week 8: Firecast
April 25, 2025
Welcome back, everyone! After a much-needed rest during spring break, I am diving into the home stretch of my project.
Now that I had collected all of my image data, I was almost ready to run my model. After writing a script to extract the NDVI values from all of the NDVI images in my folder, I created a one-square-mile by one-square-mile grid, using the resolution given in the metadata for the images. I did the same thing for my Landsat data, and after several hours of debugging, I finally got the grids to align and was ready to run my model. For the Landsat data, I made a business decision to take the average pixel value of each image over a single grid square, putting this into an array. This meant I wouldn’t need to use a CNN, which would greatly optimize my LSTM and overall streamline my tuning process and save me hours of painful debugging.
Running the LSTM was a relatively simple process. However, I needed to ensure that my model wouldn’t overestimate its accuracy due to the fact that the majority of the data points aren’t during fires. So I did two things: I oversampled the fire data, and I used a technique called SMOTE to generate synthetic samples from the minority fire class. After these safety measures, there was roughly an equal amount of both classes in my data. After a day of tuning, my model reached an accuracy of 88%. For future reference, this does not include the PG&E power line data, which I may go back to later.
Once I had saved my model, I began devoting all of my time to working on my final product: the web app. I wrote the JavaScript code for a map with a clickable one-square-mile by one-square-mile grid over Butte County. While coding the base structure was relatively simple, I have much less experience working on the backend, which will be where the web app accesses the current data for each grid square in the region and runs my model on that data, outputting fire proneness to the user. After a little research and some help, I decided to use Python on the backend (because my model runs in Python anyway).
I’m still working out a few kinks, but everything is finally shaping up. I’m excited to see where I’ll be at next week. See you then!
Leave a Reply
You must be logged in to post a comment.