kenjon commited on
Commit
4981b83
·
verified ·
1 Parent(s): c9ad0db

Add dummy discriminator model

Browse files
Files changed (4) hide show
  1. README.md +50 -0
  2. model.onnx +3 -0
  3. model_metadata.json +53 -0
  4. requirements.txt +3 -0
README.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dummy Discriminator Model
2
+
3
+ This is a dummy discriminator model for testing purposes.
4
+
5
+ ## Model Information
6
+
7
+ - **Model Type**: Detection
8
+ - **Input**: RGB images (224x224)
9
+ - **Output**: 3-class classification (real, synthetic, semisynthetic)
10
+ - **Framework**: ONNX
11
+
12
+ ## Usage
13
+
14
+ ```python
15
+ import onnxruntime as ort
16
+ import numpy as np
17
+
18
+ # Load model
19
+ session = ort.InferenceSession("model.onnx")
20
+
21
+ # Prepare input
22
+ input_data = np.random.randn(1, 3, 224, 224).astype(np.float32)
23
+
24
+ # Run inference
25
+ input_name = session.get_inputs()[0].name
26
+ output_name = session.get_outputs()[0].name
27
+ outputs = session.run([output_name], {input_name: input_data})
28
+
29
+ # Get prediction
30
+ prediction = np.argmax(outputs[0][0])
31
+ classes = ["real", "synthetic", "semisynthetic"]
32
+ print(f"Prediction: {classes[prediction]}")
33
+ ```
34
+
35
+ ## Model Performance
36
+
37
+ - Accuracy: 85%
38
+ - Precision: 83%
39
+ - Recall: 87%
40
+ - F1-Score: 85%
41
+
42
+ ## Dependencies
43
+
44
+ - onnxruntime >= 1.15.0
45
+ - numpy >= 1.21.0
46
+ - torch >= 2.0.0
47
+
48
+ ## License
49
+
50
+ MIT License
model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c50b4f0c91bf95080a4cd18ca5205981c01d3769988e3d6db82aaaa0d59d8db0
3
+ size 22274
model_metadata.json ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_id": "dummy_discriminator_v1",
3
+ "model_type": "detection",
4
+ "description": "Dummy discriminator model for testing",
5
+ "version": "1.0.0",
6
+ "author": "kenjon",
7
+ "architecture": {
8
+ "base_model": "custom_cnn",
9
+ "num_classes": 3,
10
+ "input_shape": [
11
+ 3,
12
+ 224,
13
+ 224
14
+ ],
15
+ "output_shape": [
16
+ 3
17
+ ],
18
+ "model_type": "detection"
19
+ },
20
+ "preprocessing": {
21
+ "normalization": "imagenet",
22
+ "resize": [
23
+ 224,
24
+ 224
25
+ ],
26
+ "augmentation": [
27
+ "random_horizontal_flip"
28
+ ]
29
+ },
30
+ "training": {
31
+ "optimizer": "adam",
32
+ "learning_rate": 0.001,
33
+ "batch_size": 32,
34
+ "epochs": 10,
35
+ "loss_function": "cross_entropy"
36
+ },
37
+ "performance": {
38
+ "accuracy": 0.85,
39
+ "precision": 0.83,
40
+ "recall": 0.87,
41
+ "f1_score": 0.85
42
+ },
43
+ "dependencies": {
44
+ "onnxruntime": ">=1.15.0",
45
+ "numpy": ">=1.21.0",
46
+ "torch": ">=2.0.0"
47
+ },
48
+ "usage": {
49
+ "input_format": "numpy array (3, 224, 224)",
50
+ "output_format": "numpy array (3,) - probabilities for [real, synthetic, semisynthetic]",
51
+ "example": "model.predict(image_array)"
52
+ }
53
+ }
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ onnxruntime>=1.15.0
2
+ numpy>=1.21.0
3
+ torch>=2.0.0