# Lithuania’s DIRVA AI Ranks Customs Cargo by Inspection Risk

> With roughly 1,000 truck and rail X-ray images to review daily, Lithuanian Customs needed a faster way to identify cases warranting closer scrutiny. DIRVA uses AI to help analysts prioritize inspections without replacing their judgment.

**Source**: wto.org | **Published**: 2026-11-25 | **Type**: case_study

## Key Facts

- DIRVA targets ~1,000 daily scans and 30-minute train windows, shifting scarce analyst time toward higher-risk cargo.
- Wagon analysis fell from 8 minutes to under 45 minutes—an apparent 10× slowdown; the metric needs clarification before ROI claims.
- EUR 2.2m in EU-funded custom development creates a tailored capability, but substantial GPU, storage and maintenance needs affect lifecycle cost.
- Custom, vehicle-specific models outperformed general-purpose AI, giving Lithuania better workflow fit but increasing data and model upkeep demands.
- Analyst-labelled outcomes and audit trails build a reusable data asset; scarce confirmed anomalies remain a key limit on model accuracy.

## Summary

\## Summary
The Customs of the Republic of Lithuania reviews around 1,000 X-ray images of trucks and railway wagons each day when all border posts are operating, often within tight inspection windows. Working with Novian Group, it built DIRVA, an AI system that checks image quality, identifies vehicles, matches scans to customs declarations and flags possible anomalies so analysts can prioritize inspections. The system has made analysis faster and reduced repetitive manual work; a railway wagon analysis that used to take 8 minutes is now completed in under 45 minutes.

\## Background
Lithuanian Customs is Lithuania’s national customs authority and part of the European Union customs system. Its responsibilities include ensuring the lawful, secure and efficient movement of goods across the country’s borders, including part of the EU’s external border.

Before DIRVA, customs teams used existing digital systems, scanner manufacturers’ proprietary X-ray software and manual review. Analysts had to match declarations to vehicles and wagons, assess image quality and review scans across different systems.

\## Challenge
A train can carry around 60 wagons, and analysts have up to 30 minutes to analyze the whole train. They must identify which wagons may carry undeclared or prohibited goods and need closer review or physical inspection.

Manual matching of declarations to scans was time-consuming and prone to administrative error. Analysts also had to identify poor-quality images and review every vehicle and wagon, making workloads hard to plan and leaving less time for complex cases. On railways, a wagon identification error could lead to the wrong wagon being inspected.

\## Solution
Lithuanian Customs and Novian Group built DIRVA, a custom AI system based mainly on deep learning and computer vision. It was designed around customs workflows, infrastructure, available hardware and legal requirements.

When a vehicle or wagon is scanned, DIRVA opens a case and:
- Assesses image quality and identifies images that need rescanning, with the reason.
- Identifies the vehicle type, distinguishing among nine railway wagon categories and road vehicles such as trucks, then selects the relevant AI algorithm.
- Extracts vehicle or wagon numbers from images and, where possible, checks numbers from both sides of a wagon.
- Matches vehicle information to customs declarations and related records, using the scan date as an additional check.
- Detects possible anomalies, assigns a percentage risk score and marks the suspected item’s location in the image.
- Ranks vehicles and wagons by risk so analysts can prioritize further review or physical inspection.

Analysts monitor scans from different border posts in a centralized environment. DIRVA provides recommendations, not legally binding decisions: customs officers decide whether to rescan an image or inspect a vehicle. The system records AI outputs, user actions and inspection results for review and model improvement.

Development and implementation took approximately two years, with phased milestones and pilot versions tested by analysts before full deployment. Users received one week of training. DIRVA runs in a government cloud, integrates with the EU’s Import Control System 2 and supports the World Customs Organization’s Unified File Format 2.0. The project cost approximately EUR 2.2 million, including VAT, warranty and maintenance, and was funded through Next Generation EU recovery and resilience measures under the national plan Next Generation Lithuania.

\## Results
- Lithuanian Customs reports that analysis has become faster because analysts no longer perform several repetitive tasks manually.
- The full AI analysis of a railway wagon that used to take 8 minutes is completed in under 45 minutes.
- DIRVA marks low-quality images for rescanning and helps analysts identify vehicles or wagons that may contain anomalies or undeclared items.
- Several analysts can work on the same train without duplicating work or unnecessarily reviewing the same wagons.
- The system has created a structured dataset that Lithuanian Customs can use to assess AI recommendations, monitor trends in suspected undeclared goods and review vehicles or wagons detained after inspection.

