1.4 Machine Learning Applications

Overview: Machine Learning Applications

Lesson 1.3 explained how machine learning learns and the kinds of answers it gives. This lesson shows where you will find it on CCTV and access control jobs, and then gives you a simple way to check how well an AI feature is really working on a customer's site.

Lesson 1.4: Introduction

By the end of this lesson, you will be able to do the following.

  • Identify common machine learning applications in CCTV and access control.
  • Measure how well an AI feature works by counting correct alerts, nuisance alerts, and misses.
  • Choose an alert setting that fits the risk at a site.
Why it matters

A counted number beats a brochure number

Customers will tell you the system "never works" or "used to work." Manufacturers will tell you it is "99% accurate." A simple count of one hour of the customer's own video settles both arguments with facts.

Where you will see it

Machine learning applications on the job

These are the AI features you are most likely to sell, install, or service. The "answer type" ties each one to the four kinds of answers from Lesson 1.3. Later modules cover each one in detail.

On cameras (CCTV)

Person and vehicle detection

Alerts only when a person or vehicle enters a zone, instead of on any motion.

Answer typeA label
ExampleA warehouse fence alerts on people after hours and ignores blowing trash.

License plate recognition

Reads plate characters from video and checks them against a list.

Answer typeA label for each character
ExampleA condo garage gate logs every plate that enters overnight.

Search by appearance

Finds people or vehicles by what they look like, such as clothing color or vehicle type.

Answer typeA label, saved for search
ExampleA hotel searches for "red jacket" across lobby and parking cameras.

Counting and occupancy

Counts people or vehicles passing a line or inside an area.

Answer typeA number
ExampleA hospital counts visitors at the main entrance each hour.

Loitering and wrong-way alerts

Flags someone staying too long or moving against normal traffic.

Answer typeAn "unusual" score or a rule on top of a label
ExampleAn apartment community flags a person lingering by the mail room at 2 a.m.

Plain-language search and summaries

Lets you type a search or receive a written summary of an event.

Answer typeNew written content (generative AI)
ExampleA business owner types "white van near the dock" to find clips.

At doors (access control)

Face as a credential

A reader recognizes an enrolled face instead of, or along with, a badge.

Answer typeA match or no match
ExampleStaff at a hospital pharmacy door present a badge and their face.

Tailgating detection

A camera at the door counts how many people pass on one badge.

Answer typeA count compared to badge events
ExampleAn office lobby flags two people entering on one badge swipe.

Unusual badge activity

Learns normal badge patterns and flags activity that does not fit.

Answer typeAn "unusual" score
ExampleA badge used at a warehouse door at 3 a.m. for the first time.

Alarm sorting

Helps rank door alarms so operators see the important ones first.

Answer typeA label or a score
ExampleRepeated door-held alarms at a busy apartment entrance are grouped together.
The common thread. Every one of these features can be right, wrong, or silent. The rest of this lesson shows you how to count which, so you can tell a customer how well it really works.
Watch (optional)AI vs Machine Learning vs Deep Learning

An 11-minute video that compares AI, machine learning, and deep learning using everyday examples, such as spam filters and face unlock on a phone, and explains when each one is the right tool.

The Four Outcomes of Every Alert Decision

Every alert decision lands in one of four boxes. Two of them are the arguments you already have with customers.

Any detector answering a yes-or-no question, such as is there a person in this zone?, produces one of four outcomes on every decision.

Person present (ground truth)
No person (ground truth)
System alerted
True Positive (TP)Correct alarm
False Positive (FP)Nuisance alarm
System did not alert
False Negative (FN)Missed intrusion
True Negative (TN)Correctly quiet

Remember these two terms. False positive equals nuisance alarm. False negative equals missed intrusion. Every conversation you have about analytics performance comes down to the balance between those two.

Count One Day of Alerts at a Loading Dock

One loading dock camera running person detection. A technician reviews 24 hours of recorded footage and counts what actually happened against what the system did.

Closed roll-up loading dock door on a commercial building
Photo by Robinson Greig on Unsplash

The counts

