Image processing device, image processing method and program

The image processing device enhances throughput by dynamically allocating resources to parallelize and equalize processing times for different analysis tasks, addressing the inefficiencies in existing systems where longer processes delay overall completion.

JP7563468B2Active Publication Date: 2024-10-08NEC CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2022553416
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-10-02
Publication Date
2024-10-08
Estimated Expiration
2040-10-02

AI Technical Summary

Technical Problem

Existing image processing systems face decreased throughput due to varying processing times for different types of analysis processes, leading to waiting periods until the longest process completes, even if shorter processes are finished.

Method used

An image processing device that allocates computational resources dynamically to parallelize analysis processes for multiple object types, adjusting resource allocation when processing time differences exceed a threshold to minimize these differences.

Benefits of technology

This approach improves throughput by reducing waiting times and optimizing resource allocation, ensuring efficient processing of multiple analysis tasks concurrently.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007563468000001
    Figure 0007563468000001
  • Figure 0007563468000002
    Figure 0007563468000002
  • Figure 0007563468000003
    Figure 0007563468000003
Patent Text Reader

Abstract

Provided is an image processing device capable of improving throughput of an analysis process. An analysis execution unit (2) executes analysis processes in parallel for a plurality of types of objects included in an image, respectively. A resource allocation unit (4) allocates at least one of a plurality of calculation resources to each of the analysis processes for the plurality of types of objects. A calculation unit (6) calculates a first process time of each of the plurality of analysis processes for the entirety of a single image. An allocation change unit (8) executes a change process of changing allocation of calculation resources so as to reduce a difference between the first process times of the plurality of analysis processes when the difference is equal to or larger than a predetermined threshold value. The resource allocation unit (4) allocates at least one of the plurality of calculation resources to each of the plurality of analysis processes in accordance with the change process.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an image processing device, an image processing method, and program Regarding. [Background technology]

[0002] There is a technology for analyzing objects contained in images such as video as the analysis target. For example, an analysis process is performed on objects contained in an image captured by a security camera and generated by the security camera to detect suspicious people. In relation to such a technology, Patent Document 1 discloses a video analysis system that detects a human face from input video data and further extracts features of the detected face. In the technology disclosed in Patent Document 1, the allocation of computational resources to a subsequent analysis section is dynamically changed based on content observation data that observes changes in the analysis process performed in a previous analysis section. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] International Publication No. 2018 / 097058 Summary of the Invention [Problem to be solved by the invention]

[0004] When performing analysis using images, for example, analysis processing is performed on multiple types of objects such as faces, human bodies, and objects (belongings, clothing, etc.), and the results are integrated. In this way, a person can be linked with information on belongings, face, clothing, etc., and the linked information on multiple objects can be used to detect suspicious people, etc.

[0005] Here, in order to integrate the results of analysis processes for multiple types of objects (hereinafter, sometimes simply referred to as "multiple analysis processes"), it is necessary to have all the results of the multiple analysis processes for the same image. In this case, if the processing times of the multiple analysis processes are different, even if the analysis process with a short processing time is completed, a processing wait occurs until the analysis process with a long processing time is completed. Therefore, there is a risk of a decrease in throughput. In addition, in the technology of Patent Document 1, the number of objects corresponds to the load on the computational resources. However, in multiple analysis processes, the processing time of an analysis process with a large number of objects is not necessarily longer than the processing time of an analysis process with a small number of objects. Therefore, in the technology of Patent Document 1, there is a risk that the throughput cannot be improved when multiple analysis processes are performed.

[0006] The present disclosure has been made in order to solve such problems, and has an object to provide an image processing device, an image processing method, and a program capable of improving the throughput of analysis processing. [Means for solving the problem]

[0007] The image processing device according to the present disclosure comprises an analysis execution means for executing an analysis process in parallel for each of multiple types of objects contained in an image, a resource allocation means for allocating at least one of multiple computational resources to each of the multiple analysis processes, a calculation means for calculating a first processing time which is the period from the processing start time to the processing end time of each of the multiple analysis processes for the entire image, and an allocation change means for performing a process to change the allocation of the computational resources so as to reduce the difference in the first processing times when a difference in the first processing times between the multiple analysis processes becomes equal to or greater than a predetermined threshold, and the resource allocation means allocates at least one of the multiple computational resources to each of the multiple analysis processes in accordance with the change process by the allocation change means.

[0008] In addition, the image processing method disclosed herein allocates at least one of a plurality of computational resources to each of the analysis processes executed for each of a plurality of types of objects included in an image, executes the analysis processes in parallel for each of the plurality of types of objects, calculates a first processing time which is the period from the processing start time to the processing end time for each of the analysis processes for the plurality of objects for the entire same image, and when a difference in the first processing time between the plurality of analysis processes becomes equal to or exceeds a predetermined threshold, performs a process of changing the allocation of the computational resources so as to reduce the difference in the first processing time, and allocates at least one of the plurality of computational resources to each of the plurality of analysis processes in accordance with the change process.

[0009] In addition, the program disclosed herein causes a computer to execute the steps of allocating at least one of a plurality of computational resources to each of analysis processes executed for each of a plurality of types of objects included in an image; executing analysis processes in parallel for each of the plurality of types of objects; calculating a first processing time which is the period from the processing start time to the processing end time for each of the analysis processes for the plurality of objects for the entire same image; when a difference in the first processing time between the plurality of analysis processes becomes equal to or greater than a predetermined threshold, performing a process of changing the allocation of the computational resources so as to reduce the difference in the first processing time; and allocating at least one of the plurality of computational resources to each of the plurality of analysis processes in accordance with the change process. Effect of the Invention

[0010] According to the present disclosure, it is possible to provide an image processing device, an image processing method, and a program capable of improving the throughput of analysis processing. [Brief description of the drawings]

[0011] [Figure 1] 1 is a diagram illustrating an overview of an image processing device according to an embodiment of the present disclosure. [Diagram 2]4 is a flowchart illustrating an image processing method executed by the image processing device according to the embodiment of the present disclosure. [Diagram 3] FIG. 1 is a diagram illustrating a configuration of an image processing system according to a first embodiment. [Figure 4] FIG. 1 illustrates a configuration of an image processing device according to a first embodiment. [Diagram 5] 4 is a flowchart showing an image processing method executed by the image processing device according to the first embodiment. [Figure 6] 4 is a flowchart showing an image processing method executed by the image processing device according to the first embodiment. [Figure 7] FIG. 2 is a diagram for explaining face analysis processing and human body analysis processing according to the first embodiment. [Figure 8] FIG. 4 is a diagram illustrating an example of analysis process log information according to the first embodiment. [Figure 9] FIG. 4 is a diagram illustrating an example of object information according to the first embodiment. [Figure 10] FIG. 11 is a diagram illustrating a configuration of an image processing device according to a second embodiment. [Figure 11] FIG. 11 is a diagram illustrating object information according to the second embodiment. [Figure 12] 13 is a flowchart showing an allocation change process executed by the image processing device according to the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] (Summary of the embodiment of the present disclosure) Prior to describing the embodiments of the present disclosure, an overview of the embodiments of the present disclosure will be described. Fig. 1 is a diagram showing an overview of an image processing device 1 according to the embodiments of the present disclosure.

[0013] The image processing device 1 is, for example, a computer such as a server. The image processing device 1 has an analysis execution unit 2, a resource allocation unit 4, a calculation unit 6, and an allocation change unit 8. The analysis execution unit 2, the resource allocation unit 4, the calculation unit 6, and the allocation change unit 8 have functions as an analysis execution means, a resource allocation means, a calculation means, and an allocation change means, respectively.

[0014] The analysis execution unit 2 executes analysis processing separately and in parallel for each of multiple types of objects contained in the image. Here, the "image" may be a moving image (video) or a still image. The image may also be a frame image that constitutes a video. The "object" is an object that is the subject of the analysis processing. The object includes, for example, a person's "face," a person's entire body, which is the "human body," and a person's "possessions," such as their belongings or clothing. The "computational resources" include, for example, a processor and memory. The processor may include, for example, a CPU (Central Processing Unit) and a hardware accelerator (for example, a GPU (Graphics Processing Unit)).

