Automating image analysis: China Customs implements new model for the development and deployment of algorithms

25 June 2024
By the General Administration of China Customs

The General Administration of China Customs (hereinafter GACC) has been using large-scale non-intrusive inspection (NII) equipment to control containers and vehicles since 1991, which makes it among the first Customs administrations in the world to leverage such a technology. In 2014, faced with the rapid growth in freight volume and constraints in terms of human resources, it started to study the application of advanced technologies, such as artificial intelligence (AI) and big data, to support image analysis operations.

In 2017, it launched the AI-based Image Analysis Project, aimed at developing automatic detection tools. Today, after seven years of relentless efforts, the AI-based Image Analysis System has become an indispensable tool in GACC control and inspection operations.

The AI-based Image Analysis System has already been installed on hundreds of NII devices, including large-scale X-ray inspection equipment for containers and trucks, passenger vehicles, and trains, as well as CT scanners for luggage and articles of inbound/outbound passengers, and mail and packages.

The system has various analysis functions, such as:

  • automatic identification of prohibited items: the system can effectively detect nearly 100 kinds of prohibited items, such as firearms and ammunition, certain types of illicit drugs, or animal products like ivory. It can also identify more than 2,000 types of goods, such as fruits, meat, and milk powder;
  • matching image results with relevant information on the Customs declaration;
  • automatic detection of hidden compartments in vehicles and trains: at land ports, the system sends alarms when concealed items are detected in key areas of vehicles, such as engines and chassis.

Since 2022, more than 20,000 smuggling attempts have been detected through alarms generated thanks to the AI-based Image Analysis System, enabling GACC to improve the efficiency of control operations without increasing human resources.

Outcome of intensive efforts

These impressive results are the fruit of intensive efforts and of efficient collaboration between the GACC and the regional offices.

In the early stages, GACC conducted algorithm training and algorithm R&D based on the first eight digits of the goods nomenclature, and deployed mature algorithms (with a recognition accuracy rate above 95%) to all NII equipment at all Customs sites nationwide.

Algorithms were broadly classified into two categories:

  • Prohibition algorithms, which target prohibiteditemssuch as knives and firearms, and are applied to all images scanned.
  • Recognition algorithms, which are selected by the system based on information from the declaration. Algorithms related to products unrelated to the declaration are not activated.

With the deepening of the application, GACC encountered some difficulties. The main difficulty lay in the fact that goods under the same HS code could be very different and not all be recognized by an algorithm with the same accuracy. On the other hand, using several algorithms to analyse the same image increased the false alarm rate.

Introducing the Autonomous Selection of Algorithms

In order to solve those difficulties and continuously improve the accuracy of the AI-based Image Analysis System, GACC took several measures. The most important one was to enable regional Customs offices (known as Customs districts) to choose the algorithms to be deployed on their NII equipment based on their own actual needs, and therefore to avoid using algorithms which were not relevant to them.

This operational model was called the “Autonomous Selection of Algorithms”. Customs districts were able to dynamically adjust the list of algorithms used to analyse images, based on their local risks. If a port had no need for an algorithm, it was removed. If a port had a need for an algorithm but the accuracy of automated analysis was not high enough, the algorithm was temporarily removed, and reinstalled only after being modified and tested.

GACC established a two-level database approach to manage the deployment of the algorithms:

  • the General Administration database, which brings together mature algorithms relating to commodities traded at all ports of entry, and which therefore should be uniformly deployed and applied nationwide;
  • the Customs districts databases, which include customized algorithms developed for the districts according to their respective operation scenarios, while meeting the requirements of the General Administration.

In addition, China Customs has constructed a commodity database based on a 10-digit nomenclature code, as well as regional characteristics (names, specifications and information provided by companies).


It took dedication and effort to develop the system. The GACC first selected several Customs districts to pilot the Autonomous Selection of Algorithms model and set up support expert groups to assist each of them in the deployment, adjustment, monitoring and evaluation of the algorithms. The experts ensured problems were swiftly solved and that the pilots progressed smoothly.

GACC also developed a platform to enable Customs districts to quickly communicate with headquarters and get help in the selection and deployment of algorithms, typical image labelling and uploading, and algorithm evaluation. Effective communication was key to optimizing and updating the algorithms. If an algorithm was found to generate a high rate of false alarms, the GACC would take it out of the system, analyse the reasons for the false alarms, and submit them to the technical teams in charge of algorithm optimization and iterative updates. Once updated, the algorithm was put back in the system to be tested again.


One of the first impacts of the implementation of the Autonomous Selection of Algorithms model was to free up some space on local IT servers, making it possible to shorten the algorithm calculation time.

Moreover, statistics show that, after deployment of the model, the accuracy of automated image analysis on large-scale NII devices increased by approximately 5%, and the false alarm rate decreased by approximately 8%. For CT scanners, the accuracy increased by nearly 6%, and the false alarm rate decreased by nearly 5%.

Selecting only those algorithms which are needed locally improves the performance of the image analysis, both in terms of accuracy and costs.

The GACC will continue to monitor the model and to optimize AI-based Image Analysis. China customs will also deepen regional and bilateral cooperation in the area of NII and build a community of practice with other Customs administrations, so as to enhance supervision capabilities.