Details in blog post: https://blog.munhou.com/2020/04/05/Pytorch-Implementation-of-Deep-Packet-A-Novel-Approach-For-Encrypted-Tra%EF%AC%83c-Classi%EF%AC%81cation-Using-Deep-Learning/
- Add the ResNet model. Kudos to Taehyun for implementing ResNet.
- Update dataset and model
- Update dependencies
- Add more data to
chat
,file_transfer
,voip
,streaming
andvpn_voip
- Remove tor and torrent related data as they are no longer available
- Update dataset and model
- Update code and model
- Drop
petastorm
, use huggingface'sdatasets
instead for data loader
- Clone the project
- Create environment via conda
- For Mac
conda env create -f env_mac.yaml
- For Linux (CPU only)
conda env create -f env_linux_cpu.yaml
- For Linux (CUDA 10.2)
conda env create -f env_linux_cuda102.yaml
- For Linux (CUDA 11.3)
conda env create -f env_linux_cuda113.yaml
- For Mac
- Download the train and test set I created at here, or download the full dataset if you want to process the data from scratch.
python preprocessing.py -s /path/to/CompletePcap/ -t processed_data
python create_train_test_set.py -s processed_data -t train_test_data
Application Classification
For CNN model
python train_cnn.py -d train_test_data/application_classification/train.parquet -m model/application_classification.cnn.model -t app
For Resnet model
python train_resnet.py -d train_test_data/application_classification/train.parquet -m model/application_classification.cnn.model -t app
Traffic Classification
For CNN model
python train_cnn.py -d train_test_data/traffic_classification/train.parquet -m model/traffic_classification.cnn.model -t traffic
For Resnet model
python train_resnet.py -d train_test_data/traffic_classification/train.parquet -m model/traffic_classification.cnn.model -t traffic
Download the pre-trained CNN models here.
Code ran on AWS c5.4xlarge
7:01:32 elapsed
Code ran on AWS c5.4xlarge
2:55:46 elapsed
Code ran on AWS g5.xlarge
24:41 elapsed
Code ran on AWS g5.xlarge
7:55 elapsed