One hundred real person entries occurred. The system alerted on 90 of them, so TP = 90 and FN = 10. It also produced 60 alerts with no person present (cats, a headlight sweep, a blowing tarp, rain streaks), so FP = 60. Across the day, 10,000 analysis windows contained no person and correctly produced no alert, so TN = 10,000.

90True positives
10False negatives
60False positives
10,000True negatives

Precision 60.0%

TP / (TP + FP) = 90 / 150

When the system alerts, how often is a person really there? Of every ten alerts an operator opens, six are real and four waste their time.

The operator's experience

Recall 90.0%

TP / (TP + FN) = 90 / 100

Of everything that actually happened, how much did we catch? One intrusion in ten went undetected. Your industry already has a name for recall. It is called probability of detection.

The security outcome

F1 score 72.0%

2 × (P × R) / (P + R)

A single blended figure for comparing systems. It uses the harmonic mean because it punishes imbalance. A system with 100% recall and 2% precision scores an F1 of 3.9%, where a simple average would flatter it at 51%.

Comparing systems

Accuracy 99.31%

(TP + TN) / all = 10,090 / 10,160

Looks excellent. Read the chart below and the box after it before you trust it.

The vendor's brochure
Why accuracy looks so goodA bar of all 10,160 decisions is almost entirely true negatives. The 160 decisions that matter, 90 true positives, 60 false positives and 10 false negatives, are a sliver at the end. Enlarged, that sliver shows 70 errors out of 160. All 10,160 decisions in the day True negatives 10,000 (98.4%). Nothing happened and the system correctly said nothing. The 160 decisions that matter, enlarged TP 90, real alarmsFP 60, nuisanceFN 10 70 of these 160 are errors. Accuracy hides them because it divides by all 10,160.
Why 99% can still miss people
This system is "99.3% accurate." It is also missing one intrusion in ten and wasting 40% of the operator's time. Both statements are true.

Accuracy is inflated by the enormous number of true negatives. That is all the time nothing happened and the system correctly said nothing. Because real security events are rare, true negatives dominate the arithmetic and accuracy becomes close to meaningless.

When a vendor quotes accuracy, ask for precision and recall. If they cannot give you both, the number is marketing.

What a Confidence Threshold Changes

The model gives every detection a confidence score. The threshold is the cutoff above which a detection becomes an alert.

Two bullet surveillance cameras mounted on an exterior wall
Photo by Scott Webb on Unsplash

The threshold is usually the only control a technician adjusts, and it moves precision and recall in opposite directions. Below is the same detector on the same footage at four settings. Select a threshold to see what the customer gets.

Recall
Precision

Show all four settings as a table
ThresholdTPFNFPRecallPrecisionWhat the customer experiences
0.3098240098.0%19.7%Catches nearly everything. Four of five alerts are junk. Operators disable it within a week.
0.5090106090.0%60.0%Typical factory default. Workable but noisy.
0.7075251275.0%86.2%Quiet and trustworthy, and silently missing one event in four.
0.904852248.0%96.0%Almost never wrong when it speaks. Misses more than half of everything.

No threshold improves both.

You are choosing which error to suffer. Improving both at once takes a better model or a better scene. That means better lighting, a tighter detection zone, a lower mounting angle, a longer lens, clean optics.

Set the threshold for the site and its risk, not the product default.

It is a risk decision the customer must make, and your job is to start that conversation. Favor recall where a miss is catastrophic and staff are available to respond. Favor precision where operator attention is the scarce resource.

Too many nuisance alarms means real events get missed.

A low-precision system produces alarm fatigue. Once nobody is looking, real-world detection collapses toward zero, even though the math says recall is high. Tell customers this plainly.

Document the threshold at commissioning.

Record it for each camera, and re-verify after firmware updates. Undocumented thresholds are the most common cause of "it used to work."

Why Rare Events Make Most Alerts False

Real intrusions are rare. That alone means even an excellent detector can generate mostly false alerts.

Empty parking lot at night under a single streetlight
Photo by Steven Cordes on Unsplash

Take an analytic with 99% recall and a 1% false positive rate per analysis window, on a camera that evaluates 1,000 windows an hour. In an hour with one real intrusion, you get roughly one true positive and roughly ten false positives.

