Paper-based attendance, magnetic cards and fingerprint readers all run into the same recurring problems: they are easy to manipulate, they are slow, and the data cannot be trusted when it is time to calculate payroll. Face recognition approaches this differently — the camera compares faces automatically, with no physical contact and no queue.

But implementing it is not just mounting a camera and calling a library. This article covers how the recognition pipeline works at a technical level, which libraries suit conditions in Indonesia, why liveness detection is mandatory, how to satisfy personal data protection principles, and the results from a real implementation for a manufacturer with five branches.

How Face Recognition Works

Simply put, a face recognition system compares the face detected by the camera against a database of registered employee faces. Behind that simplicity are four technical stages that run on every frame, and each has its own failure mode.

  • Face detection: the algorithm finds where faces are in the image (a bounding box), not what the faces are
  • Face alignment: each face is rotated and scaled to a canonical position, because matching is inaccurate on a tilted face
  • Face encoding: the face becomes a 128 to 512 dimension biometric feature vector that represents shape, not a picture
  • Face matching: the camera vector is compared against the stored vector, producing a similarity score

Alignment is the stage most often skipped, and it decides the outcome. A face tilted by fifteen degrees already drops the similarity score far enough to fail a match that should have succeeded. In an attendance system this is why false rejection spikes in the morning, when employees are still half asleep and their faces are still creased from sleep.

Seven stages of the face recognition pipeline, from camera frame to attendance record.

Liveness Detection: The Layer That Decides It

Without liveness detection, a face recognition system only recognises faces. That means anyone can replay a video from the same camera, or hold up a photograph on a phone, and the system will record attendance for someone who is not there. For attendance this is not a minor defect — it cancels out the entire purpose of the system.

Three liveness techniques are common, each with a different confidence level and computational cost.

  • Challenge-response: the system asks for a specific action, such as blinking or turning the head. Cheap and effective, but it adds a second to the punch-in flow
  • Depth analysis: a depth sensor or stereo camera confirms there is volume, so a flat photograph cannot pass. Stronger with no interaction, but the hardware costs more
  • Microscopic texture analysis: the algorithm examines the skin pattern at pixel level to tell real skin from a printed surface
Practical note

For ordinary office attendance, challenge-response is enough and the cheapest option. Depth techniques are worth it when the site carries high risk or the protected asset is valuable.

Libraries That Fit Conditions Here

Several main options come up in practice, each with its own tradeoffs.

  • face-api.js (TensorFlow.js): runs in the browser with no cloud involvement, is free, and suits architectures where biometric data must never leave the local network
  • InsightFace (Python): high accuracy on standard benchmarks, supports many models, and is the usual choice for the server side
  • Cloud APIs from the major vendors: accurate and quick to implement, but they cost per video call, depend on an internet connection, and send biometric data out of your control

For most companies in Indonesia, face-api.js in the browser is the option that often goes unconsidered, and its advantage is real. Most companies that integrate it end up on our API development and integration practice, and the employee portal is usually a custom web application. The advantage is: biometric data never leaves the local network, running cost approaches zero, and the system keeps working when the internet is down. Its cost is slightly lower accuracy than large server models, and the device has to be capable enough.

Attendance Methods and Their Risks

Before choosing face recognition, compare the risks honestly. For wider context, see building an ERP system for SMEs. The table below summarises what we have seen in the field with each method.

MethodManipulation RiskFailure RiskNote
Face recognition<1% proxying1-3% false rejectionNeeds stable light
Fingerprint±2% proxying2-5% false rejectionFingertips wear out
RFID card10-20% proxying<1% false rejectionCards get lost or borrowed
Manual phone log15-30% manipulated0% false rejectionSlow queue, data errors

Comparison of proxying and false rejection risk across four attendance methods.

Look at the second column: face recognition wins outright on manipulation. The third column shows its risk shifts to false rejection — the person really is there but the system does not recognise them. Both have to be handled, and usually with different approaches.

Case Study: A Manufacturing Client

One of our clients, a manufacturer with five branches and more than 250 employees, had a recurring and serious attendance problem that kept surfacing in payroll reports.

  • Around 12% of daily punches were actually proxy attendance — borrowed cards or photographs
  • A ten to fifteen minute queue at the staff gate every morning
  • Payroll reports regularly needed re-reconciliation because the attendance figures did not match HR records

