The Network Security Project is a comprehensive solution designed to detect phishing activities using advanced machine learning techniques. The project seamlessly integrates data ingestion, preprocessing, model training, and prediction into an interactive and scalable pipeline.
- 🔍 Phishing Detection: Leverage trained models to detect phishing activities.
- 🛠️ Interactive API: FastAPI-powered endpoints for training and predictions.
- 💾 MongoDB Integration: Efficiently manage data ingestion.
- 📊 Model Tracking: Track experiments and results with MLflow.
- 🐳 Dockerized Deployment: Simplified application setup with AWS ECR(Elastic Container Registry).
- ✅ Data Validation: Schema-driven data validation for accuracy.
-
Clone the repository:
git clone https://github.com/ArpitKadam/Network_Security.git cd Network_Security
-
Set up a virtual environment:
python3 -m venv myenv myenv\Scripts\activate # Windows
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables: Create a
.env
file and add your MongoDB connection string:MONGO_DB_URL=mongodb+srv://<username>:<password>@cluster.mongodb.net/<database>
-
Run the application:
uvicorn app:app --host 0.0.0.0 --port 8000
- Programming: Python
- Frameworks: FastAPI, scikit-learn
- Database: MongoDB
- Deployment: Docker
- Experiment Tracking: MLflow, Dagshub
Enhance your workflow with DAGsHub:
- Log in to DAGsHub.
- Connect your GitHub repository.
- Configure MLflow tracking:
mlflow.set_tracking_uri("https://dagshub.com/<username>/<repo>.mlflow")
Track experiments and monitor models:
- Start the MLflow server:
mlflow ui
- Access the dashboard at http://127.0.0.1:5000.
- Create a MongoDB Atlas cluster.
- Obtain your connection string:
mongodb+srv://<username>:<password>@cluster.mongodb.net/<database>
- Add the connection string to
.env
:MONGO_DB_URL=<your_connection_string>
- Verify the integration with this snippet:
from pymongo import MongoClient import certifi ca = certifi.where() client = MongoClient(mongo_db_url, tlsCAFile=ca) database = client["<database_name>"] collection = database["<collection_name>"]
├── Artifacts # Generated files and models
├── data_schema # Data validation schemas
├── final_models # Pretrained models
├── logs # Logs for execution
├── mlruns # MLflow experiment data
├── networksecurity # Source code modules
├── prediction_output # Prediction results
├── templates # HTML templates
├── Dockerfile # Docker configuration
├── requirements.txt # Dependencies
├── app.py # Main application
└── setup.py # Project setup
We welcome contributions! Fork the repository, make your changes, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Ready to explore the world of phishing detection? Follow the steps above and bring this project to life!