One hour of analysis windowsA grid of 1,000 dots, one for each analysis window in an hour. Ten red dots are false alerts and one green dot is the single real intrusion, so roughly one alert in eleven is real. Quiet window (989) False alert (about 10) Real intrusion (1)

Precision is about 9%. The detector is doing exactly what it claims, and the operator experiences it as broken. This is the base rate problem. It is the arithmetic reason a low false positive rate still produces an unusable alert volume at scale.

It is also why the industry's practical unit is false alarms per camera per day rather than a percentage. Ask vendors for that figure.

Go deeper (optional)Where the AI runs, and what it costs. Lesson 2.1 covers this in full.

Where the Analytics Run, and What It Costs

Edge, cloud, or hybrid. The choice is driven by bandwidth first, then latency and privacy.

Network rack with patch cabling
Photo by Taylor Vick on Unsplash

Edge

Inference runs on or beside the sensor. That means inside the camera on a chip with a built-in accelerator, or on a nearby appliance or recorder. Raw video does not leave the site to be analyzed.

Cloud

Video or frames travel to a remote data center, and the analysis happens there.

Hybrid

Inference at the edge, orchestration in the cloud. This is a common design today. Detection runs locally and only metadata crosses the network.

Hybrid architectureAt the site, the camera runs inference and video stays on the local recorder. Only metadata, a few kilobits per second, goes to the cloud for orchestration, search and alerts. Full video is pulled on demand for the few events a person reviews. Sending every stream to the cloud instead would need about 3 megabits per second per camera, continuously. Customer site (edge) CameraAI chip runs inference RecorderFull video stays here video CloudOrchestration, search,alerts, updates Metadata only, a few kbps Video clip on demand, only for reviewed events Cloud-only instead, about 3 Mbps per camera, upstream, 24 hours a day

Bandwidth decides first, and the math is simple

A four-megapixel stream at 15 frames per second typically runs 2 to 4 Mbps. A 100-camera site at 3 Mbps needs roughly 300 Mbps of continuous upstream, forever. Most commercial broadband upstream cannot carry that, and on a metered or cellular link it makes no financial sense. Metadata for the same camera runs on the order of a few kilobits per second, about a thousand times less.

Try it with the customer's numbers

continuous upstream to send every stream to the cloud
for metadata only, using the per-camera figure from the recording platform's sizing exercise
Use the customer's own measured bitrates, not anyone's rule of thumb. Vendors do not publish a standard metadata bitrate (Lesson 2.1 covers why), so get the per-camera figure from the recording platform vendor's written sizing exercise and enter it above.

Latency

Matters where a decision triggers a physical action, such as a door release, turnstiles, automatic PTZ tracking, audio talk-down, or anything in a safety interlock. It matters far less for forensic search, occupancy counts, or long-window behavior analysis. Edge inference skips the network legs entirely.

Privacy

Now a purchasing driver in its own right. With edge processing, raw video and any biometric templates made from it never have to leave the premises. That simplifies privacy questions, reduces the number of processors to account for, and shrinks the breach surface. Expect customers to ask you to justify your design on these grounds.

What the Cloud Does Better

Larger models than a camera chip can hold, cross-site correlation, model updates without touching hardware, no on-site GPU purchase, and generative features that current edge chips cannot run.

Go deeper (optional)How to read a TOPS number on a datasheet

How to Read a TOPS Number on a Datasheet

TOPS means trillion operations per second. It is the headline number on nearly every edge AI datasheet, and a weak basis for a buying decision.

Close-up of a circuit board with processor and components
Photo by Alexandre Debiève on Unsplash

TOPS measures raw arithmetic throughput on the accelerator. Here are five reasons it falls short as a specification.

01

Numeric precision is not standardized.

TOPS at INT8 is roughly double TOPS at FP16 on the same chip, and a vendor quoting INT4 can double it again. A TOPS figure without its precision cannot be interpreted. Always ask what numeric precision the figure uses.

02

Sparsity assumptions inflate the number.

