0% found this document useful (0 votes)
2 views

Assignment_1

The document outlines the MA 476 assignment focused on deep learning applications in computer vision, with two case studies: predicting stock price movements and vehicle classification from traffic camera images. Each case study includes problem statements, datasets, model implementations, and evaluation metrics. Submission guidelines require code and reports to be submitted in a specified format by the deadline of January 30, 2025.

Uploaded by

shivam85763
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Assignment_1

The document outlines the MA 476 assignment focused on deep learning applications in computer vision, with two case studies: predicting stock price movements and vehicle classification from traffic camera images. Each case study includes problem statements, datasets, model implementations, and evaluation metrics. Submission guidelines require code and reports to be submitted in a specified format by the deadline of January 30, 2025.

Uploaded by

shivam85763
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

MA 476: Deep Learning for Computer Vision

Assignment 1

Deadline: 30 January, 2025

Contents
1 Case Study 1: Predicting Stock Price Movements 3

2 Case Study 2: Vehicle Classification from Traffic Camera


Images 5

1
Submission Guidelines
1. Submit all code files (.ipynb) and reports (.pdf) in a single zip file.

2. Name the folder and zip file as:

• GroupNo AssignmentNo.zip.

3. Include:

• Clear documentation of processes and results for each task.


• Assumptions made during the tasks.
• Insights and observations in the report.

2
Case Study Tasks
1 Case Study 1: Predicting Stock Price Move-
ments
Problem Statement
You are a data scientist for a fintech company building a model to predict the
direction of stock price movements. Using historical stock data, you aim to
classify whether the stock price will go up or down in the next time step. This
will involve analyzing the time-series nature of stock prices and comparing
multiple sequence models.

Dataset
• Source: The dataset can be downloaded using the yfinance Python
library.

import yfinance as yf
import pandas as pd
stock_data = yf.download(’AAPL’, start=’2018-01-01’, end=’2023-01-01’)

• Features: The dataset includes Open, High, Low, Close, Adjusted


Close prices, and Volume for stocks.
• Target: Predict whether the closing price of the stock will go up (1)
or down (0) in the next time step.

Models to Implement and Compare


1. Baseline Logistic Regression (using manually crafted features like mov-
ing averages).
2. Simple RNN.
3. LSTM.
4. GRU.
5. Transformer Encoder (for time-series classification).

3
Tasks
1. Data Collection and Preprocessing:

• Download historical stock price data (e.g., Apple, Tesla, or Ama-


zon) for the last 5 years.
• Create input features such as:
– Past 10-day prices (Close) as the input sequence.
– Calculate moving averages, RSI, or other technical indicators.
• Normalize the input features between 0 and 1.
• Generate labels: 1 (price up) or 0 (price down) based on the next
day’s closing price.

2. Model Implementation:

• Build models to classify the target variable.


• Train each model for 20 epochs and evaluate performance.

3. Evaluation Metrics:

• Accuracy, Precision, Recall, F1-score.


• ROC curve for classification models.

4. Visualization:

• Compare predictions vs. actual movements over time.


• Plot model evaluation metrics for comparison.

4
2 Case Study 2: Vehicle Classification from
Traffic Camera Images
Problem Statement
You are working with a smart city initiative to develop a traffic monitoring
system that classifies vehicles from traffic camera footage into categories such
as cars, trucks, motorcycles, buses, and bicycles. The goal is to build and
compare multiple deep learning models to classify vehicle types from images
accurately. The solution should focus on balancing accuracy and computa-
tional efficiency to ensure real-time operation.

Dataset
• Dataset: Stanford Cars Dataset

• Description: This dataset contains images of cars annotated with


their make, model, and year. For simplicity, we’ll group them into
broader categories: Car, Truck, Motorcycle, Bus, and Bicycle.

• Data Size: 16,000 images for training and 8,000 for testing.

• Preprocessing:

– Resize images to 128×128.


– Normalize pixel values to the range [0, 1].
– Use data augmentation (rotations, flips, and zooms).

Models to Implement and Compare


1. Baseline CNN: A simple custom CNN with 4 convolutional layers.

2. Pre-trained ResNet-18: Fine-tuned on the vehicle dataset.

3. Pre-trained MobileNetV2: For efficient classification suitable for edge


devices.

5
Tasks
1. Data Preprocessing:

• Resize all images to 128×128.


• Normalize using the mean and standard deviation of ImageNet.
• Apply augmentations: random flips, rotations, and zooms.

2. Model Training:

• Train all models for 15 epochs using the Adam optimizer.


• Use a learning rate scheduler for dynamic adjustment.

3. Evaluation Metrics:

• Accuracy and F1-score for each class.


• Confusion matrix to analyze misclassifications.

4. Visualization:

• Plot training and validation loss/accuracy curves.


• Visualize Grad-CAM heatmaps for model interpretability.

You might also like