Comments (2)
And if you take the model from README, then the result looks like the recognition does not work. So, I'm not sure in clear Evaluation Result. I have inspected on PCAPs with label Facebook, Skype, Youtube, VPN.
PCAP for test: https://drive.google.com/file/d/1LJWRKypmAO-7gheGNFRR3LPYaOJ-nRtE/view?usp=share_link
import torch
import pathlib
from ml.utils import load_cnn_model
from preprocessing import read_pcap, transform_packet
import torch.nn.functional as F
from utils import ID_TO_APP, ID_TO_TRAFFIC
if torch.cuda.is_available():
print("GPU")
# model path
application = 'model/application_classification.cnn.model'
traffic = 'model/traffic_classification.cnn.model'
model = load_cnn_model(traffic, gpu=True)
print("Processing")
rows = []
batch_index = 0
for i, packet in enumerate(read_pcap(pathlib.Path("data/test/4.pcap"))):
arr = transform_packet(packet)
if arr is not None:
y_pred = F.log_softmax(model(torch.Tensor(arr.todense().tolist()).cuda()), dim=1)
y_hat = torch.argmax(y_pred, dim=1)
# app_label = ID_TO_APP.get(int(y_hat))
traffic_label = ID_TO_TRAFFIC.get(int(y_hat))
print(traffic_label, round(y_pred.tolist()[0][int(y_hat)], 4))
I have got result:
- a mistake with traffic model for recognition as Not VPN.
- not YouTube app;
- not clear result for Facebook.
- maybe is ok with Skype.
from deep-packet.
Try to correct the processed_data ,open one of the .json file,check the app_label and traffic_label ,if value is null that means u should add the specific prefix-id according to your dataset in utlis.py
from deep-packet.
Related Issues (20)
- The size of train set and test set is wired HOT 2
- close
- 关于create_train_test.py问题 HOT 1
- pre-train model HOT 2
- Balance the train and test sets HOT 3
- 关于数据标签的问题 HOT 1
- 运行错误 HOT 2
- About the missing data set categories HOT 5
- The result of evaluation.ipynb HOT 1
- About missing .pcap file HOT 1
- error when run train_cnn.py HOT 1
- KetError:length when run train_cnn.py HOT 1
- Make a prediction HOT 3
- other datasets for encrypted traffic classification HOT 1
- SAE
- Approach flawed if ports left in dataset HOT 1
- training fails on VPN dataset with a ValueError HOT 1
- Provided train_test_set is not correct HOT 2
- Why "remove tor and torrent related data as they are no longer available" mean? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deep-packet.