[0015] The resource allocation unit 4 allocates at least one of the multiple computational resources to each of the analysis processes of the multiple types of objects. The calculation unit 6 calculates a first processing time (image processing time) which is the period from the processing start time to the processing end time of each of the multiple analysis processes for the entire same image. When the difference in the first processing time between the multiple analysis processes becomes equal to or exceeds a predetermined threshold, the allocation change unit 8 performs a process of changing the allocation of the computational resources so as to reduce the difference in the first processing time. The resource allocation unit 4 allocates at least one of the multiple computational resources to each of the multiple analysis processes in accordance with the change process by the allocation change unit 8.

[0016] 2 is a flowchart showing an image processing method executed by the image processing device 1 according to the embodiment of the present disclosure. The resource allocation unit 4 allocates computational resources to each of the analysis processes of the multiple types of objects (step S10). The analysis execution unit 2 executes the analysis process separately and in parallel for each of the multiple types of objects (step S12). For example, when the multiple types of objects are object A (e.g., a "face") and object B (e.g., a "human body"), the analysis execution unit 2 executes the analysis process separately and in parallel for object A and object B. At this time, before the analysis execution unit 2 executes the analysis process, the resource allocation unit 4 allocates computational resources to each of the analysis process A for object A and the analysis process B for object B.

[0017] The calculation unit 6 calculates the image processing time for each of the multiple analysis processes for the same entire image (step S14). For example, for a certain image X, the calculation unit 6 calculates an image processing time A that is the period from the processing start time to the processing end time of analysis process A, and an image processing time B that is the period from the processing start time to the processing end time of analysis process B.

[0018] The allocation change unit 8 performs a process of changing the allocation of computational resources when the difference in image processing time is equal to or greater than a threshold value (step S16). The resource allocation unit 4 assigns at least one of the plurality of computational resources to each of the plurality of analysis processes in accordance with the change process by the allocation change unit 8 (step S18). Here, when the difference in image processing time is equal to or greater than a threshold value, the allocation change unit 8 performs a process of changing the allocation of computational resources so as to reduce the difference in image processing time. For example, the allocation change unit 8 performs a process of changing the allocation of computational resources when the difference between image processing time A and image processing time B is equal to or greater than a threshold value. A specific example of the change process will be described in the embodiment described later.

[0019] In this manner, in this embodiment, when the difference in image processing time (first processing time) between the respective analysis processes of a plurality of types of objects is equal to or greater than a threshold value, a change process of allocation of computational resources is performed so as to reduce the difference in image processing time. This shortens the waiting period from when an analysis process with a short processing time is completed until when an analysis process with a long processing time is completed. Therefore, it is possible to improve the throughput. In the above example, it is possible to improve the throughput for image Y obtained at the timing following image X. It is also possible to improve the throughput by using a program that executes the above-mentioned image processing method.

[0020] (Embodiment 1) Hereinafter, the embodiments will be described with reference to the drawings. For clarity of explanation, the following description and drawings are omitted and simplified as appropriate. In addition, in each drawing, the same elements are given the same reference numerals, and duplicate explanations are omitted as necessary.

[0021] 3 is a diagram showing a configuration of an image processing system 20 according to the first embodiment. The image processing system 20 includes one or more imaging devices 30 and an image processing device 100. The imaging devices 30 and the image processing device 100 are connected to each other so as to be able to communicate with each other via a network 22 such as the Internet. The image processing device 100 may be realized by, for example, cloud computing.

[0022] The imaging device 30 is, for example, a camera such as a surveillance camera or a security camera. The imaging device 30 captures surrounding subjects (people, objects, backgrounds, etc.) and generates image data representing the image. Here, the "image" may be a moving image (video) or a still image. The image may also be a frame image constituting a video. Note that hereinafter, the term "image" also means "image data representing an image" as a processing target in information processing. In the following explanation, an example in which the image is a frame image will be explained.

[0023] The image processing device 100 corresponds to the image processing device 1 shown in FIG. 1. The image processing device 100 receives an image from the imaging device 30. The image processing device 100 analyzes the received image and recognizes objects contained in the image. This will be described in detail later. Note that in the first embodiment, a person's face and human body (whole body) are recognized as objects, but the objects are not limited to faces and human bodies. In addition, the number of objects is not limited to two, and may be any number of three or more.

[0024] 4 is a diagram showing a configuration of the image processing device 100 according to the first embodiment. The image processing device 100 has, as main hardware components, a control unit 102, a storage unit 104, a communication unit 106, and an interface unit 108 (IF; Interface). The control unit 102, the storage unit 104, the communication unit 106, and the interface unit 108 are connected to each other via a data bus or the like.

[0025] The control unit 102 is a processor such as a CPU. The control unit 102 has a function as a calculation device that performs analysis processing, control processing, calculation processing, etc. The storage unit 104 is a storage device such as a memory or a hard disk. The storage unit 104 is, for example, a ROM (Read Only Memory) or a RAM (Random Access Memory). The storage unit 104 has a function for storing a control program and a calculation program executed by the control unit 102. The storage unit 104 also has a function for temporarily storing processing data, etc. The storage unit 104 may include a database.

[0026] The communication unit 106 performs processing required for communicating with other devices such as the imaging device 30 via the network 22. The communication unit 106 may include a communication port, a router, a firewall, and the like. The interface unit 108 is, for example, a user interface (UI). The interface unit 108 has an input device such as a keyboard, a touch panel, or a mouse, and an output device such as a display or a speaker. The interface unit 108 accepts data input operations by a user (operator), and outputs information to the user. For example, the interface unit 108 may output the results of an analysis process. The interface unit 108 may also output the amount of computational resources allocated to each analysis process.

[0027] The image processing device 100 according to the first embodiment includes, as components, an image acquisition unit 110, a resource allocation unit 112, an analysis execution unit 120, an analysis status monitoring unit 130, and an allocation change unit 140. The analysis execution unit 120 includes a face analysis execution unit 122 and a human body analysis execution unit 124. The analysis status monitoring unit 130 includes an image processing time calculation unit 132, an allocation change determination unit 134, and an object information calculation unit 136. The allocation change unit 140 includes a CPU allocation determination unit 142. Note that the image processing device 100 does not need to be physically configured as one device. In this case, the above-mentioned components may be realized by a plurality of physically separate devices.

[0028] The image acquisition unit 110 has a function as an image acquisition means. The resource allocation unit 112 corresponds to the resource allocation unit 4 shown in FIG. 1. The resource allocation unit 112 has a function as a resource allocation means. The analysis execution unit 120 corresponds to the analysis execution unit 2 shown in FIG. 1. The analysis execution unit 120 has a function as an analysis execution means. The analysis status monitoring unit 130 corresponds to the calculation unit 6 shown in FIG. 1. The analysis status monitoring unit 130 has a function as an analysis status monitoring means. The allocation change unit 140 corresponds to the allocation change unit 8 shown in FIG. 1. The allocation change unit 140 has a function as an allocation change means.

[0029] Furthermore, the face analysis execution unit 122 functions as a face analysis execution means. The human body analysis execution unit 124 functions as a human body analysis execution means. The image processing time calculation unit 132 corresponds to the calculation unit 6 shown in FIG. 1. The image processing time calculation unit 132 functions as an image processing time calculation means. The allocation change determination unit 134 functions as an allocation change determination means. The object information calculation unit 136 functions as an object information calculation means. The CPU allocation determination unit 142 functions as a CPU ratio determination means.

[0030] Each of the above-mentioned components can be realized, for example, by executing a program under the control of the control unit 102. More specifically, each of the components can be realized by the control unit 102 executing a program stored in the storage unit 104. Each of the components may be realized by recording a necessary program in an arbitrary non-volatile recording medium and installing it as necessary. Each of the components may be realized by any combination of hardware, firmware, and software, without being limited to being realized by software based on a program. Each of the components may be realized by using an integrated circuit that can be programmed by a user, such as an FPGA (field-programmable gate array) or a microcomputer. In this case, a program composed of each of the above-mentioned components may be realized by using this integrated circuit. The same applies to other embodiments described later. The specific functions of each of the components will be described later.

[0031] 5 and 6 are flowcharts showing an image processing method executed by the image processing device 100 according to the first embodiment. The resource allocation unit 112 allocates computational resources (step S100). Specifically, the resource allocation unit 112 allocates at least one of a plurality of computational resources to each of a plurality of analysis processes executed by the analysis execution unit 120. More specifically, the resource allocation unit 112 allocates computational resources to the face analysis process executed by the face analysis execution unit 122 and the human body analysis process executed by the human body analysis execution unit 124. This will be described in detail later.

