Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

INDEX

Sr. No Contents Page No.


2
1 Introduction
4
2 Problem Statement
5
3 Aim and Objectives
6
4 Methodology
7
5 Program Code
14
6 Advantages, Disadvantages
15
7 Result
16
8 Expected Conclusion
17
9 References

1
Chapter 1

Introduction

In an age characterized by an abundance of digital content and diverse


en- tertainment options, the quest for personalized movie
recommendations has never been more pressing. The Deep Learning-
Based Movie RecommendationSystem project addresses this challenge
by harnessing the immense potential of deep neural networks to
transform the way users discover, select, and enjoy films. As traditional
movie recommendation systems often struggle to provide finely tuned
suggestions that resonate with individual tastes, our project seeksto push
the boundaries of recommendation technology and deliver a more im-
mersive cinematic experience.

The world of cinema is a vast landscape, with a multitude of genres,


direc- tors, actors, and production styles. Finding the right movie to
watch can be a daunting task, and the overwhelming selection of content
available on stream- ing platforms only exacerbates the problem. In
response to this complexity, our project takes inspiration from the
immense datasets of user interactions with movies, encompassing user
ratings, viewing histories, and user profiles. We aim to extract valuable
insights from this wealth of information and employ deep learning
techniques to create recommendation models that understand the
intricate relationships between users, movies, and their unique
character-istics.

At the heart of our project are sophisticated neural networks, which


employ collaborative filtering, recurrent neural networks, and
convolutional neural networks to decipher the complex patterns hidden
within the data. By do- ing so, the recommendation system becomes
capable of identifying latent user preferences, discovering meaningful
connections between films, and ultimately offering personalized movie
recommendations that resonate with each user’s distinct tastes.

2
Beyond the practical implications for movie enthusiasts, this project is a
testa- ment to the potential of deep learning in addressing complex real-
world chal-lenges. It stands at the intersection of artificial intelligence and
the enter- tainment industry, showcasing the power of advanced machine
learning tech- niques to enhance user satisfaction and streamline content
consumption.

As we delve into the subsequent sections, we will provide a comprehensive


overview of our methodology, the technical aspects of our deep learning
mod- els, and the user interface that makes the recommendation system
accessible to all. Ultimately, our Deep Learning-Based Movie
Recommendation System promises to not only make movie selection more
effortless but also offers a glimpse into the exciting future of AI-driven
personalization in the world of en-tertainment.

3
Chapter 2

Problem Statement

The problem is to create a movie recommendation system that can


accurately suggest movies to users based on their preferences, past
behavior, and movie characteristics. This system needs to overcome
challenges like sparse data and the cold start problem for new users while
continuously adapting to changing user preferences.

4
Chapter 3

Aim and Objectives

3.1 Aim
Movie Recommendation System.

3.2 Objective: -

• To enhance user engagement and satisfaction by offering


personalized movie recommendations, ensuring that users find
content they enjoy, leading to longer viewing sessions and increased
platform loyalty.

• To improve the quality of movie recommendations by


leveraging user data and advanced algorithms, enabling users to
discover a wider range of movies tai- lored to their unique
preferences.

• To increase user retention and platform usage, resulting in


higher revenue and profitability, by providing users with an enjoyable
and personalized movie- watching experience, ultimately
strengthening the platform’s position in the market.

• To optimize content discovery and user experience by


continuously adapting and evolving the recommendation system,
ensuring that it remains relevant and effective as user preferences and
the movie catalog evolve.

• To facilitate content discovery and exploration by introducing


serendipity and diversity in movie recommendations, encouraging
users to explore new gen- res and expand their movie-watching
horizons, thereby enriching their overall viewing experience.

5
Chapter 4
Methodology

4.1. Block diagram:

Fig 1. Block diagram of Proposed System

• Our proposed system is an application which predicts name of movie


accord-ing to users interest
• Name of the movie is determined by several features like movie type,
rat-ing,searching, etc.
6
Chapter 5

Program Code :

import streamlit as st
from PIL import Image
import json
from Classifier import KNearestNeighbours
from bs4 import BeautifulSoup
import requests, io
import PIL.Image
from urllib.request import urlopen

with open('./Data/movie_data.json', 'r+', encoding='utf-8') as f:


data = json.load(f)
with open('./Data/movie_titles.json', 'r+', encoding='utf-8') as f:
movie_titles = json.load(f)
hdr = {'User-Agent': 'Mozilla/5.0'}

def movie_poster_fetcher(imdb_link):
## Display Movie Poster
url_data = requests.get(imdb_link, headers=hdr).text
s_data = BeautifulSoup(url_data, 'html.parser')
imdb_dp = s_data.find("meta", property="og:image1")
movie_poster_link = imdb_dp.attrs['content']
u = urlopen(movie_poster_link)
raw_data = u.read()

7
image = PIL.Image.open(io.BytesIO(raw_data))
image = image.resize((158, 301), )
st.image(image, use_column_width=False)

