Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files
README.md
CHANGED
@@ -33,7 +33,7 @@ https://huggingface.co/spaces/Digital-Detectives/AI-vs-Real-Image-Detection
|
|
33 |
|
34 |
## UI
|
35 |
|
36 |
-
https://
|
37 |
|
38 |
## Project Outline
|
39 |
The goal of this project is to develop a deep learning model that can accurately distinguish between real images and AI-generated images. We will collect datasets of real images and fake images. The data will be preprocessed, normalized, and augmented to enhance training. Using TensorFlow and Keras, we will design a Convolutional Neural Network (CNN) for classification, and validating performance through a confusion matrix. Finally, the project will include documentation of the process, findings, and suggestions for future improvements.
|
|
|
33 |
|
34 |
## UI
|
35 |
|
36 |
+
<video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/671fc13a4b2e5a664a9d3137/ZSo6v5V3QK-ip-PPHW_be.mp4"></video>
|
37 |
|
38 |
## Project Outline
|
39 |
The goal of this project is to develop a deep learning model that can accurately distinguish between real images and AI-generated images. We will collect datasets of real images and fake images. The data will be preprocessed, normalized, and augmented to enhance training. Using TensorFlow and Keras, we will design a Convolutional Neural Network (CNN) for classification, and validating performance through a confusion matrix. Finally, the project will include documentation of the process, findings, and suggestions for future improvements.
|
app.py
CHANGED
@@ -74,28 +74,28 @@ def run_cnn(img_arr):
|
|
74 |
|
75 |
# efficientnet model
|
76 |
def run_effNet(img_arr):
|
77 |
-
try:
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
except ValueError:
|
83 |
-
|
84 |
-
with strategy.scope():
|
85 |
-
|
86 |
return prediction
|
87 |
|
88 |
# efficientnet art model
|
89 |
def run_effNet_Art(img_arr):
|
90 |
-
try:
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
except ValueError:
|
96 |
-
|
97 |
-
with strategy.scope():
|
98 |
-
|
99 |
return prediction
|
100 |
|
101 |
# preprocess images for efficient net
|
|
|
74 |
|
75 |
# efficientnet model
|
76 |
def run_effNet(img_arr):
|
77 |
+
# try:
|
78 |
+
# resolver = tf.distribute.cluster_resolver.TPUClusterResolver()
|
79 |
+
# tf.config.experimental_connect_to_cluster(resolver)
|
80 |
+
# tf.tpu.experimental.initialize_tpu_system(resolver)
|
81 |
+
# strategy = tf.distribute.TPUStrategy(resolver)
|
82 |
+
# except ValueError:
|
83 |
+
# strategy = tf.distribute.get_strategy()
|
84 |
+
# with strategy.scope():
|
85 |
+
prediction = eff_net_model.predict(img_arr)
|
86 |
return prediction
|
87 |
|
88 |
# efficientnet art model
|
89 |
def run_effNet_Art(img_arr):
|
90 |
+
# try:
|
91 |
+
# resolver = tf.distribute.cluster_resolver.TPUClusterResolver()
|
92 |
+
# tf.config.experimental_connect_to_cluster(resolver)
|
93 |
+
# tf.tpu.experimental.initialize_tpu_system(resolver)
|
94 |
+
# strategy = tf.distribute.TPUStrategy(resolver)
|
95 |
+
# except ValueError:
|
96 |
+
# strategy = tf.distribute.get_strategy()
|
97 |
+
# with strategy.scope():
|
98 |
+
prediction = eff_net_art_model.predict(img_arr)
|
99 |
return prediction
|
100 |
|
101 |
# preprocess images for efficient net
|