Skip to content

Repository files navigation

FlowStructNet

Install

pip install -e .

Dataset

Public dataset folder (Google Drive):

Dataset Split(Required)

# Splitter: https://github.com/SmartData-Polito/Debunk_Traffic_Representation/blob/master/process_finetune_data/Split/per-flow-split/flow_classification/split_based_flow.ipynb

dataset = 'tls'
dataset_path = './data/raw/TLS/sessions'
output_path  = './data/flows/TLS/flow' 
k = 3          # K-fold
threshold = 5

paper: https://dl.acm.org/doi/10.1145/3718958.3750498

Convert PCAP → JSONL

flowstructnet-convert   --input /path/to/pcap_root   --output /path/to/out_dir   --max-ctx-tokens 4096   --workers 8 --resume

Train

flowstructnet-train   --data_root /path/to/out_dir   --fold_name train_val_split_0   --train_split train --val_split val   --out_dir ./runs/exp1

Eval

flowstructnet-eval   --data_root /path/to/out_dir   --fold_name train_val_split_0   --split test   --ckpt ./runs/exp1/checkpoint-best.pt

License: Apache-2.0

Environment

  • Python: 3.10.18
  • Torch: 2.5.1+cu121

Conda (recommended):

conda env create -f environment.yml
conda activate flowstructnet
pip install -e .

Pip (alternative):

python -m pip install -r requirements.lock.txt
python -m pip install -e .

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages