ninini1 commited on
Commit
b584ad9
·
1 Parent(s): 350b880

add config

Browse files
Files changed (4) hide show
  1. README.md +50 -0
  2. config.json +50 -0
  3. preprocessor_config.json +17 -0
  4. pytorch_model.bin +3 -0
README.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - autotrain
4
+ - vision
5
+ - image-classification
6
+ widget:
7
+ - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg
8
+ example_title: Tiger
9
+ - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg
10
+ example_title: Teapot
11
+ - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg
12
+ example_title: Palace
13
+ co2_eq_emissions:
14
+ emissions: 7.940487247386902
15
+ license: cc-by-4.0
16
+ ---
17
+
18
+ *__NOTE__: Unless you are trying to detect imagery generated using older models such as VQGAN+CLIP, please use the [updated version](https://huggingface.co/Organika/sdxl-detector) of this detector instead.*
19
+
20
+ This model is a proof-of-concept demonstration of using a ViT model to predict whether an artistic image was generated using AI.
21
+
22
+ It was created in October 2022, and as such, the training data did not include any samples generated by Midjourney 5, SDXL, or DALLE-3. It still may be able to correctly identify samples from these more recent models due to being trained on outputs of their predecessors.
23
+
24
+ Furthermore the intended scope of this tool is artistic images; that is to say, it is not a deepfake photo detector, and general computer imagery (webcams, screenshots, etc.) may throw it off.
25
+
26
+ In general, this tool can only serve as one of many potential indicators that an image was AI-generated. Images scoring as very probably artificial (e.g. 90% or higher) could be referred to a human expert for further investigation, if needed.
27
+
28
+ For more information please see the blog post describing this project at:
29
+ https://medium.com/@matthewmaybe/can-an-ai-learn-to-identify-ai-art-545d9d6af226
30
+
31
+ # Model Trained Using AutoTrain
32
+
33
+ - Problem type: Binary Classification
34
+ - Model ID: 1519658722
35
+ - CO2 Emissions (in grams): 7.9405
36
+
37
+ ## Validation Metrics
38
+
39
+ - Loss: 0.163
40
+ - Accuracy: 0.942
41
+ - Precision: 0.938
42
+ - Recall: 0.978
43
+ - AUC: 0.980
44
+ - F1: 0.958
45
+
46
+ # License Notice
47
+
48
+ This work is licensed under a [Creative Commons Attribution-NoDerivatives 4.0 International License](https://creativecommons.org/licenses/by-nd/4.0/).
49
+
50
+ You may distribute and make this model available to others as part of your own web page, app, or service so long as you provide attribution. However, use of this model within text-to-image systems to evade AI image detection would be considered a "derivative work" and as such prohibited by the license terms.
config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "AutoTrain",
3
+ "architectures": [
4
+ "SwinForImageClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.0,
7
+ "depths": [
8
+ 2,
9
+ 2,
10
+ 18,
11
+ 2
12
+ ],
13
+ "drop_path_rate": 0.1,
14
+ "embed_dim": 128,
15
+ "encoder_stride": 32,
16
+ "hidden_act": "gelu",
17
+ "hidden_dropout_prob": 0.0,
18
+ "hidden_size": 1024,
19
+ "id2label": {
20
+ "0": "artificial",
21
+ "1": "human"
22
+ },
23
+ "image_size": 224,
24
+ "initializer_range": 0.02,
25
+ "label2id": {
26
+ "artificial": "0",
27
+ "human": "1"
28
+ },
29
+ "layer_norm_eps": 1e-05,
30
+ "max_length": 128,
31
+ "mlp_ratio": 4.0,
32
+ "model_type": "swin",
33
+ "num_channels": 3,
34
+ "num_heads": [
35
+ 4,
36
+ 8,
37
+ 16,
38
+ 32
39
+ ],
40
+ "num_layers": 4,
41
+ "padding": "max_length",
42
+ "patch_size": 4,
43
+ "path_norm": true,
44
+ "problem_type": "single_label_classification",
45
+ "qkv_bias": true,
46
+ "torch_dtype": "float32",
47
+ "transformers_version": "4.22.1",
48
+ "use_absolute_embeddings": false,
49
+ "window_size": 7
50
+ }
preprocessor_config.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_resize": true,
4
+ "feature_extractor_type": "ViTFeatureExtractor",
5
+ "image_mean": [
6
+ 0.485,
7
+ 0.456,
8
+ 0.406
9
+ ],
10
+ "image_std": [
11
+ 0.229,
12
+ 0.224,
13
+ 0.225
14
+ ],
15
+ "resample": 3,
16
+ "size": 224
17
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4c14ed23eb1d65b1c6ca7b163f8f91bebcf3a4d8c275296c850c9f1bbd01daf
3
+ size 347596479