--- license: apache-2.0 tags: - onnx - image-classification - phishing-detection - cybersecurity - floodmask pipeline_tag: image-classification --- # FloodMask CRP Classifier (Credential-Requiring Page) Part of the [FloodMask](https://github.com/ashim-mahara) phishing detection pipeline. Determines whether a webpage is actively requesting credentials -- the final gate before issuing a phishing verdict. ## Pipeline Role ``` Screenshot -> [AWL] -> element regions -> [Logo Classifier] -> brand match -> [CRP Classifier] -> phishing verdict ``` A page that matches a known brand logo but does not request credentials is not classified as an active phishing page. The CRP classifier filters these cases out. ## Model Details - **Format**: ONNX (optimized for CUDA via `optimum.onnxruntime`) - **Input**: Webpage screenshot, resized to 224x224, normalized via `ToTensor()` - **Output**: Binary -- credential-requiring (1) or not (0) ## Preprocessing This model uses a `torchvision.transforms` pipeline rather than a HuggingFace feature extractor: ```python from torchvision import transforms processor = transforms.Compose([ transforms.Resize((224, 224)), transforms.ToTensor(), ]) from PIL import Image image = Image.open("screenshot.png").convert("RGB") tensor = processor(image).unsqueeze(0) # add batch dim ``` ## Usage ```python from optimum.onnxruntime import ORTModel model = ORTModel.from_pretrained("ashim/floodmask-crp-classifier-2026-03-06") outputs = model(pixel_values=tensor) ``` ### CUDA Usage ```python CUDA_OPTIONS = { "device_id": 0, "arena_extend_strategy": "kNextPowerOfTwo", "gpu_mem_limit": 2 * 1024 * 1024 * 1024, "cudnn_conv_algo_search": "EXHAUSTIVE", "do_copy_in_default_stream": True, } model = ORTModel.from_pretrained( "ashim/floodmask-crp-classifier-2026-03-06", provider="CUDAExecutionProvider", provider_options=CUDA_OPTIONS, ) ``` ## Related Models - [ashim/floodmask-awl-2026-03-06](https://huggingface.co/ashim/floodmask-awl-2026-03-06) - [ashim/floodmask-logo-classifier-2026-03-06](https://huggingface.co/ashim/floodmask-logo-classifier-2026-03-06) ## Citation ```bibtex @inproceedings{liu2022phishintention, title={PhishIntention: Toward Explainable Content-based Phishing Detection through Intent Identification}, author={Liu, Ruofan and Lin, Yun and Yang, Xianglin and Ng, Siang Hwee and Divakaran, Dinil Mon and Dong, Jin Song}, booktitle={USENIX Security Symposium}, year={2022} } ```