Inspiration Globally, 30% of all food produced is wasted, and a massive portion of that happens silently in the back of cold-chain logistics trucks. Often, companies only find out the food has spoiled after they unload it, leading to massive financial losses and environmental waste. I realized that if we could track IoT sensor data (temperature, humidity, cooling power) during transit, we could use Machine Learning to predict and prevent spoilage before the shipment is ruined.

🚀 What it does FreshTrack Analyzer is a Streamlit-powered dashboard that acts as an early-warning AI system for logistics dispatchers. Users can input the average IoT sensor readings from a shipment route. The app then runs these inputs through a Random Forest Machine Learning model to instantly predict if the shipment is at a high risk of spoiling, allowing companies to intercept the shipment or increase cooling power in real-time.

Additionally, the dashboard provides interactive 3D Exploratory Data Analysis (EDA) and extracts "Feature Importance," proving to dispatchers exactly why a shipment is failing (e.g., the object temperature is rising too fast).

🛠️ How we built it I built the entire application using Python, focusing on a robust data engineering pipeline and an explainable AI model:

The Data: I pulled an authoritative dataset of over 40,000 real cold-chain IoT sensor readings from Kaggle. The ML Pipeline: I used Pandas and Scikit-Learn to engineer the data. I stripped redundant columns to prevent multicollinearity, imputed missing sensor readings with medians, and transformed continuous risk scores into an actionable is_spoiled binary label. I then trained a Random Forest Classifier to ensure the AI's logic remained explainable, achieving over 90% accuracy. The Frontend: I used Streamlit and Plotly to build a professional, tab-based user interface that visualizes complex 3D risk zones and correlation heatmaps in a way that non-technical logistics managers can easily understand. 🚧 Challenges we ran into Handling the raw, real-world data was a major challenge. The initial Kaggle dataset contained messy column names, missing readings (NaNs), and redundant temperature scales (both Celsius and Fahrenheit). If left uncleaned, the Fahrenheit columns would have caused multicollinearity and ruined the Machine Learning model. I had to build a programmatic data-cleaning pipeline to drop those features and impute missing data before the model could learn accurately.

🏆 Accomplishments that we're proud of I am incredibly proud of implementing an Explainable AI approach rather than just relying on a black-box model. By using a Random Forest and plotting the Feature Importance graph directly in the Streamlit app, I can actually prove to logistics judges why the AI made a certain prediction based on real physical laws (i.e. proving that object temperature drives spoilage more than ambient temperature).

📚 What we learned I learned how crucial Data Engineering and Exploratory Data Analysis (EDA) are. By plotting the sensor readings in a 3D scatter plot and creating a Correlation Heatmap, I understood the physical relationships between the cooling power and ambient temperature long before I even wrote the ML code.

⏭️ What's next for FreshTrack Analyzer The next step is to integrate FreshTrack directly into a logistics company's live API so it can pull sensor data automatically from trucks in real-time. We also want to implement automated SMS alerts that ping drivers the second the dashboard predicts a high spoilage risk.

Built With

Share this project:

Updates