Specialist technology and software for state and local government info@hqt.orgCommunitiesGlossarySearch

AI & Automation

Computer vision for code enforcement: imagery, privacy, and due process

How agencies use vehicle, drone, and aerial imagery to detect code violations, and the privacy, retention, and due process rules that govern it.

Code enforcement offices are being offered a new kind of input: imagery collected at scale and scored by computer vision models that flag likely violations. A vehicle with roof-mounted cameras drives a route and returns a list of parcels with tall grass. An aerial imagery provider compares this year's capture to last year's and flags structures that appear new. A drone flies a corridor after a storm and the footage is run for debris and illegal dumping. The appeal is coverage. A small inspection staff cannot drive every street every month, and complaint-driven enforcement concentrates attention wherever residents are most willing and able to call.

The practical questions are narrower than the promise. A model output is not a violation. It is a lead. Whether that lead can lawfully and defensibly become a notice of violation depends on how the imagery was collected, who verified it, what the local ordinance requires an inspector to observe, and what the agency can produce months later if the finding is appealed. Those questions belong in program design and procurement, not in the hearing room.

What each imagery source can and cannot support

  • Vehicle-mounted street level. Cameras on a municipal or contractor vehicle driving public rights of way. Suited to frontage conditions: overgrowth visible from the street, inoperable vehicles, junk and debris in front yards, illegal signage, boarded windows, sidewalk damage. Its limitation, the view from the street, is also its main legal advantage.
  • Aerial and satellite. Periodic captures compared over time. Suited to change detection: additions and accessory structures, paving and lot coverage, pools, roof condition, large dumping sites. Resolution, revisit frequency, and capture season vary widely between providers, and all three determine what a model can reliably detect.
  • Drone. The highest resolution and the highest legal sensitivity, because flight over private property and a downward view into fenced yards is precisely the capability at issue. Government drone use sits under FAA operating rules and, in many states, additional statutes that address surveillance, notice, or warrant requirements. Confirm current rules with counsel before planning flights.
  • Field and resident photos. Complaint attachments, inspector phone photos, and abatement contractor photos are already in the record and are often the most useful verification material the agency owns.

What a detection is worth as the basis for a notice

Start with the ordinance, not the technology. Most local codes describe violations in terms of an officer's observation and require some form of notice and opportunity to correct. If the code says an inspector must observe the condition, a model flag does not satisfy that language no matter how confident the score.

Two distinctions matter to counsel. First, what is visible from a lawful public vantage point is treated very differently from what requires entry onto the property or a view into areas a resident has enclosed. Second, aerial and drone observation of private property has its own body of law that continues to develop, and state constitutions and statutes sometimes impose stricter limits than federal baselines. Where entry or a non-public view is needed, the established path is an administrative inspection warrant, not a better camera. Requirements change, so confirm the current standard in your state with your attorney rather than relying on a vendor's summary.

Retention, incidental capture, and public records

Street-level and aerial imagery captures people, vehicles, license plates, yards, windows, and everything else in frame. Decide before collection begins how long imagery is kept, who can search it, and whether it is retained at all once a detection is resolved.

  • Set a retention period tied to the enforcement case lifecycle and the appeal window, and apply your state records retention schedule to both the imagery and the model outputs.
  • Require blurring of faces and plates at ingestion where the program does not need them, and keep the unblurred original only if a documented need exists.
  • Assume imagery and detection logs are public records subject to disclosure with whatever exemptions apply, and budget for the redaction work that follows.
  • Prohibit reuse of the imagery for purposes outside the code enforcement program, including sharing with other departments, unless a policy explicitly authorizes it.

Coverage that is defensible across neighborhoods

Route design becomes enforcement policy. If the camera vehicle drives some neighborhoods weekly and others twice a year, violation counts will follow the routes rather than the conditions, and the resulting pattern is the kind of disparity that draws complaints and litigation.

Document how routes and flight areas are chosen, on criteria you would be comfortable explaining publicly. Periodically compare detections, notices issued, and abatements by geography and against demographic data, and treat a persistent skew as a program defect to investigate. Ask the vendor for performance broken out by area and by violation class rather than a single overall accuracy figure, since models often perform unevenly across housing stock, lot sizes, and vegetation types.

Human verification before any citation

Build the workflow so the model never issues anything. A workable sequence: the system produces a candidate list, a reviewer triages it, an inspector verifies the condition in person or from a documented lawful vantage point, and the notice rests on the inspector's own observation with the inspector's own photographs attached. Record the verification date, the vantage point, and the disposition, including candidates rejected as false positives. Those rejections are both your quality signal and your evidence that a human is actually deciding.

What to ask vendors and put in the contract

  • Data rights. The agency owns the imagery and derived detections. No resale, no secondary licensing, and no use of agency imagery to train the vendor's models without written permission.
  • Deletion. Deletion on the agency's schedule and on termination, with written certification.
  • Performance reporting. Precision and recall by violation class and by geography, reported on a regular cadence, with agency-adjustable confidence thresholds.
  • Explainability for appeals. Every detection retrievable with its source image, timestamp, location, and model version, in a form usable at a hearing.
  • Records cooperation. Defined vendor obligations and timelines for supporting public records requests, litigation holds, and audits.
  • Exit. Full export of imagery, detections, and case linkages in open formats at no additional charge.

Start narrow. Pick one or two violation classes with clear visual signatures, run the model in shadow mode alongside normal inspections for a full season, and compare what it finds against what inspectors confirm before anything changes in the notice process. Publish the policy before the first route runs.

HQT works with state and local agencies on systems engineering, data analytics, and software integration for programs of this kind.

Frequently asked questions

Can a city issue a code violation notice based only on an AI detection from camera imagery?

In most jurisdictions, no. Local codes typically require an officer or inspector to observe the condition, and a model output is a lead rather than an observation. The defensible pattern is to have a human inspector verify the condition from a lawful vantage point and base the notice on that inspector's own observation and photographs. Confirm what your ordinance requires with your attorney, since the language varies by jurisdiction.

Do we need a warrant to use drone imagery for code enforcement?

It depends on where the drone flies and what it sees. Observation from public vantage points is treated differently from views into enclosed yards or areas a resident has taken steps to shield, and several states have statutes that place additional limits on government drone use. Where entry or a non-public view is needed, the established path is an administrative inspection warrant. These rules continue to develop, so verify the current standard in your state with counsel before flying.

How long should we keep code enforcement imagery, and is it a public record?

Assume the imagery and the detection logs are public records subject to disclosure with whatever exemptions your state provides, and apply your state records retention schedule. Many agencies tie retention to the case lifecycle plus the appeal window, then delete. Decide retention and redaction rules, including blurring of faces and license plates, before collection starts rather than after the first records request.

How do we avoid uneven enforcement across neighborhoods when using camera routes?

Route and flight coverage effectively becomes enforcement policy, because violations are found where the cameras go. Document how coverage areas are selected on criteria you would explain publicly, and periodically compare detections, notices, and abatements by geography. If a persistent skew appears, treat it as a program defect to investigate rather than as a reflection of conditions.

What should we require from a computer vision vendor in a code enforcement contract?

Require agency ownership of imagery and detections, no resale or secondary licensing, and no training on agency imagery without written permission. Require deletion on the agency's schedule with written certification, performance reporting broken out by violation class and geography, and retrieval of any detection with its source image, timestamp, and model version for hearings. Include vendor obligations for public records support and full data export at exit.

Get in touch

Have a project or a solicitation coming up?

Talk with an HQT engineer. We respond to agency, corporate, and partner inquiries promptly.