Update model with proper task configuration
Browse files- README.md +24 -0
- config.json +1 -0
- preprocessor_config.json +22 -0
- pytorch_model.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
license: mit
|
| 4 |
+
tags:
|
| 5 |
+
- image-classification
|
| 6 |
+
- computer-vision
|
| 7 |
+
- fraud-detection
|
| 8 |
+
pipeline_tag: image-classification
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Fraud Detection Image Classification Model
|
| 12 |
+
|
| 13 |
+
This model classifies images into 3 classes:
|
| 14 |
+
- Class 0: Non fraudulent image, passed the safety check
|
| 15 |
+
- Class 1: Fraudulent image, failed the safety check
|
| 16 |
+
|
| 17 |
+
## Usage
|
| 18 |
+
|
| 19 |
+
from transformers import pipeline
|
| 20 |
+
|
| 21 |
+
classifier = pipeline("image-classification", model="IrishMehta/fraud-detection-idnet-two-class")
|
| 22 |
+
result = classifier("path/to/image.jpg")
|
| 23 |
+
print(result)
|
| 24 |
+
|
config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"architectures": ["ResNetForImageClassification"], "model_type": "resnet", "num_labels": 2, "id2label": {"0": "0", "1": "1"}, "label2id": {"0": 0, "1": 1}, "hidden_size": 2048, "problem_type": "single_label_classification", "pipeline_tag": "image-classification", "AutoModelForImageClassification": "transformers.models.resnet.modeling_resnet.ResNetForImageClassification"}
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"crop_pct": 0.875,
|
| 3 |
+
"do_normalize": true,
|
| 4 |
+
"do_rescale": true,
|
| 5 |
+
"do_resize": true,
|
| 6 |
+
"image_mean": [
|
| 7 |
+
0.485,
|
| 8 |
+
0.456,
|
| 9 |
+
0.406
|
| 10 |
+
],
|
| 11 |
+
"image_processor_type": "ConvNextImageProcessor",
|
| 12 |
+
"image_std": [
|
| 13 |
+
0.229,
|
| 14 |
+
0.224,
|
| 15 |
+
0.225
|
| 16 |
+
],
|
| 17 |
+
"resample": 3,
|
| 18 |
+
"rescale_factor": 0.00392156862745098,
|
| 19 |
+
"size": {
|
| 20 |
+
"shortest_edge": 224
|
| 21 |
+
}
|
| 22 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0dc9790c52014b9f2f91adc7b24b2afcadae02f0ecc6b86d8985b85cb6e04776
|
| 3 |
+
size 94363594
|