The first discovery session showed the root cause was not the attendance system itself, but the payroll process pulling from three different sources. Once discussed with the HR team, the focus shifted: what needed fixing was the data path, not only the tool doing the punching.

The Solution We Built

  • A PWA with IP cameras at five gates across different locations
  • Face recognition via face-api.js in the browser, so biometric data never leaves the local network
  • Self-service employee enrolment through the PWA, so adding a new employee needs no operator
  • Attendance data synced to the payroll system through a scheduled API rather than manual entry
  • A per-branch dashboard with anomaly detection — days with unusual spikes are flagged automatically

Running face-api.js in the browser has a technical consequence worth understanding, especially when the gate devices have to sync with internal enterprise systems: the devices at the gates need enough compute, and the model has to be cached at boot so it is not re-downloaded every day. For dedicated gate hardware that is normal. For employees' own phones it can be heavy.

Results After Six Months

  • The queue disappeared entirely, averaging 1.5 seconds per verification
  • Proxy attendance fell from 12% to under 1%
  • Real-time visibility for the HR manager across all five branches
  • Payroll reconciliation now takes hours rather than days

The most interesting result was not the attendance figures themselves, but the change on the process side — the fuller comparison is in our cost guide. Once attendance data reached payroll through one clear path, the numbers in the reports became trustworthy — and that is what makes attendance worth anything in the first place, because data that never gets used is worthless.

Privacy and Personal Data Compliance

Implementing face recognition in Indonesia cannot be separated from data protection law. For biometrics there are several things that must be designed in from the start rather than added later.

  • Employee consent has to exist and be documented, not just a silent click
  • Face embeddings are stored as feature vectors rather than original photographs, so a data leak is far harder to reconstruct
  • Access logs — who accessed what, and when
  • A deletion process when an employee leaves, matching the rights the law grants them
  • A clear, automatically enforced retention period

One thing often missed: a valid consent has to explain the purpose and the consequences. An employee who refuses without a clear explanation will look for a way around it, and the whole system can end up bypassed. Transparency at the start costs far less than chasing it afterwards.

When Face Recognition Is the Wrong Choice

Face recognition is not a universal answer. There are conditions where a different approach is simply better, particularly when the system stands alone with no payroll integration.

  • Small teams under 30 people at a single site — digitising the manual attendance they already have is almost always cheaper
  • Locations with unstable lighting and no ability to improve it
  • Staff who work with heavy equipment or keep their faces covered on the production floor
  • Organisations that do not yet have a tidy data process for attendance — fixing that first has more impact
Survey the Site Before Choosing a Method

Cost and feasibility of face recognition depend heavily on lighting, the number of camera points, network conditions, and how well it fits the payroll system you already run. The site survey and first consultation carry no fee, and we regularly tell clients that a different approach suits their situation better.

Consult via WhatsApp

Frequently Asked Questions

How accurate is face recognition for office attendance?+
Under good lighting with correct alignment, face recognition reaches a false rejection rate of roughly 1-3% in attendance deployments. That figure can climb to 10-15% in rooms with unstable light or cameras mounted badly. Which is why a lighting survey before installation matters more than picking the best model available.
Is it safe to store employee face data on a server?+
What determines safety is not where the data is stored but what is stored. A face embedding as a vector of hundreds of dimensions is far harder to reuse than an original photograph, and can be rotated if a leak happens. What must exist: encryption at rest, access logging, documented consent, and a deletion process when someone leaves.
How much does a face recognition attendance system cost to build?+
The cost splits into hardware, development and operations. For an organisation with several locations the largest component is usually not the application but the cameras and the installation work across many points. That is why many clients we work with start with one site and one gate, then expand once the results are proven.
Can face recognition work offline without an internet connection?+
Yes, and that is one of the reasons to choose face-api.js. The model is cached on the device, inference runs entirely in the browser, and results are stored locally until the connection returns. This matters for factories and warehouses where the internet is unreliable.
What does accurate face recognition require?+
Four things: cameras fixed at known points with controlled lighting, clean and documented enrolment, an algorithm recalibrated on a schedule, and a fallback procedure for the cases where recognition fails. For most organisations, our IT consulting and maintenance team handles the device installation. Even the best system fails if enrolment is sloppy or the lighting changes.

The first consultation carries no fee and commits you to nothing. We are open about advising clients when fixing manual attendance is enough, and custom development is only worth it when the problem is structural. If you want to know whether your case falls into that category, talk to our team and we will give you a straight answer, including when that answer is that you do not need this yet.