Container number identification method, system, device and storage medium
By acquiring images from the first and second cameras, the relative positional relationship between the target vehicle and non-target vehicles is determined, and the target container area is identified and selected. This solves the problem of interference from non-target vehicles and improves the accuracy and efficiency of container number identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI WESTWELL INFORMATION & TECH CO LTD
- Filing Date
- 2023-08-03
- Publication Date
- 2026-06-02
Smart Images

Figure CN116994259B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, system, device and storage medium for container number recognition. Background Technology
[0002] Ports, as hubs of logistics channels, are a crucial link in the logistics supply chain. With the rapid development of information technology and artificial intelligence, computer vision perception provides more advanced technical support for the construction of smart ports. Container number recognition is an indispensable part of port operations. Compared with the traditional method of manually recording container numbers, using computer vision technology for automatic container number recognition has advantages such as faster speed, higher efficiency, and better stability, providing strong support for all-weather port operations.
[0003] The container number is a unique identifier for a container, typically printed on all four sides of the container. During quay crane loading or unloading operations, four side cameras are needed to capture images of each of the four sides and identify the container number. However, the images captured by the side cameras often include other passing vehicles besides the loading vehicle. The container information of these passing vehicles can interfere with the identification results of the loading vehicle's container, leading to inaccurate container number recognition.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] To address the problems in the prior art, the purpose of this application is to provide a container number identification method, system, device, and storage medium that can effectively filter out interference information from non-target vehicles and improve the accuracy of container number identification.
[0006] This application provides a method for identifying container numbers, including the following steps:
[0007] Acquire images from the first camera and the second camera;
[0008] The relative positional relationship between the target vehicle and non-target vehicles is determined based on the first camera image;
[0009] At least two candidate box surface regions are identified in the second camera image;
[0010] Select the target container surface area from the candidate container surface areas according to the relative positional relationship;
[0011] The target container number within the location range of the target container area is identified from the second camera image.
[0012] The container number recognition method of this application, after acquiring images from a first camera and a second camera, determines the relative positional relationship between the target vehicle and non-target vehicles based on the first camera image, selects the target container area corresponding to the target vehicle from the candidate container area detected in the second camera image, and then identifies the target container number within the corresponding area of the second camera image. This eliminates the candidate container areas corresponding to non-target vehicles, effectively filtering out interference information from non-target vehicles and greatly improving the accuracy of container number recognition.
[0013] In some embodiments, after acquiring the first camera image and the second camera image, the following steps are further included:
[0014] Determine whether a non-target vehicle exists based on the first camera image;
[0015] If so, the relative positional relationship between the target vehicle and the non-target vehicle is determined based on the first camera image;
[0016] If not, the target container number is identified in the second camera image.
[0017] In some embodiments, identifying at least two candidate box surface regions in the second camera image includes the following steps:
[0018] Semantic segmentation and recognition are performed on the second camera image to determine whether each pixel location is a box surface region location;
[0019] Calculate the connected regions based on the semantic segmentation and recognition results;
[0020] Select at least two connected regions with the largest areas from the calculated connected regions as candidate box surface regions.
[0021] In some embodiments, selecting a target container surface area from the candidate container surface areas based on the relative positional relationship includes the following steps:
[0022] Determine the centroid position of each of the candidate box surface regions;
[0023] Determine the centroid positional relationship between each of the candidate box surface regions;
[0024] The target box surface region is selected based on the relative positional relationship and the centroid positional relationship.
[0025] In some embodiments, the first camera image is an image that simultaneously includes multiple lanes of the road;
[0026] Determining whether a non-target vehicle exists based on the first camera image includes the following steps:
[0027] Identify the location ranges corresponding to the target lane and non-target lanes in the first camera image, respectively;
[0028] The presence of a non-target vehicle in the non-target lane is identified in the first camera image.
[0029] In some embodiments, determining the relative positional relationship between the target vehicle and non-target vehicles based on the first camera image includes the following steps:
[0030] Determine the lane arrangement direction in the first camera image;
[0031] Identify the positions of target vehicles in the target lane and non-target vehicles in the non-target lane in the first camera image;
[0032] Determine the relative positions of the target vehicle and the non-target vehicles in the lane arrangement direction.
[0033] In some embodiments, the second camera image is a roadside image taken using a second camera located on one side of the road.
[0034] In some embodiments, determining the centroid positional relationship between the various candidate box surface regions includes the following steps:
[0035] Determine the lane alignment direction in the second camera image;
[0036] Determine the centroid position relationship of each of the candidate box surface regions in the lane arrangement direction.
[0037] In some embodiments, identifying the target container number within the location range of the target container area from the second camera image includes the following steps:
[0038] The target box surface region is fitted with a bounding rectangle to determine the coordinates of the key points of the bounding rectangle;
[0039] Based on the key point coordinates of the circumscribed rectangle, the target container number is identified from the image region within the position range of the circumscribed rectangle in the second camera image.
[0040] This invention also provides a container number identification system for implementing the container number identification method, the system comprising:
[0041] The image acquisition module is used to acquire images from the first camera and the second camera.
[0042] A location recognition module is used to determine the relative positional relationship between the target vehicle and non-target vehicles based on the first camera image;
[0043] The region recognition module is used to identify at least two candidate box surface regions in the second camera image;
[0044] The target selection module is used to select a target container surface area from the candidate container surface areas according to the relative positional relationship;
[0045] The container number recognition module is used to identify the target container number within the location range of the target container surface area from the second camera image.
[0046] The container number recognition system of this application, after acquiring images from a first camera and a second camera through an image acquisition module, determines the relative positional relationship between the target vehicle and non-target vehicles based on the first camera image through a position recognition module. Then, through a region recognition module and a target selection module, it selects the target container area corresponding to the target vehicle from the candidate container area detected in the second camera image. Finally, the container number recognition module identifies the target container number within the corresponding area of the second camera image, thereby eliminating the candidate container areas corresponding to non-target vehicles. This effectively filters out interference information from non-target vehicles and greatly improves the accuracy of container number recognition.
[0047] This application embodiment also provides a container number identification device, including:
[0048] processor;
[0049] A memory in which executable instructions of the processor are stored;
[0050] The processor is configured to perform the steps of the container number identification method by executing the executable instructions.
[0051] This application also provides a computer-readable storage medium for storing a program, which, when executed by a processor, implements the steps of the container number identification method.
[0052] When the program in the memory of the device and the computer storage medium is executed by the processor, it implements the steps of the container number identification method. Therefore, the device and the computer storage medium can also achieve the technical effects of the above-mentioned container number identification method.
[0053] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0054] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings.
[0055] Figure 1 This is a flowchart of a container number identification method according to an embodiment of this application;
[0056] Figure 2 This is a schematic diagram showing the installation positions of the column camera and the master control camera according to an embodiment of this application;
[0057] Figure 3 This is a schematic diagram of an image captured by a pillar camera according to an embodiment of this application;
[0058] Figure 4 This is a schematic diagram of an image captured by a master camera according to an embodiment of this application;
[0059] Figure 5 This is a schematic diagram illustrating the selection of the work box area when a passing vehicle is located behind the work lane according to an embodiment of this application;
[0060] Figure 6 This is a schematic diagram of the selection of the working box area when a passing vehicle is located in front of the working lane according to an embodiment of this application;
[0061] Figure 7 This is a schematic diagram of fitting a bounding rectangle after selecting a target box surface region according to an embodiment of this application;
[0062] Figure 8 This is a schematic diagram of the structure of a container number identification system according to an embodiment of this application;
[0063] Figure 9 This is a schematic diagram of the structure of a container number identification device according to an embodiment of this application;
[0064] Figure 10 This is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of this application. Detailed Implementation
[0065] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0066] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0067] The flowchart shown in the attached diagram is merely an illustrative example and does not necessarily include all steps. For example, some steps may be broken down, while others may be combined or partially combined. Therefore, the actual execution order may change depending on the specific circumstances.
[0068] like Figure 1 As shown in the figure, this application provides a container number identification method, which includes the following steps:
[0069] S100: Acquire images from the first camera and the second camera;
[0070] In this embodiment, the first camera image and the second camera image are obtained by taking pictures with a first camera and a second camera set at different positions, respectively; the first camera is set at a position that can simultaneously capture multiple lanes on the road, and the first camera image is an image that simultaneously includes multiple lanes on the road; the second camera is set on one side of the road, and the second camera image is a road side image captured by the second camera.
[0071] S200: Determine the relative positional relationship between the target vehicle and the non-target vehicle based on the first camera image;
[0072] In this embodiment, the relative positional relationship between the target vehicle and the non-target vehicle refers to the front-to-back positional relationship between the two types of vehicles. For example, the target vehicle is in front of the non-target vehicle or behind the non-target vehicle. When there are multiple non-target vehicles, the target vehicle may be in the front, middle, or back, etc.
[0073] S300: At least two candidate box surface regions are identified in the second camera image;
[0074] In this embodiment, the number of candidate box surface areas is equal to the total number of target vehicles and non-target vehicles determined in step S200, that is, each candidate box surface area corresponds to one vehicle.
[0075] S400: Select a target container surface area from the candidate container surface areas according to the relative positional relationship;
[0076] For example, when the target vehicle is in front of a non-target vehicle, the candidate container area in front is selected as the target container area; when the target vehicle is behind a non-target vehicle, the candidate container area behind is selected as the target container area; when there are multiple non-target vehicles, the corresponding candidate container area is selected as the target container area according to the position of the target vehicle.
[0077] S500: Identify the target container number within the location range of the target container area from the second camera image.
[0078] After acquiring the first and second camera images in step S100, this application, based on the characteristics of the two types of images—the first camera image used to determine the relative positional relationship between the target vehicle and non-target vehicles, and the second camera image used to identify the target container number—determines the relative positional relationship between the target vehicle and non-target vehicles in step S200 based on the first camera image. Then, in steps S300 and S400, the target container area corresponding to the target vehicle is selected from the candidate container areas detected in the second camera image. Finally, in step S500, the target container number is identified within the corresponding area of the second camera image, thus eliminating candidate container areas corresponding to non-target vehicles. This effectively filters out interference information from non-target vehicles, significantly improving the accuracy of container number identification. This method can be fully automated, automatically filtering out non-target vehicle information without manual intervention, and effectively improving the identification efficiency of container number recognition, which is beneficial for identifying multiple target container numbers in a short time.
[0079] The following explanation uses the application of this container number identification method to a container terminal as an example. Figure 2 As shown, the first camera refers to at least one master control camera H5, which can simultaneously capture images of multiple lanes on road H1. Figure 2 The example shows three lanes. The second camera refers to the pillar cameras H4 mounted on both sides of the pillars, including at least one pillar camera H4 mounted on the sea-side pillar H2 and at least one pillar camera H4 mounted on the land-side pillar H3. For example... Figure 3 The image is schematically shown as a second camera image captured by a pillar camera on one side, which captures not only the target vehicle C1 in the target lane (operation lane) but also the non-target vehicle C2 in the non-target lane (non-operation lane). Figure 3 In this context, F1 refers to the lane arrangement direction in the second camera image. The target vehicle C2 is located in front of the non-target vehicle image C1. Since the position of the pillar camera is fixed, the lane arrangement direction in the second camera image is also fixed; it can be a preset direction, for example, fixed as... Figure 3The direction from top to bottom in the text refers to the lane arrangement direction, which is a predefined direction between lanes. For example, from the perspective of the vehicle's direction of travel, the direction from the leftmost lane to the rightmost lane is predefined as the lane arrangement direction. One side of the container of the target vehicle C1 includes the container number area C11, and the other side of the container of the non-target vehicle C1 also includes the container number area C12. If the container number of the target vehicle is directly identified from the second camera image, it will be interfered with by the container numbers of non-target vehicles, resulting in a significant decrease in recognition accuracy. Therefore, this application needs to use this container number identification method to eliminate the interference of non-target vehicles. Furthermore, in this embodiment, in order to implement this container number identification method, no additional hardware settings are required, and the existing master camera can be used to collect images of all lanes, and vehicle information can be obtained through the container detection algorithm.
[0080] In this embodiment, after step S100: acquiring the first camera image and the second camera image, the following steps are further included:
[0081] Determining whether a non-target vehicle exists based on the first camera image; specifically, including the following steps:
[0082] Identify the location ranges corresponding to the target lane and non-target lanes in the first camera image, respectively;
[0083] Identify whether a non-target vehicle exists in the non-target lane in the first camera image;
[0084] If so, it indicates that there is interference from non-target vehicles. Continue to step S200: determine the relative positional relationship between the target vehicle and non-target vehicles based on the first camera image, and then continue to execute steps S300 to S500 to achieve accurate identification of the container number of the target vehicle even when there are non-target vehicles.
[0085] If not, it means there is no interference from non-target vehicles, and the target container number can be directly identified in the second camera image.
[0086] In this embodiment, step S200, determining the relative positional relationship between the target vehicle and non-target vehicles based on the first camera image, includes the following steps:
[0087] Determine the lane arrangement direction in the first camera image, for example in Figure 4 The direction F2 shown, pointing from the right lane to the left lane, is the direction from the leftmost lane to the rightmost lane when viewed from the direction of vehicle travel. Here, the lane arrangement direction F2 is... Figure 3The lane arrangement direction F1 shown is consistent to ensure the consistency of the direction definition between the second camera image and the first camera image; since the position of the first camera is fixed, the direction of the lane arrangement in the first camera image is also fixed and can be a preset direction.
[0088] Identify the positions of target vehicles in the target lane and non-target vehicles in the non-target lane in the first camera image;
[0089] In this embodiment, vehicle identification in both target and non-target lanes can employ a pre-trained box detection model. This model can utilize deep learning models such as convolutional neural networks, generative adversarial networks, or residual networks. During training, multiple sample images are collected and pre-labeled with the presence and location of boxes. These images are then input into the box detection model, and a loss function is constructed based on the model's output to inversely optimize the model. In another embodiment, vehicle identification in both target and non-target lanes can employ an image-matching box detection method. For example, targets are extracted from both target and non-target lanes, and then pre-stored box images and dimensions are used to identify the targets. It is determined whether the target is a box target; if so, a vehicle is identified in the corresponding lane.
[0090] Determine the relative positions of the target vehicle and the non-target vehicles in the lane arrangement direction.
[0091] like Figure 4 The diagram shows a first camera image captured by a central control camera according to this embodiment, including images of multiple lanes on road H1. F2 represents the lane arrangement direction in the first camera image. Lane H11 is pre-defined as the target lane, and lane H12 as a non-target lane. Therefore, the first camera image can be used to determine that vehicle C1 in target lane H11 is the target vehicle, while lane C2 in non-target lane H12 is a non-target vehicle. Furthermore, based on the direction indicated by F2, it is determined that target vehicle C2 is ahead of non-target vehicle C1.
[0092] In this embodiment, step S300, which involves identifying at least two candidate box surface regions in the second camera image, includes the following steps:
[0093] The second camera image is semantically segmented and recognized to determine whether each pixel position is a container surface area position. In this embodiment, the container surface area refers to the position area corresponding to the side of the container with the container number. A pixel position being a container surface area position means that the pixel position is within the range of the container surface area.
[0094] Specifically, a pre-trained semantic segmentation model can be used to process the second camera images. The semantic segmentation model is, for example, a deep learning model such as a convolutional neural network, a generative adversarial network, or a residual network. During training, multiple sample images are pre-collected, and each pixel in the sample images is labeled as whether it is a box surface region. Then, the sample images are input into the semantic segmentation model to obtain the prediction result of the semantic segmentation model for each pixel position. A loss function is constructed based on the labeling information and the prediction result. The semantic segmentation model is back-optimized with the goal of reducing the loss function until the model converges, i.e., the training is completed. After the real-time captured second camera image is input into the semantic segmentation model, the second camera image outputs the predicted probability value of whether each pixel position is a box surface region position. Pixel positions with predicted probability values greater than a preset threshold are determined as box surface region positions.
[0095] Calculate the connected regions based on the semantic segmentation and recognition results;
[0096] From the calculated connected regions, at least two connected regions with the largest areas are selected as candidate box surface regions. As mentioned above, the number of candidate box surface regions is the sum of the number of target vehicles and non-target vehicles identified in step S200. The following explanation uses the example of identifying one target vehicle and one non-target vehicle in step S200; in this case, the two connected regions with the largest areas are selected as candidate box surface regions. In this embodiment, by selecting the largest connected region based on area, interference from other smaller non-box surface connected regions can be effectively eliminated.
[0097] Since this embodiment uses semantic segmentation recognition to obtain the candidate container surface area, it can accurately identify the side container surface area. Compared with the target detection algorithm using anchor frames in the prior art, it identifies each pixel position, resulting in higher accuracy and a more accurate range of the identified candidate container surface area. This provides a guarantee for the accuracy of subsequent filtering of non-target vehicle information and container number identification.
[0098] In this embodiment, step S400, selecting the target container surface area from the candidate container surface areas according to the relative positional relationship, includes the following steps:
[0099] Determine the centroid position of each of the candidate box surface regions;
[0100] Determining the centroid positional relationship between each of the candidate box surface regions specifically includes: determining the lane arrangement direction in the second camera image, and determining the centroid positional relationship of each of the candidate box surface regions in the lane arrangement direction, for example, the centroid of one candidate box surface region is ahead of the centroid of another candidate box surface region;
[0101] The target box surface region is selected based on the relative positional relationship and the centroid positional relationship.
[0102] Figure 5 and Figure 6 Schematic diagrams illustrating the selection of the target box surface region under two different scenarios are shown respectively. Figure 5 In the lane arrangement direction F1, the centroid of candidate box surface area D2 is ahead of the centroid of candidate box surface area D1. Step S200 determines that in the lane arrangement direction, the non-target vehicle is ahead of the target vehicle; therefore, candidate box surface area D1 is selected as the target box surface area. Figure 6 In the lane arrangement direction F1, the centroid of candidate box surface area D4 is ahead of the centroid of candidate box surface area D3. If step S200 determines that the target vehicle is ahead of the non-target vehicle in the lane arrangement direction, then candidate box surface area D4 is selected as the target box surface area.
[0103] In this embodiment, identifying the target container number within the location range of the target container surface area from the second camera image includes the following steps:
[0104] The target box surface region is fitted with a bounding rectangle to determine the coordinates of the key points of the bounding rectangle; Figure 7 An exemplary schematic diagram of fitting a bounding rectangle to the target box surface region is shown, wherein fitting a bounding rectangle to the target box surface region D1 yields a rectangular frame, the coordinates of the four corner points of the rectangular frame being (x1,y1),(x2,y2),(x3,y3),(x4,y4);
[0105] Based on the key point coordinates of the circumscribed rectangle, the target container number is identified from the image region within the position range of the circumscribed rectangle in the second camera image. Here, the key point coordinates are, for example, the coordinates of the four corner points of the circumscribed rectangle as (x1, y1), (x2, y2), (x3, y3), (x4, y4).
[0106] In this embodiment, the target container number is identified from the image region corresponding to the location range of the circumscribed rectangle in the second camera image. A trained container number recognition model can be used, such as a deep learning network like a convolutional neural network, generative adversarial network, or residual network. In one implementation, the input to the container number recognition model includes the coordinates of the four corner points of the target recognition region (i.e., the coordinates of the four corner points of the circumscribed rectangle) in the second camera image, and the output includes the identified container number. During training, the input includes a sample image and the coordinates of the four corner points of the target recognition region marked in the sample image, and the output is the predicted container number. A loss function is constructed based on the predicted container number and the pre-labeled container number, and the container number recognition model is trained in reverse. In another implementation, the input to the container number recognition model only includes the target recognition region image. That is, the second camera image is cropped to obtain an image of the target recognition region portion (i.e., the circumscribed rectangle portion) in the second camera image, and this image of the target recognition region portion is scaled to a specified size and then input into the container number recognition model to obtain the identified container number. The input used during training is an image of a specified size including the target recognition region. A loss function is then constructed based on the predicted container number and the pre-identified container number, and the container number recognition model is trained in reverse. This container number recognition model can be implemented using the architecture of existing text recognition models.
[0107] like Figure 8 As shown, this embodiment of the invention also provides a container number identification system for implementing the container number identification method described above. The system includes:
[0108] Image acquisition module M100 is used to acquire images from the first camera and the second camera;
[0109] The position recognition module M200 is used to determine the relative positional relationship between the target vehicle and non-target vehicles based on the first camera image;
[0110] The region recognition module M300 is used to identify at least two candidate box surface regions in the second camera image;
[0111] Target selection module M400 is used to select a target container surface area from the candidate container surface areas according to the relative positional relationship;
[0112] The container number recognition module M500 is used to identify the target container number within the location range of the target container surface area from the second camera image.
[0113] After acquiring images from the first and second cameras via the image acquisition module M100, this application uses the position recognition module M200 to determine the relative positional relationship between the target vehicle and non-target vehicles based on the first camera image. Then, the region recognition module M300 and the target selection module M400 select the target container area corresponding to the target vehicle from the candidate container areas detected in the second camera image. Finally, the container number recognition module M500 identifies the target container number within the corresponding area of the second camera image, thereby eliminating candidate container areas corresponding to non-target vehicles. This effectively filters out interference information from non-target vehicles and greatly improves the accuracy of container number recognition.
[0114] This application embodiment also provides a container number identification device, including a processor; a memory storing executable instructions of the processor; wherein the processor is configured to perform the steps of the container number identification method by executing the executable instructions.
[0115] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "platform."
[0116] The following reference Figure 9 To describe an electronic device 600 according to this embodiment of the present application. Figure 9 The electronic device 600 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0117] like Figure 9 As shown, the electronic device 600 is presented in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including storage unit 620 and processing unit 610), a display unit 640, etc.
[0118] The storage unit stores program code that can be executed by the processing unit 610, causing the processing unit 610 to perform the steps described in the above-described container number identification method section of this specification according to various exemplary embodiments of this application. For example, the processing unit 610 can perform, as follows: Figure 1 The steps are shown in the figure.
[0119] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache storage unit 6202, and may further include a read-only memory unit (ROM) 6203.
[0120] The storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0121] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0122] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 660. Network adapter 660 can communicate with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0123] In the container number identification device, when the program in the memory is executed by the processor, it implements the steps of the container number identification method. Therefore, the device can also achieve the technical effects of the above-mentioned container number identification method.
[0124] This application also provides a computer-readable storage medium for storing a program that, when executed by a processor, implements the steps of the container number identification method. In some possible implementations, various aspects of this application can also be implemented as a program product including program code that, when executed on a terminal device, causes the terminal device to perform the steps described in the container number identification method section of this specification according to various exemplary embodiments of this application.
[0125] refer to Figure 10 As shown, a program product 800 for implementing the above-described method according to an embodiment of this application is described. It may employ a portable compact disc read-only memory (CD-ROM) and include program code, and can be executed on a terminal device, such as a personal computer. However, the program product of this application is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0126] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0127] The computer-readable storage medium may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0128] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0129] When the program in the computer storage medium is executed by the processor, it implements the steps of the container number identification method. Therefore, the computer storage medium can also achieve the technical effects of the above-mentioned container number identification method.
[0130] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of this application and should not be construed as limiting the specific implementation of this application to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of this application, and all such modifications or substitutions should be considered within the scope of protection of this application.
Claims
1. A method for identifying container numbers, characterized in that, Includes the following steps: Acquire images from the first camera and the second camera; The relative positional relationship between the target vehicle and the non-target vehicle is determined based on the first camera image. The relative positional relationship between the target vehicle and the non-target vehicle refers to the front-rear positional relationship between the two types of vehicles. At least two candidate box surface regions are identified in the second camera image; Select the target container surface area from the candidate container surface areas according to the relative positional relationship; The target container number within the location range of the target container area is identified from the second camera image.
2. The container number identification method according to claim 1, characterized in that, After acquiring the first camera image and the second camera image, the following steps are also included: Determine whether a non-target vehicle exists based on the first camera image; If so, the relative positional relationship between the target vehicle and the non-target vehicle is determined based on the first camera image; If not, the target container number is identified in the second camera image.
3. The container number identification method according to claim 1, characterized in that, Identifying at least two candidate box surface regions in the second camera image includes the following steps: Semantic segmentation and recognition are performed on the second camera image to determine whether each pixel location is a box surface region location; Calculate the connected regions based on the semantic segmentation and recognition results; Select at least two connected regions with the largest areas from the calculated connected regions as candidate box surface regions.
4. The container number identification method according to claim 1, characterized in that, Selecting a target container surface area from the candidate container surface areas based on the relative positional relationship includes the following steps: Determine the centroid position of each of the candidate box surface regions; Determine the centroid positional relationship between each of the candidate box surface regions; The target box surface region is selected based on the relative positional relationship and the centroid positional relationship.
5. The container number identification method according to claim 4, characterized in that, The first camera image is an image that simultaneously includes multiple lanes of the road; Determining whether a non-target vehicle exists based on the first camera image includes the following steps: Identify the location ranges corresponding to the target lane and non-target lanes in the first camera image, respectively; The presence of a non-target vehicle in the non-target lane is identified in the first camera image.
6. The container number identification method according to claim 5, characterized in that, Determining the relative positional relationship between the target vehicle and non-target vehicles based on the first camera image includes the following steps: Determine the lane arrangement direction in the first camera image; Identify the positions of target vehicles in the target lane and non-target vehicles in the non-target lane in the first camera image; Determine the relative positions of the target vehicle and the non-target vehicles in the lane arrangement direction.
7. The container number identification method according to claim 6, characterized in that, The second camera image is a roadside image taken using a second camera positioned on one side of the road.
8. The container number identification method according to claim 7, characterized in that, Determining the centroid positional relationship between each of the candidate box surface regions includes the following steps: Determine the lane alignment direction in the second camera image; Determine the centroid position relationship of each of the candidate box surface regions in the lane arrangement direction.
9. The container number identification method according to claim 1, characterized in that, Identifying the target container number within the location range of the target container area from the second camera image includes the following steps: The target box surface region is fitted with a bounding rectangle to determine the coordinates of the key points of the bounding rectangle; Based on the key point coordinates of the circumscribed rectangle, the target container number is identified from the image region within the position range of the circumscribed rectangle in the second camera image.
10. A container number identification system, characterized in that, The system for implementing the container number identification method according to any one of claims 1 to 9, the system comprising: The image acquisition module is used to acquire images from the first camera and the second camera. A location recognition module is used to determine the relative positional relationship between the target vehicle and non-target vehicles based on the first camera image; The region recognition module is used to identify at least two candidate box surface regions in the second camera image; The target selection module is used to select a target container surface area from the candidate container surface areas according to the relative positional relationship; The container number recognition module is used to identify the target container number within the location range of the target container surface area from the second camera image.
11. A container number identification device, characterized in that, include: processor; A memory in which executable instructions of the processor are stored; The processor is configured to perform the steps of the container number identification method according to any one of claims 1 to 9 by executing the executable instructions.
12. A computer-readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps of the container number identification method according to any one of claims 1 to 9.