SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1710.07557 · 2017

Real-time Convolutional Neural Networks for Emotion and Gender Classification

arXiv · PDF · Open in the Atlas

Code that ran

9 of 17 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 6 have no contract verdict; 2 failures of our instrument; 8 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1710.07557.json · badge: /api/ran/1710.07557.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
oarriaga/face_classification canonical (classifier label)
classifier basis: census
7 ran · 5 no recorded run
kbsriharsha/FacialEmotionAnalysis community (classifier label)
classifier basis not recorded on the link
2 ran · 3 no recorded run
FunctionStatusWhere it lives
detect_faces Ran
ran on a synthesized input
oarriaga/face_classification/src/utils/inference.py
code served (permissive licence) · get_code("ea715a0ce88dd115")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family int, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import cv2
import numpy as np

class MockDetectionModel:
    """Minimal mock of OpenCV's CascadeClassifier with detectMultiScale method."""
    
    def detectMultiScale(self, gray_image_array, scale_factor, min_neighbors):
        """
        Mock implementation that returns a small array of detected face rectangles.
        Expected to receive a grayscale image array and detection parameters.
        Returns an array of (x, y, w, h) rectangles.
        """
        # Return a mock detection result: 2 detected faces
        # Format: array of [x, y, width, height]
        return np.array([
            [10, 20, 30, 40],
            [50, 60, 35, 45]
        ], dtype=np.int32)

# Create a small grayscale image array (similar to what cv2.cvtColor produces)
# Using shape (100, 120) for a small test image
gray_image_array = np.random.randint(0, 256, (100, 120), dtype=np.uint8)

# Instantiate the mock detection model
detection_model = MockDetectionModel()