[0032] The image acquisition unit 110 acquires a frame image (step S102). Specifically, the image acquisition unit 110 acquires a frame image generated by the imaging device 30. The image acquisition unit 110 may acquire a frame image each time a frame image is generated by the imaging device 30. Alternatively, if the frame images from the imaging device 30 are temporarily stored in the storage unit 104 (buffer), the image acquisition unit 110 may acquire the frame images from the buffer. Note that if the imaging device 30 generates still images continuously in time series, the image acquisition unit 110 may acquire the still images.

[0033] The analysis execution unit 120 executes face analysis processing and human body analysis processing separately and in parallel (step S104). That is, the analysis execution unit 120 executes analysis processing separately and in parallel for each of a plurality of types of objects included in the image. Specifically, the face analysis execution unit 122 executes face analysis processing. The human body analysis execution unit 124 executes human body analysis processing.

[0034] FIG. 7 is a diagram for explaining the face analysis process and the human body analysis process according to the first embodiment. When a frame image is acquired, the analysis execution unit 120 executes the face analysis process and the human body analysis process in parallel. Then, when the face analysis process and the human body analysis process are completed for the same frame image, the analysis execution unit 120 integrates the result of the face analysis process and the result of the human body analysis process. This makes it possible to generate information showing in detail the facial features and the physical features of a person captured in a certain frame image. Using the information generated in this way, it is possible to search for suspicious people, etc.

[0035] The face analysis execution unit 122 performs face detection processing on the frame image. In the face detection processing, the face analysis execution unit 122 detects the position of a face in the frame image. Then, the face analysis execution unit 122 extracts features (feature amount) of the detected face. Then, face feature data indicating the features of the face is output as a result of the face analysis processing. Note that the face analysis execution unit 122 may extract the features of a face for which the accuracy of face detection is higher than a predetermined value.

[0036] The human body analysis execution unit 124 performs a human body detection process on the frame image. In the human body detection process, the human body analysis execution unit 124 detects the position of a human body in the frame image. Then, the human body analysis execution unit 124 extracts features (feature amounts) of the detected human body. Then, human body feature data indicating the features of the human body is output as a result of the human body analysis process. Note that the human body analysis execution unit 124 may extract the features of the human body for a human body for which the accuracy of human body detection is higher than a predetermined value.

[0037] Here, in the human body detection process, if the whole body is not captured in the frame image, there is a high possibility that the object that is a human body cannot be detected (recognized) as a human body. On the other hand, in the face detection process, even if the whole body is not captured in the frame image, if a face is captured, there is a high possibility that the object that is a face can be detected (recognized) as a face. Therefore, even in the same frame image, the number of faces and the number of human bodies detected may differ from each other.

[0038] In addition, even in the same frame image, the time required to analyze one object may differ depending on the type of object. For example, since the volume of the feature amount of the human body is larger than the volume of the feature amount of the face, the time required for the extraction process of the human body features is often longer than the time required for the extraction process of the face features. In the example of FIG. 7, the time required for the extraction process of the face features is 50 msec, and the time required for the extraction process of the human body features is 250 msec.

[0039] Returning to the description of Fig. 5, the analysis status monitoring unit 130 acquires log information of each analysis process (analysis process log information) (step S106). The analysis process log information may be generated by the analysis status monitoring unit 130 or may be generated by the analysis execution unit 120. The analysis status monitoring unit 130 monitors the execution status of the analysis process by the analysis execution unit 120 using the analysis process log information.

[0040] FIG. 8 is a diagram illustrating an example of analysis processing log information according to the first embodiment. The analysis processing log information includes a camera ID, a frame ID, a type of object ("face" or "human body"), an object ID, a processing start time, a processing end time, and processing hardware information. In the example of FIG. 8, the camera ID (identification information of the imaging device 30) is "camera #1", and the frame ID (identification information of the frame image) is "frame #1". In addition, in the example of FIG. 8, the IDs of the object "face" are "face #1" to "face #m", and the IDs of the object "human body" are "human body #1" to "human body #n". That is, in the example of FIG. 8, the number of detections of the object "face" in the frame image of frame #1 is m, and the number of detections of the object "human body" is n. In addition, in the example of FIG. 8, all of the analysis processes are executed by the CPU.

[0041] Moreover, the processing start time of the object "face #1" is t_f1s, and the processing end time is t_f1e. Moreover, the processing start time of the object "face #2" is t_f2s, and the processing end time is t_f2e. Moreover, the processing start time of the object "face #m" is t_fms, and the processing end time is t_fme. Here, in the example of FIG. 8, the face analysis execution unit 122 first executes analysis processing on the object "face #1", and finally executes analysis processing on the object "face #m".

[0042] Moreover, the processing start time of the object "human body #1" is t_b1s, and the processing end time is t_b1e. Moreover, the processing start time of the object "human body #2" is t_b2s, and the processing end time is t_b2e. Moreover, the processing start time of the object "human body #n" is t_bns, and the processing end time is t_bne. Here, in the example of FIG. 8, the human body analysis execution unit 124 first executes the analysis processing of the object "human body #1", and finally executes the analysis processing of the object "human body #n".

[0043] The face analysis execution unit 122 may execute the analysis process for the faces #1 to #m sequentially. In this case, the face analysis execution unit 122 starts the analysis process for the face #2 after the analysis process for the face #1 is completed. Therefore, the period from the processing start time t_f1s to the processing end time t_f1e for the face #1 does not overlap with the period from the processing start time t_f2s to the processing end time t_f2e for the face #2. Alternatively, the face analysis execution unit 122 may execute the analysis process for the faces #1 to #m in parallel. In this case, the face analysis execution unit 122 may start the analysis process for the face #2 before the analysis process for the face #1 is completed. Therefore, the period from the processing start time t_f1s to the processing end time t_f1e for the face #1 may overlap with the period from the processing start time t_f2s to the processing end time t_f2e for the face #2. Such sequential processing or parallel processing can be appropriately selected depending on the amount of computational resources (CPU, etc.) allocated to the face analysis processing. The same applies to the human body analysis execution unit 124 (human body analysis processing).

[0044] Returning to the description of FIG. 5, the analysis status monitoring unit 130 calculates the frame processing time (image processing time; first processing time) for each analysis process (step S108). Specifically, the image processing time calculation unit 132 calculates the frame processing time for the face analysis process and the frame processing time for the human body analysis process for the entire same frame image. Here, the frame processing time is the period from the processing start time to the processing end time for each analysis process for the entire one frame image. In other words, the frame processing time is the time required for each analysis process to process all objects in one frame image. For example, the frame processing time is the period from the processing start time for the first executed object to the processing end time for the last executed object for each analysis process.

[0045] In the example of FIG. 8, in the frame image of "frame #1", the face analysis processing starts with processing of the object "face #1" and ends with processing of the object "face #m". Therefore, the processing start time of the face analysis processing for the entire frame image of "frame #1" is the processing start time t_f1s of the object "face #1". Moreover, the processing end time of the face analysis processing for the entire frame image of "frame #1" is the processing end time t_fme of the object "face #m". Therefore, the image processing time calculation unit 132 calculates the frame processing time of the face analysis processing for the entire frame image of "frame #1" as Tif=t_fme-t_f1s.

[0046] Also, in the example of FIG. 8, in the frame image of "frame #1", the human body analysis processing starts with processing of object "human body #1" and ends with processing of object "human body #n". Therefore, the processing start time of the human body analysis processing for the entire frame image of "frame #1" is the processing start time t_b1s of object "human body #1". Moreover, the processing end time of the human body analysis processing for the entire frame image of "frame #1" is the processing end time t_bne of object "human body #n". Therefore, the image processing time calculation unit 132 calculates the frame processing time of the human body analysis processing for the entire frame image of "frame #1" as Tib=t_bne-t_b1s.

[0047] The analysis status monitoring unit 130 judges whether the difference in frame processing time between the multiple analysis processes is equal to or greater than a predetermined threshold (step S110). Specifically, the allocation change judgment unit 134 judges whether the difference ΔTi (=|Tif-Tib|) between the frame processing time Tif of the face analysis process and the frame processing time Tib of the human body analysis process is equal to or greater than a predetermined threshold Tth1. In other words, the allocation change judgment unit 134 judges whether ΔTi≧Tth1. The difference ΔTi in frame processing time corresponds to a processing wait period between the multiple analysis processes. Therefore, the threshold Tth1 can be appropriately determined according to an allowable processing wait period (throughput).

