Gender classification (TensorFlow / TFLite)

TensorFlow and TFLite conversion of rizvandwiki/gender-classification-2 (ViT). Please check the original model card for license and training details.

Files

  • gender_model.tflite : mobile model (float16)
  • tf_model.h5 : TensorFlow (Keras) weights
  • labels.txt : 0 = female, 1 = male

Input / preprocessing

  • Shape: [1, 3, 224, 224] (channels first, RGB)
  • Normalize: (pixel / 255 - 0.5) / 0.5
  • Detect and crop the face before running the model.
  • Output: 2 logits -> apply softmax.

Note: converted with SELECT_TF_OPS, so on Android add org.tensorflow:tensorflow-lite-select-tf-ops.

Python example

import numpy as np, tensorflow as tf
from huggingface_hub import hf_hub_download

path = hf_hub_download("SynthAIzer/gender-classification-tflite", "gender_model.tflite")
interp = tf.lite.Interpreter(model_path=path)
interp.allocate_tensors()
Downloads last month
4,178
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for SynthAIzer/gender-classification-tflite

Finetuned
(1)
this model