ARGS = {
    "detection_model": detection_model,
    "gray_image_array": gray_image_array
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family int, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_class_to_arg Ran
ran on a synthesized input
oarriaga/face_classification/src/utils/datasets.py
code served (permissive licence) · get_code("9bb714a4a4dae579")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

ARGS = {
    'dataset_name': 'fer2013'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_labels Ran
ran on a synthesized input
oarriaga/face_classification/src/utils/datasets.py
code served (permissive licence) · get_code("01103e164586ab01")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function get_labels takes a dataset_name string parameter
# and returns a dictionary mapping class indices to label strings.
# It validates the dataset_name against three allowed values:
# 'fer2013', 'imdb', or 'KDEF'

ARGS = {
    'dataset_name': 'fer2013'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
preprocess_input Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kbsriharsha/FacialEmotionAnalysis/src/preprocessing.py
code served (permissive licence) · get_code("c0ce67208d8c54a6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family float, shape (2, 4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

torch_seed = 0

# The function expects x to have an astype method and support division/subtraction
# This means it should be a numpy array
x = np.random.randint(0, 256, size=(2, 4, 3), dtype=np.uint8)

ARGS = {
    'x': x,
    'v2': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
preprocess_predict Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kbsriharsha/FacialEmotionAnalysis/src/preprocessing.py
code served (permissive licence) · get_code("e8c2e8860568415c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 4, dtype family float, shape (1, 4, 3, 1) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small numpy array to use as input
# The function expects an array that can be cast to float32
# Using a small 4x3 array (height x width)
x = np.array([
    [100, 150, 200],
    [50, 75, 125],
    [25, 175, 225],
    [10, 255, 128]
], dtype=np.uint8)

ARGS = {
    'x': x,
    'v2': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family float, shape (1, 4, 3, 1) — shape (1, 4, 3, 1) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
simple_CNN Ran
ran on a synthesized input
oarriaga/face_classification/src/models/cnn.py
code served (permissive licence) · get_code("288f965ba17d3dc1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Sequential. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Set random seeds for reproducibility
np.random.seed(0)

# Define arguments for simple_CNN function
input_shape = (64, 64, 3)  # Height, Width, Channels - small image dimensions
num_classes = 10  # Number of output classes

ARGS = {
    'input_shape': input_shape,
    'num_classes': num_classes,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
simpler_CNN Ran
ran on a synthesized input
oarriaga/face_classification/src/models/cnn.py
code served (permissive licence) · get_code("f17350e0fc08aaa3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Sequential. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'

ARGS = {
    'input_shape': (4, 3, 3),
    'num_classes': 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
split_imdb_data Ran
ran on a synthesized input
oarriaga/face_classification/src/utils/datasets.py
code served (permissive licence) · get_code("de394cf0581e86de")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from random import shuffle

# Construct ground_truth_data - a dict with string keys
# The function calls .keys() and iterates over the keys
ground_truth_data = {
    "sample_1": {"text": "This is a positive review", "label": 1},
    "sample_2": {"text": "This is a negative review", "label": 0},
    "sample_3": {"text": "Another positive example", "label": 1},
    "sample_4": {"text": "Another negative example", "label": 0},
    "sample_5": {"text": "Yet another review", "label": 1},
}

ARGS = {
    "ground_truth_data": ground_truth_data,
    "validation_split": 0.2,
    "do_shuffle": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
target_category_loss_output_shape Ran
ran, violated the contract we drafted
oarriaga/face_classification/src/utils/grad_cam.py
pointer only (licence: MIT); the stored copy get_code serves, from itanvir/gradcam, is pointer only (licence: NONE) · get_code("9a37dad461d6891c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from itanvir/gradcam, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

cnn_model Not yet run
unverified (harvested, no recorded run)
kbsriharsha/FacialEmotionAnalysis/src/models.py
code served (permissive licence) · get_code("8c0c55fa5e55bece")
How it ran

no invocation recorded.

load_data Not yet run
unverified (harvested, no recorded run)
kbsriharsha/FacialEmotionAnalysis/src/preprocessing.py
code served (permissive licence) · get_code("00501621475bd518")
How it ran

no invocation recorded.

load_detection_model Not yet run
unverified (harvested, no recorded run)
oarriaga/face_classification/src/utils/inference.py
code served (permissive licence) · get_code("96416b6ab9161616")
How it ran

no invocation recorded.

load_image Not yet run
unverified (harvested, no recorded run)
oarriaga/face_classification/src/utils/inference.py
code served (permissive licence) · get_code("09594e7b78e84cce")
How it ran

no invocation recorded.

mini_xception Not yet run
unverified (harvested, no recorded run)
kbsriharsha/FacialEmotionAnalysis/src/models.py
code served (permissive licence) · get_code("f94b7628171c3c3f")
How it ran

no invocation recorded.

normalize Not yet run
unverified (harvested, no recorded run)
oarriaga/face_classification/src/utils/grad_cam.py
code served (permissive licence) · get_code("63b6fe40629c7060")
How it ran

no invocation recorded.

target_category_loss Not yet run
unverified (harvested, no recorded run)
oarriaga/face_classification/src/utils/grad_cam.py
code served (permissive licence) · get_code("3b921b99ecf61bef")
How it ran

no invocation recorded.

tiny_XCEPTION Not yet run
unverified (harvested, no recorded run)
oarriaga/face_classification/src/models/cnn.py
code served (permissive licence) · get_code("df94886fbbf70773")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 14 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
normalize 1 other paper
1 dated earlier
1610.02391 (2016-10)
Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization
preprocess_input 1 other paper
1 dated earlier
1610.02357 (2016-10)
Xception: Deep Learning with Depthwise Separable Convolutions
target_category_loss_output_shape 1 other paper
1 dated earlier
1610.02391 (2016-10)
Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

In this paper we propose an implement a general convolutional neural network (CNN) building framework for designing real-time CNNs. We validate our models by creating a real-time vision system which accomplishes the tasks of face detection, gender classification and emotion classification simultaneously in one blended step using our proposed CNN architecture. After presenting the details of the training procedure setup we proceed to evaluate on standard benchmark sets. We report accuracies of 96% in the IMDB gender dataset and 66% in the FER-2013 emotion dataset. Along with this we also introduced the very recent real-time enabled guided back-propagation visualization technique. Guided back-propagation uncovers the dynamics of the weight changes and evaluates the learned features. We argue that the careful implementation of modern CNN architectures, the use of the current regularization methods and the visualization of previously hidden features are necessary in order to reduce the gap between slow performances and real-time architectures. Our system has been validated by its deployment on a Care-O-bot 3 robot used during RoboCup@Home competitions. All our code, demos and pre-trained architectures have been released under an open-source license in our public repository.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1710.07557")
get_code_for_paper("1710.07557")
have("1710.07557")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1710.07557.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1710.07557.svg)](https://syntology.ai/paper/1710.07557)

Connect an agent — have() is free.