This repository contains two distinct machine learning projects: a Shipment Prediction System for logistics analysis and an Image Caption Generator utilizing the BLIP model.
The Shipment Prediction System is a machine learning tool designed to predict whether a shipment will be "Delayed" or "On Time". By analyzing various shipment attributes such as origin, destination, vehicle type, weather conditions, and distance, the model provides actionable insights to improve delivery reliability.
- Data Analysis: Processes shipment data including dates, locations, vehicle types, and weather conditions.
- Predictive Modeling: Classifies shipments as Delayed or On Time.
- Preprocessing: Handles categorical variables (Origin, Destination) using one-hot encoding and drops irrelevant columns (e.g., Shipment ID).
- Model Comparison: Evaluates multiple algorithms including ADA Boost, XGBoost, Random Forest, Decision Trees, Logistic Regression, Naive Bayes, and SVC.
- Language: Python
- Libraries:
Pandas(Data manipulation)NumPy(Numerical operations)Scikit-learn(Model building and training)XGBoost(Gradient boosting framework)Flask(Web service deployment)
The system is trained on shipment data (AI ML Internship Training Data.xlsx) containing fields such as:
- Logistics: Origin, Destination, Distance (km)
- Dates: Shipment Date, Planned Delivery, Actual Delivery
- Conditions: Weather, Traffic
- Target: Delayed (Yes/No)
- F1_Score: 0.9360
This project is a web application designed to generate natural language descriptions for user-uploaded images. It utilizes the pre-trained BLIP (Bootstrapping Language-Image Pretraining) model from Hugging Face to analyze visual content and produce accurate captions.
- Image Upload: Users can upload images directly through the interface.
- Automated Captioning: The BLIP model processes the image and generates a textual description.
- Result Display: Displays the uploaded image alongside its generated caption.
- Language: Python
- Model: BLIP (Salesforce/blip-image-captioning-base)
- Libraries:
transformers(Hugging Face model integration)torch(PyTorch for deep learning)PIL(Python Imaging Library for image processing)IPython.display(Inline image display)
- Input: User uploads an image file (e.g.,
.jpg,.png). - Processing: The image is preprocessed and passed through the BLIP conditional generation model.
- Output: The model decodes the output tensors into a human-readable string.
Ensure you have Python installed. You can install the required dependencies using pip:
pip install pandas numpy scikit-learn xgboost transformers torch Pillow flask pyngrok