\## Key Insights
- Build around the actual workflow. DIRVA combines image checks, vehicle identification, declaration matching and risk prioritization rather than automating only one step.
- Keep people accountable for consequential decisions. AI provides risk indicators and recommendations, while authorized officers decide whether to inspect.
- Involve end users throughout development. Customs analysts helped define requirements, test pilots and provide feedback, helping ensure the system fit their working practices.
- Treat data collection as ongoing operational work. Lithuanian Customs embedded image labelling and validation into analysts’ daily procedures to support model improvement and longer-term analysis.
- Plan for data and equipment constraints. Customs X-ray images are not publicly available, confirmed anomalies are infrequent, and scanners produce varied formats and image conditions. DIRVA uses labelled operational images, data augmentation, a unified file format and separate algorithms for vehicle types.

\## Customer Testimonial
The source material contains no direct customer quote.

## Entities

- **Companies**: Novian Group, Novian
- **Products**: DIRVA, Import Control System 2, Unified File Format (UFF) 2.0
- **Technologies**: artificial intelligence, deep learning, machine learning, computer vision, data augmentation, government cloud
- **Organizations**: Customs of the Republic of Lithuania, Lithuanian Customs, European Union, World Trade Organization, World Customs Organization, Next Generation Lithuania

## Key Concepts

AI-assisted X-ray image analysis for customs screening, Automated image-quality assessment and rescanning recommendations, Vehicle and railway-wagon identification and declaration matching, Anomaly detection, risk scoring, and risk-based inspection prioritization, Human-in-the-loop decision-making and legal accountability, Operational data labelling and model performance monitoring, Interoperability across scanners using a unified file format, Phased implementation with analyst testing and workflow integration

## Definitions

- **DIRVA**: A custom-built AI system used by Lithuanian Customs to assess X-ray images, identify vehicles, match scans with customs declarations, detect possible anomalies, and prioritize inspections.
- **Computer vision**: AI that enables computers to interpret and analyse images and videos.
- **Deep learning**: A type of machine learning that uses layered neural networks to learn patterns from examples.
- **Data augmentation**: A technique that creates additional training examples by modifying existing data.
- **Data labelling**: The process of assigning labels to raw data to provide context for machine learning and deep learning.

## Use Cases

- Assessing X-ray image quality and identifying scans that need to be repeated
- Identifying trucks and railway wagons and extracting their numbers from images
- Matching scanned vehicles and wagons with customs declarations and related records
- Detecting suspicious objects or possible undeclared goods and showing their image locations
- Ranking vehicles and wagons by risk to guide further review or physical inspection
- Using inspection outcomes and labelled images to evaluate and improve AI models

## Frequently Asked Questions

**What does DIRVA do for Lithuanian Customs?**

DIRVA automates several steps in X-ray screening, including image-quality checks, vehicle identification, number extraction, and matching scans with customs declarations. It also detects possible anomalies, assigns risk scores, and ranks vehicles for analyst review.

**Does DIRVA decide whether a vehicle is inspected?**

No. DIRVA provides recommendations, risk indicators, and image assessments, but it does not make legally binding or enforcement decisions. An authorized customs analyst makes the final decision about rescanning or physical inspection.

**How does the system help analysts manage inspection workloads?**

It automates repetitive preliminary tasks and highlights higher-risk vehicles or wagons, helping analysts focus on cases that may need closer examination. It also lets multiple analysts work on the same train without unnecessarily duplicating reviews.

**What were the main challenges in developing DIRVA?**

The project faced limited computing and storage capacity, scarce validated examples of anomalies, and variation in scanner formats and image quality. It also had to address the explainability of deep-learning outputs, which it supports through risk scores, marked image locations, and an audit trail.

**How does Lithuanian Customs improve DIRVA over time?**

Analysts label and validate data as part of their daily work, while the system records AI outputs, user actions, and inspection results. These records help assess performance, review trends, and provide material for future model training and improvement.

## Links

- [Read on Welcome.AI](https://welcome.ai/content/lithuanias-dirva-ai-ranks-customs-cargo-by-inspection-risk)
- [Original source](https://www.wto.org/english/tratop_e/dtt_e/aicasestudy/customs-lithuania_e.htm?ref=welcome.ai)

---

Source: Welcome.AI | https://welcome.ai/content/lithuanias-dirva-ai-ranks-customs-cargo-by-inspection-risk