This project is an application designed to detect and report fake profiles on social media, specifically tailored to identify fake Instagram accounts. Utilizing machine learning algorithms, this app flags suspicious profiles based on various criteria to improve platform security and help users avoid misleading profiles.
- Features
- Project Structure
- Machine Learning Model
- Backend and API Integration
- Setup and Installation
- Technologies Used
- Contributing
- License
- Profile Detection: Uses a trained machine learning model to classify profiles as either "fake" or "not fake."
- Custom Criteria for Fake Profiles: Additional logic to detect suspicious profiles based on:
- External URL without posts and fewer than 20 followers.
- Full name containing more than two "x" characters.
- More than three dots or numbers in the full name.
- Real-Time Prediction API: RESTful API for profile detection, deployable to mobile and web platforms.
- User-Friendly Interface: Mobile app interface to flag, review, and report fake accounts.
- Detailed Analytics: Performance metrics, including precision, recall, and confusion matrix, to measure model accuracy.
- Machine Learning Model: Trained using TensorFlow and Keras, the model predicts the probability of a profile being fake.
- Backend API: Flask API developed in Python, deployed as an endpoint for the mobile application.
- Mobile Application: Android app built with Kotlin and integrated with the backend API using Retrofit.
The model is trained to recognize patterns associated with fake profiles using a dataset of features extracted from user profiles. Key steps include:
- Data Preprocessing: Handled missing values, filtered unnecessary columns, and standardized inputs.
- Model Training: Keras-based neural network model trained and saved as a
.pkl
file. - Testing: Evaluated using metrics such as TPR, FPR, precision, and recall to ensure accuracy.
- Deployment: Model saved in serialized format for integration with the Flask API.
The backend uses Flask to serve predictions to the Android app:
- Model Loading: Loads the pre-trained
.pkl
file to make predictions. - API Endpoints: Provides a POST endpoint for profile analysis, returning JSON responses with prediction results.
- Android Integration: Integrated with the Android app using Retrofit for smooth communication with the Flask API.
- Python 3.8+
- Android Studio for mobile app development
- Postman for API testing
-
Clone the Repository
git clone https://github.com/yourusername/fake-profile-detection.git cd fake-profile-detection
-
Install Backend Dependencies
pip install -r requirements.txt
-
Run the Flask API
python app.py
-
Android Setup
- Open the Android project in Android Studio.
- Configure the Retrofit client to point to your local API endpoint.
-
Testing the API
- Use Postman to test the
/predict
endpoint to ensure it returns expected results.
- Use Postman to test the
- Machine Learning: Python, TensorFlow, Keras
- Backend: Flask for API, Pickle for model serialization
- Mobile Application: Kotlin, Retrofit for API integration
- Database: Firebase or SQLite (if applicable for data storage)
Contributions are welcome! Please feel free to fork this repository, make your updates, and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.