Downloads · 30 days
0
arsath-sm/face_classification_model1
face_classification_model1 is a image classification model from arsath-sm. Use it when you need a label for an image. The card lists the license as mit.
--- language: en tags: - image-classification - computer-vision - deep-learning - face-detection - resnet datasets: - custom license: mit ---
Downloads · 30 days
0
Access
Public
Updated Oct 26, 2024
Repo size
136 MB
Likes
1
Public
Click a slice to open those files.
.h5136 MB · 100%
From the Hugging Face model README
language: en tags:
This model is trained to distinguish between real human faces and AI-generated faces using a ResNet-based architecture.
Binary classification to determine if a face image is real (human) or AI-generated.
optimizer = Adam(learning_rate=0.0001)
loss = 'binary_crossentropy'
metrics = ['accuracy']
from tensorflow.keras.models import load_model
import cv2
import numpy as np
# Load the model
model = load_model('face_classification_model1')
# Preprocess image
def preprocess_image(image_path):
img = cv2.imread(image_path)
img = cv2.resize(img, (224, 224))
img = img / 255.0
return np.expand_dims(img, axis=0)
# Make prediction
image = preprocess_image('face_image.jpg')
prediction = model.predict(image)
is_real = prediction[0][0] > 0.5
This model is designed for research and educational purposes only. Users should:
Current performance limitations:
Recommended improvements:
@software{face_classification_model1,
author = {Your Name},
title = {Face Classification Model using ResNet Architecture},
year = {2024},
publisher = {HuggingFace},
url = {https://huggingface.co/arsath-sm/face_classification_model1}
}
University of Jaffna
This model is licensed under the MIT License.