[0048] In addition, when there are three or more types of objects, there are also three or more analysis processes. In this case, the difference in frame processing time ΔTi may be the difference between the maximum frame processing time and the minimum frame processing time. For example, in a case where the types of objects are a face, a human body, and possessions, if the frame processing time Tip of the analysis process of the possessions is the longest and the frame processing time Tif of the face analysis process is the shortest, ΔTi=Tip-Tif.

[0049] If the difference ΔTi in frame processing time is not equal to or greater than the threshold Tth1 (NO in S110), the waiting period is within the allowable range, and there is a high possibility that an unacceptable deterioration in throughput has not occurred. Therefore, the allocation change determination unit 134 decides not to change the allocation of computational resources. In this case, the process of S20 described later is omitted, and the process proceeds to S116.

[0050] On the other hand, if the difference ΔTi in frame processing time is equal to or greater than the threshold Tth1 (YES in S110), the waiting period exceeds the allowable range, and there is a high possibility that an unacceptable deterioration in throughput has occurred. Therefore, the allocation change determination unit 134 decides to change the allocation of computational resources (step S112). In this case, the object information calculation unit 136 calculates object information (step S114). Here, the object information is information about objects, and includes information about the number of objects and the object processing time. Therefore, the object information calculation unit 136 calculates information about the number of objects and the object processing time. The number of objects and the object processing time will be described later. The analysis status monitoring unit 130 outputs an allocation change instruction to the allocation change unit 140. The allocation change instruction may include object information. Note that the process of S114 is not limited to being executed only when the determination in S110 is YES, and may be calculated whenever analysis processing log information is acquired.

[0051] FIG. 9 is a diagram illustrating object information according to the first embodiment. The object information includes the average number of most recent objects and the average of most recent object processing time (second processing time). Here, the "number of objects" is the number of objects of each object type (face or human body) detected from one frame image. In other words, the "number of objects" is the number of corresponding objects detected per image. In the example of FIG. 8, the number of face objects in frame #1 is m, and the number of human body objects is n.

[0052] Moreover, "object processing time" refers to the processing time required for analysis processing per object. In the example of FIG. 8, the object processing time for object "face #1" is (t_f1e-t_f1s), and the object processing time for object "face #2" is (t_f2e-t_f2s). Moreover, the object processing time for object "body #1" is (t_b1e-t_b1s), and the object processing time for object "body #2" is (t_b2e-t_b2s).

[0053] Furthermore, the "average number of recent objects (average number of objects)" is the average number of objects for each type of object during a period from the current time (or the capture time of the frame image to be processed) to a predetermined time ago (for example, a few seconds ago; 5 to 10 seconds ago). In the example of FIG. 9, for "faces," the "average number of recent objects (average number of objects)" is M. For "human bodies," the "average number of recent objects (average number of objects)" is N.

[0054] Furthermore, the "average of most recent object processing times (average object processing time)" is the average value of the object processing times for each type of object during a period from the current time (or the capture time of the frame image to be processed) to a predetermined time ago (e.g., several seconds ago; 5 to 10 seconds ago). The "average of most recent object processing times" may differ depending on the type of computing resource (e.g., CPU, etc.) used for the processing. In the example of FIG. 9, for the "face," the "average of most recent object processing times (average object processing time)" for analysis processing by the CPU is Tfc [msec / piece]. For the "human body," the "average of most recent object processing times (average object processing time)" for analysis processing by the CPU is Tbc [msec / piece].

[0055] Returning to the explanation of FIG. 5, the allocation change unit 140 performs the allocation change process (step S20). Specifically, the CPU allocation determination unit 142 uses the object information to determine the amount of computational resources (e.g., the number of CPU cores) to be allocated to each of the multiple analysis processes (face analysis process and human body analysis process). The CPU allocation determination unit 142 determines the amount of computational resources to be allocated to each of the multiple analysis processes based on a required processing time (third processing time) for each of the multiple analysis processes, which will be described later. The CPU allocation determination unit 142 determines the amount of computational resources to be allocated to each of the multiple analysis processes in accordance with the ratio of the required processing times for the multiple analysis processes. This will be described in more detail later.

[0056] After the allocation change process (S20), if the process has been completed for all frame images (YES in step S116), the process ends. On the other hand, if the process has not been completed for all frame images (NO in S116), the process returns to S102, and the above-mentioned process is repeated.

[0057] 6 is a flowchart showing the allocation change process (S20) according to the first embodiment. The allocation change unit 140 acquires object information from the analysis status monitoring unit 130 (step S22). Specifically, the CPU allocation determination unit 142 may acquire the object information by receiving an allocation change instruction including the object information from the analysis status monitoring unit 130. Alternatively, the analysis status monitoring unit 130 may store the object information in a database. In this case, when the allocation change unit 140 receives an allocation change instruction, it acquires the object information from the database.

[0058] The allocation change unit 140 calculates the required processing time (third processing time) for each analysis process using the object information (step S24). Specifically, the CPU allocation determination unit 142 calculates the required processing time for each analysis process by multiplying the average object processing time by the average number of objects. Here, the "required processing time" is the processing time required for each of the multiple analysis processes for one image (frame image). In other words, the "required processing time" is the processing time predicted to be required for each of the multiple analysis processes for one image (frame image). In the example of FIG. 9, the required processing time for face analysis process is calculated as Tfc×M [msec]. Moreover, the required processing time for human body analysis process is calculated as Tbc×N [msec].

[0059] The allocation change unit 140 determines the amount of resources allocated to each analysis process according to the ratio of the processing time required for each analysis process (step S26). Specifically, the CPU allocation determination unit 142 determines the amount of resources allocated to each analysis process such that the ratio of the amount of computing resources (resource amount) allocated corresponds to the ratio of the processing time required for each analysis process. More specifically, the CPU allocation determination unit 142 determines the amount of resources allocated to each analysis process such that the ratio of the amount of resources allocated to face analysis process and the amount of resources allocated to human body analysis process corresponds to the ratio of the processing time required for face analysis process and the processing time required for human body analysis process.

[0060] In the example of FIG. 9, the ratio between the processing time required for face analysis processing and the processing time required for human body analysis processing is Tfc×M:Tbc×N. Here, the number of CPU cores is Rc. At this time, the amount of resources Rc_f allocated to face analysis processing is calculated as Rc_f=Rc×(Tfc×M) / (Tfc×M+Tbc×N). In addition, the amount of resources Rc_b allocated to human body analysis processing is calculated as Rc_b=Rc×(Tbc×N) / (Tfc×M+Tbc×N). Note that if the calculated value is not an integer, the integer closest to the calculated value is determined as the amount of resources (number of CPU cores) to be allocated.

[0061] The allocation change unit 140 outputs the amount of allocated resources for each analysis process (step S28). Specifically, the allocation change unit 140 outputs the amount of allocated resources for each analysis process to the resource allocation unit 112. As a result, the resource allocation unit 112 allocates computational resources to each analysis process with the determined (changed) amount of allocated resources. As a result, the ratio of the amount of resources allocated to each analysis process is changed so as to correspond to the ratio of the required processing time, so that the waiting time for processing can be reduced. Therefore, the throughput can be improved. In other words, by performing the processing shown in FIG. 5 for a certain frame #1, it is possible to improve the throughput of the analysis process for frame #2 generated at a timing after frame #1.

[0062] <Example> The above-mentioned processing according to the first embodiment will be described using specific numerical values. The frame processing time of the face analysis processing is Tif=202 msec, and the frame processing time of the human body analysis processing is Tib=1001 msec. In addition, the threshold value Tth1=200 msec. In this case, the difference in the frame processing times is ΔTi=1001-202=799 msec>200 msec, so the allocation change determination unit 134 determines to change the allocation (YES in S110, S112).

[0063] Also, the average number of objects in face analysis processing is M=16, and the average number of objects in human body analysis processing is N=8. Also, the object processing time in face analysis processing is Tfc=50 msec / object, and the object processing time in human body analysis processing is Tbc=250 msec / object. In this case, the CPU allocation determination unit 142 calculates the processing time required for face analysis processing as Tfc×M=50×16=800 [msec] (S24). Also, the CPU allocation determination unit 142 calculates the processing time required for human body analysis processing as Tbc×N=250×8=2000 [msec] (S24).

