xynaxdev commited on
Commit
c5780db
·
verified ·
1 Parent(s): b79f1ec

Upload 2 files

Browse files
Files changed (2) hide show
  1. README.md +135 -0
  2. best_model.pth +3 -0
README.md CHANGED
@@ -1,3 +1,138 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ tags:
4
+ - cybersecurity
5
+ - phishing-detection
6
+ - computer-vision
7
+ - resnet50
8
+ - brand-impersonation
9
+ datasets:
10
+ - circl-phishing
11
+ - openphish
12
+ - kaggle-webpage-phishing
13
+ metrics:
14
+ - accuracy
15
+ - precision
16
+ - recall
17
+ - f1
18
+ pipeline_tag: image-classification
19
  ---
20
+
21
+ # Ph5 Webpage Screenshot Classifier: Visual Brand Impersonation Detector (ResNet-50)
22
+
23
+ <p align="center">
24
+ <img src="https://img.shields.io/badge/Model-ResNet--50-blue.svg" alt="Model">
25
+ <img src="https://img.shields.io/badge/Test%20Accuracy-79.00%25-brightgreen.svg" alt="Test Accuracy">
26
+ <img src="https://img.shields.io/badge/Val%20Accuracy-83.30%25-green.svg" alt="Val Accuracy">
27
+ <img src="https://img.shields.io/badge/F1--Score-77.34%25-success.svg" alt="F1 Score">
28
+ <img src="https://img.shields.io/badge/Latency-28.5ms-orange.svg" alt="Latency">
29
+ <img src="https://img.shields.io/badge/License-MIT-purple.svg" alt="License">
30
+ </p>
31
+
32
+ ## Model Summary
33
+
34
+ The **Ph5 Screenshot Classifier** is a deep convolutional neural network based on `ResNet-50` fine-tuned to classify webpage landing page screenshots and identify fraudulent brand impersonation, visual cloning, and deceptive graphical credential-harvesting interfaces.
35
+
36
+ It forms the visual inspection modality of the **Ph5 Multimodal Cybersecurity Framework**, closing critical blind spots where attackers host phishing forms on trusted infrastructure (such as Microsoft Forms, Notion, or SharePoint) that easily bypass lexical URL filters.
37
+
38
+ ---
39
+
40
+ ## Performance & Evaluation Benchmark
41
+
42
+ Evaluated on an independent, held-out test partition of **438 webpage screenshots** (248 Benign, 190 Phishing):
43
+
44
+ | Metric | Held-Out Test Split (N = 438) | Peak Validation Split (N = 438) |
45
+ | :--- | :--- | :--- |
46
+ | **Accuracy** | **79.00%** | **83.30%** |
47
+ | **Precision** | **72.69%** | **78.20%** |
48
+ | **Recall** | **82.63%** | **85.10%** |
49
+ | **F1-Score** | **77.34%** | **81.50%** |
50
+ | **Inference Latency** | **28.5 ms** | Batch Size = 1 (RTX 3050 Laptop GPU) |
51
+
52
+ ### Baseline Comparison
53
+
54
+ | Architecture | Test Accuracy | Precision | Recall | F1-Score | Latency |
55
+ | :--- | :--- | :--- | :--- | :--- | :--- |
56
+ | MobileNetV2 | 76.10% | 70.20% | 79.40% | 74.51% | 14.0 ms |
57
+ | VGG-16 | 77.40% | 71.10% | 80.50% | 75.51% | 42.0 ms |
58
+ | **Ph5 ResNet-50 (This Model)** | **79.00%** | **72.69%** | **82.63%** | **77.34%** | **28.5 ms** |
59
+
60
+ ---
61
+
62
+ ## Confusion Matrix (Test Split: N = 438)
63
+
64
+ ```text
65
+ Predicted
66
+ Benign Phishing
67
+ Benign 189 59
68
+ Phishing 33 157
69
+ ```
70
+
71
+ ---
72
+
73
+ ## Intended Use & Integration
74
+
75
+ ### PyTorch Inference
76
+
77
+ ```python
78
+ import torch
79
+ import torchvision.models as models
80
+ import torchvision.transforms as transforms
81
+ from PIL import Image
82
+
83
+ # Initialize ResNet-50 architecture
84
+ model = models.resnet50(weights=None)
85
+ model.fc = torch.nn.Sequential(
86
+ torch.nn.Dropout(0.3),
87
+ torch.nn.Linear(2048, 2)
88
+ )
89
+
90
+ # Load state dict
91
+ state_dict = torch.load("best_model.pth", map_location="cpu")
92
+ model.load_state_dict(state_dict)
93
+ model.eval()
94
+
95
+ # Preprocessing transforms
96
+ transform = transforms.Compose([
97
+ transforms.Resize((256, 256)),
98
+ transforms.CenterCrop((224, 224)),
99
+ transforms.ToTensor(),
100
+ transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
101
+ ])
102
+
103
+ image = Image.open("screenshot.png").convert("RGB")
104
+ tensor = transform(image).unsqueeze(0)
105
+
106
+ with torch.no_grad():
107
+ logits = model(tensor)
108
+ probs = torch.softmax(logits, dim=-1).squeeze().tolist()
109
+
110
+ print(f"Benign: {probs[0]:.4f}")
111
+ print(f"Phishing: {probs[1]:.4f}")
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Training Configuration & Data Provenance
117
+
118
+ - **Pretrained Backbone:** `ResNet-50` (ImageNet-1k initialized weights)
119
+ - **Classification Head:** `Dropout(0.3) + Linear(2048, 2)`
120
+ - **Dataset Composition (2,915 screenshots total):**
121
+ - **Benign Pages (1,648):** 1,101 from Kaggle Webpage Phishing collection, 501 from CIRCL open dataset, 46 multi-path headless Chrome captures.
122
+ - **Phishing Pages (1,267):** 515 from Kaggle, 444 captured via automated Headless Chrome from live OpenPhish feeds, 273 from CIRCL Luxembourg, 35 curated threat feeds.
123
+ - **Split:** 70% Train (2,039) / 15% Validation (438) / 15% Test (438)
124
+ - **Optimizer:** AdamW (learning rate = 1e-4, weight decay = 0.0001)
125
+ - **Epochs:** 25 epochs with ReduceLROnPlateau scheduler
126
+
127
+ ---
128
+
129
+ ## Citation & Framework
130
+
131
+ ```bibtex
132
+ @article{devi2026ph5,
133
+ title={Ph5: A Multimodal Framework for Cross-Modality Evasion-Resilient Phishing Detection in Multi-Vector Environments},
134
+ author={Devi, Ritu and Singh, Deepti and Sah, Akash},
135
+ journal={Journal of Computer & Mathematical Sciences / JCMM},
136
+ year={2026}
137
+ }
138
+ ```
best_model.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79e8023e89a3465b367762eb841e6f08aa07797356236af2bc98b1a46cd475fa
3
+ size 94367102