Back to projects
Computer vision · Academic researchIn progress

Synthetic Face Detector

A model is only as good as its evaluation.

A real-vs-synthetic face classification project. Rebuilding a CNN baseline around controlled data splits before comparing transfer-learning models.

My contribution

Dataset protocol & CNN baseline

Built with

Python / Keras / CNN / Google Colab

Evaluation protocol · RVF10K
X

The outcome

Established a controlled baseline experiment for real-vs-synthetic face classification.

Y

The evidence

A versioned split manifest, notebook and evaluation report from the earlier experiment. The new baseline is in progress.

Z

The approach

Defined separate training, validation and test sets, then trained and evaluated a custom CNN.

Inside the build

Explore the system

Open a stage to see how it works and why it was designed this way.

01Audit dataRVF10K

The controlled dataset contains 10,000 face images: 5,000 real and 5,000 StyleGAN-generated.

Engineering decision

Audit paths and labels before training. This dataset does not establish generalization to every face generator.

02Fix splits7,000 / 1,500 / 1,500

A manifest defines disjoint training, validation and test sets for comparable experiments.

Engineering decision

Use validation for model selection. Keep the test set out of architecture and hyperparameter decisions.

03Train baselineCustom CNN

A custom CNN provides the reference experiment. The current academic iteration is being rebuilt from data preparation.

Engineering decision

Establish a reproducible baseline before adding model complexity or claiming improvements.

04EvaluatePrecision · Recall · F1

Inspect class-level performance alongside accuracy. Comparisons with VGG-19, ResNet and MobileNet are planned.

Engineering decision

Separate historical measurements from the current rebuild and document the limits of the benchmark.

Implementation walkthrough · not a live inference demo

The problem

Can a CNN distinguish real faces from synthetic faces in a controlled dataset? Answering that question requires more than a training score. The experiment needs documented labels, fixed splits and a test set that does not influence model selection.

This is an academic project, with my contribution focused on the split protocol and custom CNN baseline. A new iteration is being rebuilt from data preparation before comparisons with transfer-learning models.

Treat evaluation as part of the system

Fix the experiment before changing the model

RVF10K contains 5,000 real faces sourced from FFHQ/NVIDIA and 5,000 synthetic StyleGAN faces. A manifest assigns 7,000 images to training, 1,500 to validation and 1,500 to test. Those assignments make experiments comparable.

Separate selection from evaluation

Validation guides model selection. The test set is reserved for final evaluation, not for choosing architectures, epochs or hyperparameters. Class-level precision, recall and F1 complement accuracy.

Establish a baseline first

A custom CNN is the reference. VGG-19, ResNet and MobileNet comparisons are planned under the same protocol; they are not presented as completed experiments.

Historical result, explicit scope

The previous experiment reported 76.27% test accuracy, with precision, recall and F1 around 0.76 for both classes. Its notebook, report and partition manifest are versioned in a private repository.

That number belongs to the previous experiment, not the current rebuild. It measures performance on this controlled dataset and does not establish robustness to newer generators, compression or faces from a different distribution.

Reproducibility includes the artifacts

The earlier model checkpoint was saved in Colab's temporary filesystem and was not preserved. That limits reproduction from saved weights and makes retraining necessary.

The next step is to audit paths, labels and partitions again, rebuild the CNN, preserve its checkpoint and only then compare models. No public inference demo is available at this stage.

Build / Verify / Learn

Evidence over adjectives.

Historical baseline

The previous test reported 76.27% accuracy on RVF10K. This is not a result of the current rebuild or a production claim.

Reproducibility artifacts

Split manifest, notebook and report are in a private repository. The original Colab checkpoint was not preserved; retraining is necessary.

Next case study

Trilinea Arquitectura