[0064] Furthermore, the CPU allocation determination unit 142 calculates the ratio of the required processing times as Tfc×M:Tbc×N=800:2000=2:5. Furthermore, the number of CPU cores used for analysis processing is Rc=6. In this case, the CPU allocation determination unit 142 calculates the amount of resources allocated to face analysis processing as Rc_f=Rc×(Tfc×M) / (Tfc×M+Tbc×N)=6×(2 / (2+5))≒2[cores]. Furthermore, the CPU allocation determination unit 142 calculates the amount of resources allocated to human body analysis processing as Rc_b=Rc×(Tbc×N) / (Tfc×M+Tbc×N)=6×(5 / (2+5))≒4[cores].

[0065] In this case, the processing time of the face analysis process per frame image after the allocation change is Tfc×M / Rc_f=50×16 / 2=400[msec]. Also, the processing time of the human body analysis process per frame image after the allocation change is Tbc×N / Rc_b=250×8 / 4=500[msec]. Therefore, the processing waiting time is 500-400=100msec, and the throughput after the allocation change is 1000msec / max[400msec,500msec]=2 frames / sec. On the other hand, the throughput before the allocation change is 1000msec / max[202msec,1001msec]≒1 frame / sec. Therefore, it can be seen that the throughput is improved by performing the allocation change process.

[0066] As described above, in the technology of Patent Document 1, the number of objects corresponds to the load of the computational resources. Therefore, when the technology of Patent Document 1 is applied to the above-mentioned specific example, the average number of objects (16) in the face analysis process is greater than the average number of objects (8) in the human body analysis process, so more CPU cores are allocated to the face analysis process than to the human body analysis process. However, as described above, the processing time required for the human body analysis process is longer than the processing time required for the face analysis process. Therefore, in the technology of Patent Document 1, for the analysis process of the same frame image, the face analysis process ends much earlier than the human body analysis process, and a long processing wait occurs until the human body analysis process ends, which may prevent the throughput from being improved. Specifically, in the technology according to Patent Document 1, four of the six CPU cores are allocated to the face analysis process and two to the human body analysis process based on the ratio of the number of objects. Then, the processing time for the face analysis process is 50×16 / 4=200 msec, and the processing time for the human body analysis process is 250×8 / 2=1000 msec. Therefore, the processing waiting time is 1000-200=800 msec, and the throughput after the allocation change is 1000 msec / max[200 msec, 1000 msec]=1 frame / sec. Therefore, the method according to the first embodiment can improve the throughput more than the technique according to the patent document 1.

[0067] (Embodiment 2) Next, a second embodiment will be described. The second embodiment differs from the first embodiment in that the computational resources for executing the analysis process include not only a CPU but also a hardware accelerator. Note that the configuration of an image processing system 20 according to the second embodiment is substantially similar to that according to the first embodiment, and therefore a description thereof will be omitted.

[0068] FIG. 10 is a diagram showing a configuration of an image processing device 100 according to a second embodiment. The image processing device 100 has, as main hardware configurations, a control unit 102, a storage unit 104, a communication unit 106, and an interface unit 108. Here, the control unit 102 includes at least one CPU (first computational resource) and at least one hardware accelerator (second computational resource). The hardware accelerator is a computational resource having higher performance (processing capacity) than the CPU. The "processing capacity" is, for example, processing speed. The hardware accelerator may include a GPU, an FPGA, or dedicated hardware for deep learning or the like. In the second embodiment, an example will be described in which the hardware accelerator (hereinafter, sometimes simply referred to as an "accelerator") is a GPU. Hardware other than the control unit 102 may be substantially similar to that in the first embodiment.

[0069] The image processing device 100 according to the second embodiment has as its components an image acquisition unit 110, a resource allocation unit 112, an analysis execution unit 120, an analysis status monitoring unit 130, and an allocation change unit 240. Note that the components other than the allocation change unit 240 are substantially similar to those according to the first embodiment, and therefore a description thereof will be omitted. That is, the image processing device 100 according to the first embodiment performs the processes of S100 to S116 shown in FIG. 5, similarly to the first embodiment.

[0070] The allocation change unit 240 has a function as an allocation change unit. The allocation change unit 240 has a CPU allocation determination unit 142 and an accelerator allocation determination unit 242. The accelerator allocation determination unit 242 has a function as an accelerator allocation determination unit. The allocation change unit 240 according to the second embodiment determines the allocation of a CPU (first computational resource) and an accelerator (second computational resource).

[0071] Next, an image processing method executed by the image processing device 100 according to the second embodiment will be described. Here, the image processing method according to the second embodiment is substantially similar to the processing according to the first embodiment except for the processing of S20 in FIG. 5, and therefore the description will be omitted. However, in the second embodiment, the analysis processing log information acquired in the processing of S106 and the object information calculated in S114 are different from those in the first embodiment. Regarding the analysis processing log information, in the example of FIG. 8, all the analysis processing is executed by the CPU, but in the second embodiment, some or all of the analysis processing may be executed by an accelerator (e.g., a GPU).

[0072] FIG. 11 is a diagram illustrating an example of object information according to the second embodiment. As shown in FIG. 11, in the second embodiment, the object processing time (average object processing time) is calculated for each type of hardware (CPU and GPU) that executed the analysis process. In the example of FIG. 11, for the "face", the "average of the most recent object processing time (average object processing time)" of the analysis process by the GPU is Tfg [msec / piece]. Also, for the "human body", the "average of the most recent object processing time (average object processing time)" of the analysis process by the GPU is Tbg [msec / piece]. Note that the analysis process log information indicates which computational resource, CPU or GPU, was used to execute each analysis process. Other information of the object information is substantially similar to that according to the first embodiment shown in FIG. 8, and therefore description thereof will be omitted.

[0073] FIG. 12 is a flowchart showing the assignment change process (S20) executed by the image processing apparatus according to Embodiment 2. The assignment change unit 240 performs substantially the same processes as S22 to S28 shown in FIG. 6 (step S200). Regarding the process of S28, the CPU assignment determination unit 142 outputs the assigned resource amount of each analysis process for each CPU to the accelerator assignment determination unit 242. That is, in Embodiment 2, the resource assignment unit 112 does not perform the assignment of computing resources with the assigned resource amount determined in S26.

[0074] The assignment change unit 240 (accelerator assignment determination unit 242) acquires the assigned resource amount for each analysis process (step S202). Note that the assigned resource amount acquired at this time is the assigned resource amount of the CPU. That is, also in Embodiment 2, when performing the assignment process, similar to Embodiment 1, first, a process assuming that a CPU is assigned to each analysis process is performed. Thereby, it is possible to suppress the complication of the process of assigning not only the CPU but also the GPU to the analysis process.

[0075] The assignment change unit 240 selects an analysis process with a large assigned resource amount per object (step S204). Specifically, the accelerator assignment determination unit 242 calculates the assigned resource amount per object for each analysis process. More specifically, the accelerator assignment determination unit 242 calculates the assigned resource amount per object (face) of the face analysis process as Rc_f / M. Similarly, the accelerator assignment determination unit 242 calculates the assigned resource amount per object (human body) of the human body analysis process as Rc_b / N. The accelerator assignment determination unit 242 compares Rc_f / M and Rc_b / N and selects the analysis process corresponding to the larger one. For example, if Rc_f / M < Rc_b / N, the accelerator assignment determination unit 242 selects the human body analysis process.

[0076] The allocation change unit 240 (accelerator allocation determination unit 242) determines to allocate a GPU (accelerator) to the analysis process selected in S204 (step S206). For example, if a human body analysis process is selected in S204, the accelerator allocation determination unit 242 allocates a GPU to the human body analysis process. This allows an accelerator to be preferentially allocated to an analysis process that is considered to have a high processing load. This makes it possible to improve throughput.

[0077] Note that Rc_f / M=Rc×Tfc / (Tfc×M+Tbc×N), and Rc_b / N=Rc×Tbc / (Tfc×M+Tbc×N). Therefore, an analysis process with a large amount of allocated resources per object is an analysis process with a long average object processing time (Tfc, Tbc) corresponding to each analysis process performed using a CPU. Therefore, the accelerator allocation determination unit 242 determines to allocate a GPU to an analysis process with a long object processing time performed using a CPU among multiple analysis processes.

