chrxtina commited on
Commit
1ca0a4e
·
verified ·
1 Parent(s): 61163d9

Upload folder using huggingface_hub

Browse files
Files changed (5) hide show
  1. README.md +7 -0
  2. config.json +34 -0
  3. metadata.json +9 -0
  4. onnx/model.onnx +3 -0
  5. preprocessor_config.json +23 -0
README.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Real vs Fake Image Classifier (ONNX)
2
+
3
+ This model classifies images as either REAL or FAKE. It is fine-tuned on the [raw_real_fake_images](https://huggingface.co/datasets/date3k2/raw_real_fake_images) dataset.
4
+
5
+ - Architecture: ViT (Vision Transformer)
6
+ - Format: ONNX
7
+ - Usage: For browser-based inference using [transformers.js](https://github.com/xenova/transformers.js)
config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_attn_implementation_autoset": true,
3
+ "architectures": [
4
+ "ViTForImageClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.0,
7
+ "encoder_stride": 16,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.0,
10
+ "hidden_size": 768,
11
+ "id2label": {
12
+ "0": "Fake",
13
+ "1": "Real"
14
+ },
15
+ "image_size": 224,
16
+ "initializer_range": 0.02,
17
+ "intermediate_size": 3072,
18
+ "label2id": {
19
+ "Fake": "0",
20
+ "Real": "1"
21
+ },
22
+ "layer_norm_eps": 1e-12,
23
+ "model_type": "vit",
24
+ "num_attention_heads": 12,
25
+ "num_channels": 3,
26
+ "num_hidden_layers": 12,
27
+ "patch_size": 16,
28
+ "pooler_act": "tanh",
29
+ "pooler_output_size": 768,
30
+ "problem_type": "single_label_classification",
31
+ "qkv_bias": true,
32
+ "torch_dtype": "float32",
33
+ "transformers_version": "4.51.3"
34
+ }
metadata.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "task": "image-classification",
3
+ "format": "onnx",
4
+ "labels": {
5
+ "0": "REAL",
6
+ "1": "FAKE"
7
+ },
8
+ "quantized": false
9
+ }
onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:75c0b4b2157170c78e4d7cfae5fc1630f1c71ebc245918fc03fd909e2794b0e8
3
+ size 343477784
preprocessor_config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": null,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.5,
8
+ 0.5,
9
+ 0.5
10
+ ],
11
+ "image_processor_type": "ViTImageProcessor",
12
+ "image_std": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "resample": 2,
18
+ "rescale_factor": 0.00392156862745098,
19
+ "size": {
20
+ "height": 224,
21
+ "width": 224
22
+ }
23
+ }