def get_movie_info(imdb_link):
url_data = requests.get(imdb_link, headers=hdr).text
s_data = BeautifulSoup(url_data, 'html.parser')
imdb_content = s_data.find("meta", property="og:description")
movie_descr = imdb_content.attrs['content']
movie_descr = str(movie_descr).split('.')
movie_director = movie_descr[0]
movie_cast = str(movie_descr[1]).replace('With', 'Cast: ').strip()
movie_story = 'Story: ' + str(movie_descr[2]).strip() + '.'
rating = s_data.find("span", class_="sc-bde20123-1 iZlgcd").text
movie_rating = 'Total Rating count: ' + str(rating)
return movie_director, movie_cast, movie_story, movie_rating

def KNN_Movie_Recommender(test_point, k):


# Create dummy target variable for the KNN Classifier
target = [0 for item in movie_titles]
# Instantiate object for the Classifier
model = KNearestNeighbours(data, target, test_point, k=k)
# Run the algorithm
model.fit()
# Print list of 10 recommendations < Change value of k for a different number >
table = []
for i in model.indices:
# Returns back movie title and imdb link
8
table.append([movie_titles[i][0], movie_titles[i][2], data[i][-1]])
print(table)
return table

st.set_page_config(
page_title="Movie Recommender System",
)

def run():
img1 = Image.open('./meta/logo.jpg')
img1 = img1.resize((250, 250), )
st.image(img1, use_column_width=False)
st.title("Movie Recommender System")
st.markdown('''<h4 style='text-align: left; color: #d73b5c;'>* Data is based "IMDB 5000
Movie Dataset"</h4>''',
unsafe_allow_html=True)
genres = ['Action', 'Adventure', 'Animation', 'Biography', 'Comedy', 'Crime',
'Documentary', 'Drama', 'Family',
'Fantasy', 'Film-Noir', 'Game-Show', 'History', 'Horror', 'Music', 'Musical', 'Mystery',
'News',
'Reality-TV', 'Romance', 'Sci-Fi', 'Short', 'Sport', 'Thriller', 'War', 'Western']
movies = [title[0] for title in movie_titles]
category = ['--Select--', 'Movie based', 'Genre based']
cat_op = st.selectbox('Select Recommendation Type', category)
if cat_op == category[0]:
st.warning('Please select Recommendation Type!!')
elif cat_op == category[1]:
select_movie = st.selectbox('Select movie: (Recommendation will be based on this
selection)',

9
['--Select--'] + movies)
dec = st.radio("Want to Fetch Movie Poster?", ('Yes', 'No'))
st.markdown(
'''<h4 style='text-align: left; color: #d73b5c;'>* Fetching a Movie Posters will take a
time."</h4>''',
unsafe_allow_html=True)
if dec == 'No':
if select_movie == '--Select--':
st.warning('Please select Movie!!')
else:
no_of_reco = st.slider('Number of movies you want Recommended:', min_value=5,
max_value=20, step=1)
genres = data[movies.index(select_movie)]
test_points = genres
table = KNN_Movie_Recommender(test_points, no_of_reco + 1)
table.pop(0)
c=0
st.success('Some of the movies from our Recommendation, have a look below')
for movie, link, ratings in table:
c += 1
director, cast, story, total_rat = get_movie_info(link)
st.markdown(f"({c})[ {movie}]({link})")
st.markdown(director)
st.markdown(cast)
st.markdown(story)
st.markdown(total_rat)

st.markdown('IMDB Rating: ' + str(ratings) + '⭐')


else:
if select_movie == '--Select--':
st.warning('Please select Movie!!')

10
else:
no_of_reco = st.slider('Number of movies you want Recommended:', min_value=5,
max_value=20, step=1)
genres = data[movies.index(select_movie)]
test_points = genres
table = KNN_Movie_Recommender(test_points, no_of_reco + 1)
table.pop(0)
c=0
st.success('Some of the movies from our Recommendation, have a look below')
for movie, link, ratings in table:
c += 1
st.markdown(f"({c})[ {movie}]({link})")
movie_poster_fetcher(link)
director, cast, story, total_rat = get_movie_info(link)
st.markdown(director)
st.markdown(cast)
st.markdown(story)
st.markdown(total_rat)

st.markdown('IMDB Rating: ' + str(ratings) + '⭐')