[0078] The allocation change unit 240 (accelerator allocation determination unit 242) excludes from the analysis process to which the CPU conversion number of the allocated GPU is equal to or greater than the number of objects from the analysis process to which the CPU is allocated (step S208). Here, the CPU conversion number corresponds to the converted resource amount obtained by virtually converting the amount of GPU (second computational resource) into the amount of CPU (first computational resource). Therefore, when the number corresponding to the converted resource amount is equal to or greater than the number of objects corresponding to the analysis process to which the GPU is determined to be allocated, the allocation change unit 240 determines not to allocate a CPU to the analysis process.

[0079] Specifically, the accelerator allocation determination unit 242 calculates a CPU conversion number. Specifically, the accelerator allocation determination unit 242 calculates the CPU conversion number by dividing the object processing time of the CPU by the object processing time of the GPU for the analysis process to which the GPU is assigned. For example, if the GPU is assigned to the human body analysis process, the accelerator allocation determination unit 242 calculates the CPU conversion number as Tbc / Tbg[CPU / GPU]. Also, if the GPU is assigned to the face analysis process, the accelerator allocation determination unit 242 calculates the CPU conversion number as Tfc / Tfg[CPU / GPU]. Note that if the calculated value is not an integer, the accelerator allocation determination unit 242 may determine an integer closest to the calculated value as the CPU conversion number (converted resource amount).

[0080] The accelerator allocation determination unit 242 compares the CPU conversion number with the number of objects (average number of objects). For example, if a GPU is assigned to the human body analysis process, it compares Tbc / Tbg with the average number of objects N of the human body analysis process. Then, if Tbc / Tbg≧N, the accelerator allocation determination unit 242 excludes the human body analysis process to which the GPU is assigned from the targets to which the CPU is assigned. That is, the accelerator allocation determination unit 242 decides not to assign a CPU to the human body analysis process. Also, for example, if a GPU is assigned to the face analysis process, it compares Tfc / Tfg with the average number of objects M of the face analysis process. Then, if Tfc / Tfg≧M, the accelerator allocation determination unit 242 excludes the face analysis process to which the GPU is assigned from the targets to which the CPU is assigned. That is, the accelerator allocation determination unit 242 decides not to assign a CPU to the face analysis process.

[0081] In this way, the reason why the analysis process to which the GPU is assigned is excluded from the CPU allocation target is that even if a CPU is assigned to such an analysis process, the assigned CPU is highly likely not to be used for the analysis process. In other words, when the CPU conversion number of the GPU assigned to a certain analysis process is equal to or greater than the number of objects, the time to process all objects in one frame image using the GPU is shorter than the time to process one object using the CPU. For example, when the CPU conversion number of the GPU assigned to a human body analysis process is equal to or greater than the number of objects, the time to process all human bodies in one frame image using the GPU is shorter than the time to process one human body using the CPU. Therefore, it is faster to process the analysis process using only the GPU. Therefore, under the above-mentioned conditions, the analysis process to which the GPU is assigned is excluded from the CPU allocation target.

[0082] The allocation change unit 240 determines the amount of CPU resources allocated to the analysis processes to be allocated to the CPU (step S210). Specifically, the allocation change unit 240 determines the number of CPU cores to be allocated to each analysis process based on the total number of virtual CPU cores and the processing time required for each analysis process. Here, the "total number of virtual CPU cores" is the sum of the CPU conversion number (converted resource amount) and the number of CPU cores (amount of first computational resources) of the GPU. More specifically, the allocation change unit 240 determines the amount of resources (number of CPU cores) allocated to each analysis process according to the ratio of the processing time required for each analysis process and the total number of virtual CPU cores.

[0083] In the example of FIG. 11, the number of CPU cores is Rc, and the number of GPUs is 1. It is also assumed that a GPU is assigned to the human body analysis process. At this time, the total number of virtual CPU cores Rv is calculated as Rv=Rc+(Tbc / Tbg). The ratio of the CPU processing time required for the face analysis process to the CPU processing time required for the human body analysis process is Tfc×M:Tbc×N. At this time, the number of virtual CPU cores assigned to the face analysis process is calculated as Rv_f=Rv×(Tfc×M) / (Tfc×M+Tbc×N). The number of virtual CPU cores assigned to the human body analysis process is calculated as Rv_b=Rv×(Tbc×N) / (Tfc×M+Tbc×N). If the calculated value is not an integer, the integer closest to the calculated value is determined as the amount of resources (the number of virtual CPU cores) to be assigned.

[0084] Then, the allocation change unit 240 determines the number of CPU cores to be assigned to each analysis process as the value obtained by subtracting the CPU equivalent number of the assigned GPU from the number of assigned virtual CPU cores. In the above example, since no GPU is assigned to the face analysis process, the allocation change unit 240 determines the number of CPU cores to be assigned to the face analysis process as Rv_f. Furthermore, since one GPU is assigned to the human body analysis process, the allocation change unit 240 determines the number of CPU cores to be assigned to the human body analysis process as Rv_b-(Tbc / Tbg).

[0085] Thereafter, the allocation change unit 240 outputs the amount of allocated resources for each analysis process (step S212). Specifically, the allocation change unit 240 outputs information indicating how much of each of the computational resources (CPU and GPU) is to be allocated for each analysis process. As a result, the resource allocation unit 112 allocates computational resources to each analysis process with the determined (changed) amount of allocated resources. As a result, the ratio of the number of virtual CPU cores allocated to each analysis process is changed so as to correspond to the ratio of the processing time required by the CPUs, so that the processing wait time can be reduced. Therefore, the throughput can be improved.

[0086] In addition, when there are multiple GPUs, the processes of S204 to S210 may be repeated until all GPUs are allocated. In this case, for example, when the number of GPUs is 3, the processes of S204 to S210 are repeated 3 times. Alternatively, all GPUs may be allocated in the process of S206.

[0087] <First specific example> The processes according to the above-described Embodiment 2 will be described using specific numerical values. Here, let the frame processing time of the face analysis process be Tif = 202 msec, and the frame processing time of the human body analysis process be Tib = 1001 msec. Also, let the threshold value Tth1 = 200 msec. Also, let the average number of objects in the face analysis process be M = 16, and the average number of objects in the human body analysis process be N = 8. Also, let the object processing time of the face analysis process be Tfc = 50 msec / object, and the object processing time of the human body analysis process be Tbc = 250 msec / object. Therefore, since the specific example of the processes of S102 to S116 shown in FIG. 5 is the same as the specific example of Embodiment 1 described above, the description thereof is omitted.

[0088] The accelerator allocation determination unit 242 calculates the amount of allocated resources per object (face) in the face analysis process as Rc_f / M = 2 / 16 = 1 / 8. Similarly, the accelerator allocation determination unit 242 calculates the amount of allocated resources per object (human body) in the human body analysis process as Rc_b / N = 4 / 8 = 1 / 2. Therefore, since 1 / 8 < 1 / 2, the accelerator allocation determination unit 242 selects the human body analysis process (S204). Therefore, the accelerator allocation determination unit 242 allocates a GPU to the human body analysis process (S206). Note that, although this is synonymous, since Tfc (= 50) < Tbc (= 250), the accelerator allocation determination unit 242 determines to allocate a GPU to the human body analysis process with a long object processing time (S204, 206).

[0089] In addition, the object processing time of the face analysis processing by the GPU is Tfg=25 msec / piece, and the object processing time of the human body analysis processing by the GPU is Tbg=31 msec / piece. The accelerator allocation determination unit 242 calculates the CPU conversion number for the human body analysis processing as Tbc / Tbg[CPU / GPU]=250 / 31≒8[CPU / GPU]. Since Tbc / Tbg≒8≧8(=N), the accelerator allocation determination unit 242 excludes the human body analysis processing to which the GPU is assigned from the CPU assignment target (S208). In addition, the allocation change unit 240 does not assign a CPU to the human body analysis processing, so it determines to assign all CPU cores to the face analysis processing. In other words, the allocation change unit 240 determines to assign six CPU cores to the face analysis processing (S210).