Structured-sparsity acceleration can double the theoretical figure, but only for models actually pruned to use it, and most deployed security models are not. Major vendors' own datasheets are often unclear about whether a headline figure is dense or sparse.

03

TOPS is a ceiling, not a throughput.

Real performance is usually limited by memory bandwidth rather than arithmetic. A high-TOPS part that is starved of memory bandwidth underdelivers badly.

04

It says nothing about software.

Whether the vendor's toolchain can compile your model to run efficiently on that accelerator matters more than the headline. Operations it cannot run fall back to the main processor and destroy throughput.

05

Ask how many streams it can actually run.

How many camera streams, at what resolution and frame rate, running which analytics at the same time, and at what accuracy? Push vendors to answer that.

TOPS is to AI performance roughly what horsepower is to towing capacity. It is related, necessary, and not enough.

Scenario

What to tell the customer

A property manager for an apartment community is reviewing your proposal for AI cameras.

Property manager"The brochure says 99% accurate. Can you put that in the contract?"
You"That number was measured on the manufacturer's video, and accuracy counts all the time nothing happened, so it always looks high. What I can put in writing is a real count from your own cameras. After we install, we will review an hour of your video, count the correct alerts, the nuisance alerts, and anything it missed, and record the setting we chose. That gives you a number that actually describes your property."
It explains why 99% is misleading.
It offers a measurement instead.
It protects you and the customer later.
Before you move on

Three Things to Use in Modules 2 and 3

Modules 2 and 3 apply everything in this lesson to cameras and to doors. Keep three things in hand as you go.

  • Pixels on target decide whether the model can do its job at all.
  • The threshold decides which error the customer suffers.
  • A commissioning baseline (one hour of footage, counted into four boxes) turns your professional judgment into a defensible record.
Technician working on a laptop at a bench surrounded by tools
Photo by Anton Savinov on Unsplash

Key Terms

Click any term to reveal its definition.

True positive / False positive+

A correct alarm / a nuisance alarm.

False negative / True negative+

A missed intrusion / correctly quiet.

Precision+

TP / (TP + FP). When the system alerts, how often is it right? The operator's experience.

Recall+

TP / (TP + FN). Of everything that happened, how much was caught? The security outcome. Also called probability of detection.

F1 score+

The harmonic mean of precision and recall. One blended number for comparing systems.

Accuracy+

(TP + TN) / total. Inflated by true negatives and nearly useless for rare events.

Confidence threshold+

The cutoff above which a detection becomes an alert. The main tuning control in the field.

Base rate problem+

Because real events are rare, even a low false positive rate produces mostly false alerts.

Edge / cloud / hybrid+

Where inference runs. Hybrid means the AI runs on site and the cloud handles search and alerts. It is a common design today.

TOPS+

Trillion operations per second. A capacity ceiling, not a throughput guarantee.

References

  1. Duong, H.-T., Le, V.-T., & Hoang, V. T. (2023). Deep learning-based anomaly detection in video surveillance: A survey. Sensors, 23(11), 5024.
  2. Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep learning. MIT Press.
  3. Guo, C., Pleiss, G., Sun, Y., & Weinberger, K. Q. (2017). On calibration of modern neural networks. Proceedings of the 34th International Conference on Machine Learning, 70, 1321-1330.
  4. National Institute of Standards and Technology. (2023). Artificial intelligence risk management framework (AI RMF 1.0) (NIST AI 100-1). U.S. Department of Commerce.
  5. NVIDIA Corporation. (2022). NVIDIA Jetson AGX Orin series technical brief (Version 1.2).
  6. Powers, D. M. W. (2011). Evaluation: From precision, recall and F-measure to ROC, informedness, markedness and correlation. Journal of Machine Learning Technologies, 2(1), 37-63.
  7. Sokolova, M., & Lapalme, G. (2009). A systematic analysis of performance measures for classification tasks. Information Processing & Management, 45(4), 427-437.

Explore & Complete

Complete the Knowledge Check below. Navigate through each slide and answer every question. You have unlimited attempts to answer each question correctly.

Next Steps

After you have earned a perfect score on the Explore & Complete activity, click the Mark Complete button to complete this lesson. You can then move to the next lesson.