Front Pages
Front Pages
DIPLOMA IN ENGINEERING
(COMPUTER ENGINEERING)
SUBMITTED BY
Ms.Sugandhi.P.S.
CERTIFICATE
This is to certify that the project work entitled
“Fake Social Media Account Detection”
Submitted by
Mr.Aryan Sopan Surve (2115230021)
Mr.Soham Shivaji Shirgire (2115230017)
Mr.Suraj Dipak Javir (2215230198)
Is a bonafide work carried out by them under the guidance of Ms.Sugandhi.P.S. And
it is submitted toward the partial fulfillment of the requirement of Maharashtra State Board
of Technical Education, Mumbai for the award of the degree of Diploma in Computer
Engineering
Place: Korti
Date:
I hereby declare that the project report entitles “Fake Social Media Account
Detection” completed and written by us for the award of the Diploma in Computer Engineering
to Maharashtra State Board of Technical Education, Mumbai has not previously formed for the
award of diploma, degree or similar title of this or any other university or examination body.
Place: -Korti
Date: -
It gives us lot of pleasure in submitting our project report on “Fake Social Media
Account Detection”. We should thank all of them who helped us in work and provide the
facilities to develop this application.
We are very much thankful to our project guide. Ms.Sugandhi.P.S. And project
coordinator Mr. Puri.S.B. For their encouragement, technical guidance and valuable assistant
rendered to us.
We are also thankful to all the facilities of computer department for their valuable
guidance, advice, and assistance in our project right from the initial stages.
We also express sincere thanks to all faculty members of our college. Last but not the
least we would like to thank to all our friends, fellow students and our parents for their whole-
hearted support.
Thanking You.
INDEX
1. Abstract
8. Conclusion
9. References
5
ABSTRACT
With the advent of the Internet and social media, while hundreds of people have benefitted
from the vast sources of information available, there has been an enormous increase in the
rise of cyber-crimes. According to a 2019 report in the Economics Times, India has
witnessed a 457% rise in cybercrime in the five year span between 2011 and 2016. Most
speculate that this is due to impact of social media such as Instagram on our daily lives.
While these definitely help in creating a sound social network, creation of user accounts in
these sites usually needs just an email-id. A real life person can create multiple fake IDs and
hence impostors can easily be made. Unlike the real world scenario where multiple rules and
regulations are imposed to identify oneself in a unique manner (for example while issuing
one’s passport or driver’s license), in the virtual world of social media, admission does not
require any such checks. In this project, we study the different accounts of Instagram, in
6
INTRODUCTION & MOTIVATION
Having the ability to check the authenticity of a user’s following is crucial for brands looking
to work with influencers. Social Media is one of the most important platforms, especially for
This platform can be used by them as a way of interacting with same type of people and age
group, or to present their views. However, use of technology has also constrained with
various implications – humans can misuse the technology to cause harm and spread hatred
Keeping this is mind, we have tried to perform a basic solution to this problem via deep
learning algorithm implementation over a dataset to check with respect to various social
media platform – Instagram’s attributes , can a neural network actually help to predict a fake
7
Proposed Method with Flow Diagram
An artificial neural network (ANN) is a computing system designed to simulate how the
human brain analyzes and processes information. It is the foundation of artificial intelligence
(AI) and solves problems that would prove impossible or difficult by human or statistical
standards.
Artificial Neural Networks are primarily designed to mimic and simulate the functioning
of the human brain. Using the mathematical structure, it is ANN constructed to replicate
the biological neurons.
The concept of ANN follows the same process as that of a natural neural net. The objective
of ANN is to make the machines or systems understand and ape how a human brain makes a
decision and then ultimately takes action. Inspired by the human brain, the fundamentals of
neural networks are connected through neurons or nodes.
8
MODULES OF THE PROJECT
▪ Module III - Data Insights: Basic statistical and visual analysis with respect
to scraped datasets, which can help to provide basic overview of how data
needs to be cleaned or further processed with respect to core neural network
development
▪ Module VI - Testing and Inference: Once the desired and tuned model is
obtained, this module is implemented in order to test model (saved model
and
9
later loaded for future use) on random unseen data attributes to determine whether the user
is fake or not.
10
IMPLEMENTATION REQUIREMENTS
1) Initial Packages – Pandas, NumPy, Matplotlib, Seaborn – for basic statistical
analysis and mathematical insights
11
OUTPUT SCREENSHOTS
12
13
KDE Plot (Data Insights)
14
Model Training- (Sequential Training)
15
Training Progress - Loss (Training)
16
Classification Report (Evaluation)
17
Confusion Matrix (Evaluation)
18
CONCLUSION
19
REFERENCES
20
APPENDIX A - Source Code
import pandas as pd
import numpy as np
import pandas as pd
import numpy as np
import tensorflow as tf
21
train_data_path = 'datasets/Fake-Instagram-Profile-Detection-
main/insta_train.csv'
test_data_path = 'datasets/Fake-Instagram-Profile-Detection-
main/insta_test.csv'
pd.read_csv(test_data_path)
576 + 120
train_data_path =
'datasets/Insta_Fake_Profile_Detection/train.csv'
test_data_path =
'datasets/Insta_Fake_Profile_Detection/test.csv'
pd.read_csv(train_data_path)
instagram_df_train=pd.read_csv(train_data_path)
instagram_df_train
instagram_df_test=pd.read_csv(test_data_path)
instagram_df_test
instagram_df_train.head()
instagram_df_train.tail()
22
instagram_df_test.head()
instagram_df_test.tail()
instagram_df_train.info()
instagram_df_train.describe()
instagram_df_train.isnull().sum()
instagram_df_train['profile pic'].value_counts()
instagram_df_train['fake'].value_counts()
instagram_df_test.info()
instagram_df_test.describe()
23
instagram_df_test.isnull().sum()
instagram_df_test['fake'].value_counts()
sns.countplot(instagram_df_train['fake'])
plt.show()
sns.countplot(instagram_df_train['private'])
plt.show()
sns.countplot(instagram_df_train['profile pic'])
plt.show()
sns.distplot(instagram_df_train['nums/length username'])
plt.show()
# Correlation plot
plt.figure(figsize=(20, 20))
24
cm = instagram_df_train.corr()
ax = plt.subplot()
plt.show()
sns.countplot(instagram_df_test['fake'])
sns.countplot(instagram_df_test['private'])
sns.countplot(instagram_df_test['profile pic'])
X_train
X_test
y_train = instagram_df_train['fake']
y_test = instagram_df_test['fake']
y_train
25
y_test
scaler_x = StandardScaler()
X_train = scaler_x.fit_transform(X_train)
X_test = scaler_x.transform(X_test)
y_train
y_test
Training_data
26
Testing_data = len(X_test)/( len(X_test) + len(X_train) ) * 100
Testing_data
import tensorflow.keras
model = Sequential()
model.add(Dense(150, activation='relu'))
model.add(Dropout(0.3))
model.add(Dense(150, activation='relu'))
model.add(Dropout(0.3))
model.add(Dense(25, activation='relu'))
model.add(Dropout(0.3))
model.add(Dense(2,activation='softmax'))
model.summary()
27
# Access the Performance of the model
print(epochs_hist.history.keys())
plt.plot(epochs_hist.history['loss'])
plt.plot(epochs_hist.history['val_loss'])
plt.xlabel('Epoch Number')
plt.show()
predicted = model.predict(X_test)
predicted_value = []
28
test = []
for i in predicted:
predicted_value.append(np.argmax(i))
for i in y_test:
test.append(np.argmax(i))
print(classification_report(test, predicted_value))
plt.figure(figsize=(10, 10))
cm=confusion_matrix(test, predicted_value)
sns.heatmap(cm, annot=True)
plt.show()
29
30