[0090] In this case, the processing time of face analysis processing per frame image after the allocation change is Tfc×M / Rv_f=50×16 / 6≒100[msec]. In addition, the processing time of human body analysis processing per frame image after the allocation change is Tbc×N / Rv_b=250×8 / 8≒250[msec]. Note that this is equivalent to calculating Tbg×N / (number of GPUs to be allocated)=31×8 / 1=248≒250 for GPUs. Therefore, the processing waiting time is 250-100=150msec, and the throughput after the allocation change is 1000msec / max[100msec,250msec]≒4 frames / sec. On the other hand, the throughput before the allocation change is 1000msec / max[202msec,1001msec]≒1 frame / sec. Therefore, it can be seen that the throughput is improved by performing the allocation change process.

[0091] As described above, in the technology of Patent Document 1, the number of objects corresponds to the load on the computational resources. Therefore, when the technology of Patent Document 1 is applied to the above-mentioned specific example, the average number of objects (16) in the face analysis process is greater than the average number of objects (8) in the human body analysis process, so the GPU is allocated to the face analysis process rather than the human body analysis process. However, as described above, the processing time required for the human body analysis process is longer than that required for the face analysis process. Therefore, in the technology of Patent Document 1, for the analysis process of the same frame image, the face analysis process ends much earlier than the human body analysis process, and a long processing wait occurs until the human body analysis process ends, which may prevent the throughput from being improved. In contrast, in the second embodiment, it is possible to improve the throughput as described above.

[0092] <Second concrete example> Next, a second specific example will be described. In the second specific example, an example will be described in which the human body analysis process is not excluded from the CPU allocation target in the process of S208. Here, M=16, N=16. It is assumed that Tfc=50 msec / unit, Tbc=250 msec / unit, Tfg=25 msec / unit, and Tbg=31 msec / unit. In this case, the CPU allocation determination unit 142 calculates the required processing time for the face analysis process as Tfc×M=50×16=800 [msec] (S24). In addition, the CPU allocation determination unit 142 calculates the required processing time for the human body analysis process as Tbc×N=250×16=4000 [msec] (S24). In addition, the CPU allocation determination unit 142 calculates the ratio of the required processing times as Tfc×M:Tbc×N=800:4000=1:5.

[0093] The CPU allocation determination unit 142 calculates the amount of CPU resources to be allocated to face analysis processing as Rc_f=Rc×(Tfc×M) / (Tfc×M+Tbc×N)=6×(1 / (1+5))=1 [resource]. The CPU allocation determination unit 142 also calculates the amount of resources to be allocated to human body analysis processing as Rc_b=Rc×(Tbc×N) / (Tfc×M+Tbc×N)=6×(5 / (1+5))=5 [resource].

[0094] The accelerator allocation determination unit 242 calculates the amount of resources allocated per object (face) for face analysis processing as Rc_f / M=1 / 16. Similarly, the accelerator allocation determination unit 242 calculates the amount of resources allocated per object (human body) for human body analysis processing as Rc_b / N=5 / 16. Since 1 / 16<5 / 16, the accelerator allocation determination unit 242 selects human body analysis processing (S204). Therefore, the accelerator allocation determination unit 242 allocates a GPU to the human body analysis processing (S206).

[0095] The accelerator allocation determination unit 242 calculates the CPU conversion number for the human body analysis process as Tbc / Tbg[CPU / GPU]=250 / 31≈8[CPU / GPU]. Since Tbc / Tbg≈8<16(=N), the accelerator allocation determination unit 242 does not exclude the human body analysis process to which the GPU is allocated from the CPU allocation targets (S208).

[0096] At this time, the allocation change unit 240 calculates the total number of virtual CPU cores Rv as Rv=Rc+(Tbc / Tbg)=6+(250 / 31)≈6+8=14. The allocation change unit 240 calculates the number of virtual CPU cores allocated to face analysis processing as Rv_f=Rv×(Tfc×M) / (Tfc×M+Tbc×N)=14×(1 / (1+5))≈2. Here, since no GPU is allocated to face analysis processing, the allocation change unit 240 determines that two CPU cores are allocated to face analysis processing (S210). In addition, the allocation change unit 240 calculates the number of virtual CPU cores allocated to human body analysis processing as Rv_b=Rv×(Tbc×N) / (Tfc×M+Tbc×N)=14×(5 / (1+5))≈12. Here, one GPU is assigned to the human body analysis process, and since Tbc / Tbg[CPU / GPU]=8, one GPU corresponds to eight CPU cores. Therefore, the allocation change unit 240 determines to assign one GPU and four (=12-8) CPU cores to the human body analysis process.

[0097] In this case, the processing time of the face analysis processing per frame image after the allocation change is Tfc×M / Rv_f=50×16 / 2≒400[msec]. Also, the processing time of the human body analysis processing per frame image after the allocation change is Tbc×N / Rv_b=250×8 / 12≒170[msec]. Therefore, the processing waiting time is 400-170=230msec, and the throughput after the allocation change is 1000msec / max[400msec,170msec]=2.5 frames / sec. On the other hand, the throughput before the allocation change is 1000msec / max[202msec,1001msec]≒1 frame / sec. Therefore, it can be seen that the throughput is improved by performing the allocation change process.

[0098] (Modification) The present invention is not limited to the above-described embodiment, and can be modified as appropriate without departing from the spirit and scope of the present invention. For example, the order of the processes in the flowcharts shown in FIG. 5 and the like can be modified as appropriate.

[0099] In the above example, the program can be stored and provided to the computer using various types of non-transitory computer readable media. The non-transitory computer readable medium includes various types of tangible storage media. Examples of the non-transitory computer readable medium include magnetic recording media (e.g., flexible disks, magnetic tapes, hard disk drives), magneto-optical recording media (e.g., magneto-optical disks), CD-ROM (Read Only Memory), CD-R, CD-R / W, and semiconductor memory (e.g., mask ROM, PROM (Programmable ROM), EPROM (Erasable PROM), flash ROM, RAM (Random Access Memory)). The program may also be provided to the computer by various types of transitory computer readable media. Examples of the transitory computer readable medium include electric signals, optical signals, and electromagnetic waves. The transitory computer readable medium can provide the program to the computer via a wired communication path such as an electric wire and an optical fiber, or a wireless communication path.

[0100] Although the present invention has been described above with reference to the embodiment, the present invention is not limited to the above. Various modifications that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the invention.