elif cat_op == category[2]:
sel_gen = st.multiselect('Select Genres:', genres)
dec = st.radio("Want to Fetch Movie Poster?", ('Yes', 'No'))
st.markdown(
'''<h4 style='text-align: left; color: #d73b5c;'>* Fetching a Movie Posters will take a
time."</h4>''',
unsafe_allow_html=True)
if dec == 'No':
if sel_gen:
imdb_score = st.slider('Choose IMDb score:', 1, 10, 8)
no_of_reco = st.number_input('Number of movies:', min_value=5, max_value=20,
step=1)
11
test_point = [1 if genre in sel_gen else 0 for genre in genres]
test_point.append(imdb_score)
table = KNN_Movie_Recommender(test_point, no_of_reco)
c=0
st.success('Some of the movies from our Recommendation, have a look below')
for movie, link, ratings in table:
c += 1
st.markdown(f"({c})[ {movie}]({link})")
director, cast, story, total_rat = get_movie_info(link)
st.markdown(director)
st.markdown(cast)
st.markdown(story)
st.markdown(total_rat)

st.markdown('IMDB Rating: ' + str(ratings) + '⭐')


else:
if sel_gen:
imdb_score = st.slider('Choose IMDb score:', 1, 10, 8)
no_of_reco = st.number_input('Number of movies:', min_value=5, max_value=20,
step=1)
test_point = [1 if genre in sel_gen else 0 for genre in genres]
test_point.append(imdb_score)
table = KNN_Movie_Recommender(test_point, no_of_reco)
c=0
st.success('Some of the movies from our Recommendation, have a look below')
for movie, link, ratings in table:
c += 1
st.markdown(f"({c})[ {movie}]({link})")
movie_poster_fetcher(link)
director, cast, story, total_rat = get_movie_info(link)
st.markdown(director)
12
st.markdown(cast)
st.markdown(story)
st.markdown(total_rat)

st.markdown('IMDB Rating: ' + str(ratings) + '⭐')

run()

13
Chapter 6

Advantages, Disadvantages

Advantages
➢ Movie recommendation systems provide personalized suggestions based on users'
preferences and viewing history, enhancing the overall user experience..
➢ Users can discover new movies that align with their interests but may have gone
unnoticed, contributing to a broader range of content consumption.The Android app
or other interface provided for controlling the device offers a user-friendly experience.
➢ Users can save time searching for movies, as the system efficiently filters and presents
options tailored to their tastes.

Disadvantages:
➢ Depending solely on algorithms may result in occasional inaccuracies, as the
system may struggle to capture nuanced user preferences or changes in taste..
➢ Recommendation systems may unintentionally create a "filter bubble," where
users are exposed only to content similar to their past choices, limiting exposure
to diverse genres or styles..
➢ To provide personalized recommendations, these systems often require access
to user data, raising privacy concerns and potential backlash if mishandled.

14
Chapter 7

Result :

15
Chapter 8

Conclusion

In conclusion, building a movie recommendation system is a great idea to


make watching movies more enjoyable. Our project aims to solve problems
like hav-ing limited data and starting from scratch for new users. We’re
doing this by using a mix of techniques to suggest a variety of movies that
people will like. We want to make sure our system keeps learning and
getting better at mak- ing recommendations as people use it. Our main goal
is to keep users happy and engaged. We’re also making sure our system is
easy to use, which will be helpful for movie fans and streaming platforms.

16
Chapter 9

References

[1] Kim, Mucheol, and Sang Oh Park, "Group affinity based social trust
model for an intelligent movie recommender system", Multimedia tools and
applica-tions 64, no. 2, 505- 516, 2013

[2] Noguera, José M., Manuel J. Barranco, Rafael J. Segura, and Luis
Martínez, "A mobile 3D-GIS hybrid recommender system for tourism",
Information Sci- ences 215, 37-52, 2012

[3] Nanou, Theodora, George Lekakos, and Konstantinos Fouskas, "The


effectsof recommendations presentation on persuasion and satisfaction in a
movie recommender system", Multimedia systems 16, no. 4-5, 219-230,
2010

[4] Ruotsalo, Tuukka, KristerHaav, Antony Stoyanov, Sylvain Roche,


Elena Fani, RominaDeliai, EetuMäkelä, TomiKauppinen, and EeroHyvönen,
"SMART- MUSEUM: A mobile recommender system for the Web of Data",
Web semantics:
Science, services and agents on the world wide web 20, 50-67, 2013

[5] Sharma, Meenakshi, and Sandeep Mann, "A survey of recommender


sys- tems: approaches and limitations", Int J InnovEng Technol. ICAECE-
2013,
ISSN, 2319-1058, 2013

[6] Tekin, Cem, Shaoting Zhang, and Mihaela van der Schaar, "Distributed
online learning in social recommender systems", Selected Topics in Signal
Pro-cessing, IEEE Journal of 8, no. 4, 638-652, 2014

[7] Beel, Joeran, Stefan Langer, BelaGipp, and Andres Nürnberger, "The
Ar- chitecture and Datasets of Docear’s Research Paper Recommender
System", D-Lib Magazine 20, no. 11, 2014

17
Name and Signature of Students:

Sr. No. Roll No. Name of Students Signatures

1 55 Godase Sachin Govind

2 57 Kadam Ashok Shankar

3 70 Pise Tejaswini Dada

Date:
Place:

18

You might also like