[0101] A part or all of the above-described embodiments can be described as, but is not limited to, the following supplementary notes. (Appendix 1) an analysis execution means for executing an analysis process in parallel for each of a plurality of types of objects included in the image; a resource allocation means for allocating at least one of a plurality of computing resources to each of the plurality of analysis processes; A calculation means for calculating a first processing time which is a period from a processing start time to a processing end time of each of the plurality of analysis processes for the entire image; an allocation change means for changing the allocation of the computing resources when a difference in the first processing time between the plurality of analysis processes becomes equal to or greater than a predetermined threshold value, so as to reduce the difference in the first processing time; having the resource allocation means allocates at least one of a plurality of computational resources to each of the plurality of analysis processes in accordance with the change processing by the allocation change means. Image processing device. (Appendix 2) the allocation change means determines the amount of the computational resources to be allocated to each of the plurality of analysis processes based on the number of objects detected per image by each of the plurality of analysis processes and a second processing time which is a processing time per object by each of the plurality of analysis processes; 2. An image processing device as described in claim 1. (Appendix 3) the allocation change means determines the amount of the computational resources to be allocated to each of the plurality of analysis processes based on a third processing time, which is a processing time required for each of the analysis processes for one image, calculated using the number of objects and the second processing time for each of the plurality of analysis processes; 3. An image processing device as described in claim 2. (Appendix 4) the allocation change means determines an amount of the computational resources to be allocated to each of the plurality of analysis processes in accordance with the third processing time ratio for the plurality of analysis processes. 4. The image processing device according to claim 3. (Appendix 5) The plurality of computing resources include at least one first computing resource and at least one second computing resource having a processing capability higher than that of the first computing resource; the allocation change means determines an allocation of the first computing resource and the second computing resource. 5. An image processing device according to claim 1 . (Appendix 6) the allocation change means determines to allocate the second computational resource to an analysis process having a long second processing time, which is a processing time per object for each of the plurality of analysis processes performed using the first computational resource, among the plurality of analysis processes; 6. The image processing device according to claim 5. (Appendix 7) the allocation change means determines the amount of the first computational resource to be allocated to each of the plurality of analysis processes based on a sum of a converted resource amount obtained by virtually converting the amount of the second computational resource into the amount of the first computational resource and the amount of the first computational resource, and a third processing time which is a processing time required for each of the plurality of analysis processes for one image, calculated using the number of objects and the second processing time for each of the plurality of analysis processes. 7. The image processing device according to claim 6. (Appendix 8) the allocation change means determines not to allocate the first computing resource to the analysis process when the number corresponding to the converted resource amount is equal to or greater than the number of objects corresponding to the analysis process to which the allocation of the second computing resource has been determined. 8. The image processing device according to claim 7. (Appendix 9) Allocating at least one of a plurality of computing resources to each of analysis processes executed for each of a plurality of types of objects included in the image; performing an analysis process for each of the plurality of types of objects in parallel; Calculating a first processing time which is a period from a processing start time to a processing end time of each of the analysis processes of the plurality of objects for the entire same image; performing a process of changing the allocation of the computational resources so as to reduce the difference in the first processing times when the difference in the first processing times between the plurality of analysis processes becomes equal to or greater than a predetermined threshold value; allocating at least one of a plurality of computing resources to each of the plurality of analysis processes in response to the change process; Image processing methods. (Appendix 10) determining an amount of the computational resources to be allocated to each of the plurality of analysis processes based on the number of objects detected per image by each of the plurality of analysis processes and a second processing time which is a processing time per object by each of the plurality of analysis processes; 10. The image processing method according to claim 9. (Appendix 11) determining an amount of the computational resources to be allocated to each of the plurality of analysis processes based on a third processing time, which is a processing time required for each of the analysis processes for one image, calculated using the number of objects and the second processing time for each of the plurality of analysis processes; 11. An image processing method according to claim 10. (Appendix 12) determining an amount of the computational resources to be allocated to each of the plurality of analysis processes in accordance with a ratio of the third processing times for the plurality of analysis processes; 12. An image processing method according to claim 11. (Appendix 13) The plurality of computing resources include at least one first computing resource and at least one second computing resource having a processing capability higher than that of the first computing resource; determining an allocation of the first computational resource and the second computational resource; 13. An image processing method according to any one of claims 9 to 12. (Appendix 14) determining to allocate the second computational resource to an analysis process having a long second processing time, which is a processing time per object for each of the plurality of analysis processes performed using the first computational resource, among the plurality of analysis processes; 14. An image processing method according to claim 13. (Appendix 15) determining an amount of the first computational resource to be allocated to each of the plurality of analysis processes based on a sum of a converted resource amount obtained by virtually converting the amount of the second computational resource into the amount of the first computational resource and the amount of the first computational resource, and a third processing time which is a processing time required for each of the plurality of analysis processes for one image, calculated using the number of objects and the second processing time for each of the plurality of analysis processes; 15. An image processing method according to claim 14. (Appendix 16) when the number corresponding to the converted resource amount is equal to or greater than the number of objects corresponding to the analysis process to which the allocation of the second computing resource has been determined, determining not to allocate the first computing resource to the analysis process; 16. An image processing method according to claim 15. (Appendix 17) allocating at least one of a plurality of computing resources to each of the analysis processes executed for each of a plurality of types of objects included in the image; performing an analysis process for each of the plurality of types of objects in parallel; Calculating a first processing time which is a period from a processing start time to a processing end time of each of the analysis processes of the plurality of objects for the entire image; When a difference in the first processing time between the plurality of analysis processes becomes equal to or greater than a predetermined threshold, performing a process of changing the allocation of the computational resources so as to reduce the difference in the first processing time; allocating at least one of a plurality of computing resources to each of the plurality of analysis processes in response to the change process; A non-transitory computer-readable medium on which a program for causing a computer to execute the program is stored. [Explanation of symbols]

[0102] 1 Image processing device 2 Analysis execution unit 4 Resource Allocation Department 6 Calculation section 8. Allocation Change Section 20 Image Processing System 30 Imaging device 100 Image processing device 102 Control section 104 Storage section 106 Communications Department 108 Interface section 110 Image acquisition unit 112 Resource Allocation Department 120 Analysis Execution Department 122 Face Analysis Execution Department 124 Human Body Analysis Department 130 Analysis Status Monitoring Department 132 Image processing time calculation unit 134 Allocation change determination unit 136 Object Information Calculation Unit 140 Allocation Change Division 142 CPU Allocation Decision Unit 240 Allocation Change Department 242 Accelerator Allocation Decision Unit

Claims

1. an analysis execution means for executing an analysis process in parallel for each of a plurality of types of objects included in the image; a resource allocation means for allocating at least one of a plurality of computational resources to each of the plurality of analysis processes; a calculation means for calculating a first processing time which is a period from a processing start time to a processing end time of each of the plurality of analysis processes for the entire image; an allocation change means for changing the allocation of the computing resources when a difference in the first processing time between the plurality of analysis processes becomes equal to or greater than a predetermined threshold value, so as to reduce the difference in the first processing time; having the resource allocation means allocates at least one of a plurality of computational resources to each of the plurality of analysis processes in accordance with the change processing by the allocation change means. Image processing device.

2. the allocation change means determines the amount of the computational resources to be allocated to each of the plurality of analysis processes based on the number of objects detected per image by each of the plurality of analysis processes and a second processing time which is a processing time per object by each of the plurality of analysis processes. The image processing device according to claim 1 .

3. the allocation change means determines the amount of the computational resources to be allocated to each of the plurality of analysis processes based on a third processing time, which is a processing time required for each of the analysis processes for one image, calculated using the number of objects and the second processing time for each of the plurality of analysis processes; The image processing device according to claim 2 .

4. the allocation change means determines an amount of the computational resources to be allocated to each of the plurality of analysis processes in accordance with the ratio of the third processing times for the plurality of analysis processes. The image processing device according to claim 3 .

5. The plurality of computing resources include at least one first computing resource and at least one second computing resource having a processing capability higher than that of the first computing resource; the allocation change means determines an allocation of the first computational resource and the second computational resource. The image processing device according to claim 1 .

6. the allocation change means compares the amount of allocated resources per object for each of the plurality of analysis processes when the first computational resource is allocated to each of the plurality of analysis processes, and determines to allocate the second computational resource to the analysis process having a larger amount of allocated resources; The image processing device according to claim 5 .

7. the allocation change means determines the amount of the first computational resource to be allocated to each of the plurality of analysis processes based on a sum of a converted resource amount obtained by virtually converting the amount of the second computational resource into the amount of the first computational resource and the amount of the first computational resource, and a third processing time that is a processing time required for each of the plurality of analysis processes for one image, the third processing time being calculated using the number of objects for each of the plurality of analysis processes and a second processing time being a processing time per object for each of the plurality of analysis processes performed using the first computational resource; The image processing device according to claim 6.

8. the allocation change means determines not to allocate the first computing resource to the analysis process when the number corresponding to the converted resource amount is equal to or greater than the number of objects corresponding to the analysis process to which the allocation of the second computing resource has been determined. The image processing device according to claim 7.

9. Allocating at least one of a plurality of computational resources to each of analysis processes executed for each of a plurality of types of objects included in the image; performing an analysis process for each of the plurality of types of objects in parallel; Calculating a first processing time which is a period from a processing start time to a processing end time of each of the analysis processes of the plurality of objects for the entire image; when a difference in the first processing time between the plurality of analysis processes becomes equal to or greater than a predetermined threshold, performing a process of changing the allocation of the computational resources so as to reduce the difference in the first processing time; allocating at least one of a plurality of computing resources to each of the plurality of analysis processes in response to the change process; A computer-implemented image processing method.

10. allocating at least one of a plurality of computational resources to each of analysis processes executed for each of a plurality of types of objects included in the image; performing an analysis process for each of the plurality of types of objects in parallel; calculating a first processing time which is a period from a processing start time to a processing end time of each of the analysis processes of the plurality of objects for the entire image; When a difference in the first processing time between the plurality of analysis processes becomes equal to or greater than a predetermined threshold, performing a process of changing the allocation of the computational resources so as to reduce the difference in the first processing time; allocating at least one of a plurality of computational resources to each of the plurality of analysis processes in response to the change process; A program that causes a computer to execute the following.

Citation Information

Patent Citations

  • Data processing device and data processing method

    JP2011242898A

  • Parallel computer, thread reallocation determination method, and thread reallocation determination program

    JP2016207076A

  • Analysis node, method for managing resources, and program recording medium

    WO2018097058A1