WO2022009542A1 - 情報処理装置、情報処理方法及びプログラム - Google Patents

情報処理装置、情報処理方法及びプログラム Download PDF

Info

Publication number
WO2022009542A1
WO2022009542A1 PCT/JP2021/019553 JP2021019553W WO2022009542A1 WO 2022009542 A1 WO2022009542 A1 WO 2022009542A1 JP 2021019553 W JP2021019553 W JP 2021019553W WO 2022009542 A1 WO2022009542 A1 WO 2022009542A1
Authority
WO
WIPO (PCT)
Prior art keywords
inference
processing
unit
information
task
Prior art date
Application number
PCT/JP2021/019553
Other languages
English (en)
French (fr)
Inventor
正樹 高橋
洋平 中田
育規 石井
智行 奥野
Original Assignee
パナソニックIpマネジメント株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by パナソニックIpマネジメント株式会社 filed Critical パナソニックIpマネジメント株式会社
Priority to JP2022534937A priority Critical patent/JPWO2022009542A1/ja
Priority to CN202180046869.8A priority patent/CN115989481A/zh
Priority to EP21837781.0A priority patent/EP4180954A4/en
Publication of WO2022009542A1 publication Critical patent/WO2022009542A1/ja
Priority to US18/090,639 priority patent/US20230133989A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • G06F9/4887Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues involving deadlines, e.g. rate based, periodic
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • G06F9/4893Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues taking into account power or heat criteria
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y20/00Information sensed or collected by the things
    • G16Y20/10Information sensed or collected by the things relating to the environment, e.g. temperature; relating to location
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/09Supervised learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/096Transfer learning
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This disclosure relates to information processing devices, information processing methods and programs.
  • NN inference model an inference model
  • IoT Internet of Things
  • the NN inference model is made to perform inference at a drive frequency according to the accuracy required for each layer of the NN inference model, the amount of calculation, etc., so that high accuracy can be maintained in the entire device.
  • NN devices and the like capable of reducing power consumption are disclosed.
  • Patent Document 1 only discloses a technique for inference processing of a single inference model.
  • the present disclosure provides an information processing device, an information processing method, and a program capable of inference processing using a plurality of inference models even under a limited calculation environment.
  • the information processing apparatus is information on an acquisition unit for acquiring sensing data and information on the processing time of a plurality of subsequent tasks of inputting the sensing data into an inference model and processing the inference result and the inference model.
  • the information processing method is a method executed by a computer, in which sensing data is acquired, the sensing data is input to an inference model, and a plurality of subsequent inference results and inference model processing are performed.
  • the inference result is input to the task processing unit that processes the plurality of subsequent tasks, the information regarding the processing time of the task is acquired, the plurality of subsequent tasks are processed, and the inference result is processed by the task processing unit.
  • the inference time including the time from the input to the input to the completion of the processing of the plurality of subsequent tasks is measured, the sensing data is used as input data, and the information regarding the processing time of the plurality of subsequent tasks is used as output data.
  • the inference model is trained by machine learning using the measured inference time as reference data.
  • the program according to one aspect of the present disclosure is a program for causing a computer to execute the above information processing method.
  • an information processing device or the like capable of inference processing using a plurality of inference models even in a limited calculation environment.
  • FIG. 1 is a block diagram showing a functional configuration of an information processing system according to an embodiment.
  • FIG. 2 is a block diagram showing a functional configuration of the inference processing unit according to the embodiment.
  • FIG. 3 is a diagram showing a configuration example of a table including the delay flag information according to the embodiment and the forward propagation calculation method of the specialized NN group associated with the delay flag information.
  • FIG. 4 is a schematic diagram showing the configuration of the SoC according to the embodiment.
  • FIG. 5 is a flowchart showing the operation of the device according to the embodiment.
  • FIG. 6A is a schematic diagram showing an example of the processing time and the unit in charge of calculation of the common NN and the specialized NN group according to the embodiment.
  • FIG. 6B is a schematic diagram showing another example of the processing time and the unit in charge of calculation of the common NN and the specialized NN group according to the embodiment.
  • FIG. 6C is a schematic diagram showing an example of the processing time and the unit in charge of calculation after the calculation order rearrangement of the common NN and the specialized NN group according to the embodiment.
  • FIG. 7 is a flowchart showing the operation of the multitasking training unit according to the embodiment.
  • FIG. 8 is a diagram schematically showing the operation of the multitasking training unit according to the embodiment.
  • FIG. 9 is a flowchart showing the operation of the delay flag information measurement unit and the delay flag correct answer label generation unit according to the embodiment.
  • FIG. 10 is a diagram schematically showing the operation of the delay flag information measurement unit and the delay flag correct answer label generation unit according to the embodiment.
  • FIG. 11 is a flowchart showing the operation of the delay flag training unit according to the embodiment.
  • FIG. 12 is a diagram schematically showing the operation of the delay flag training unit according to the embodiment.
  • FIG. 13 is a table showing the occurrence rate of the delay flag information according to the embodiment.
  • the present disclosure relates to a device (hereinafter referred to as an inference device) equipped with an inference model generated by using machine learning. More specifically, the present invention relates to an NN type inference device that enables maintenance of service quality by changing the calculation order, and a training process for that purpose.
  • an inference device for an image transferred from a camera device, an infrared array sensor, or the like is one of the element functions.
  • the object indicates, for example, a pedestrian, a passenger car, a road sign, a building, an area of a road, or the like.
  • edge AI Artificial Intelligence
  • IoT Internet of Things
  • the device operates based on the judgment of the IoT device itself, instead of having the cloud always make a judgment
  • edge AI Artificial Intelligence
  • IoT devices are generally required to operate at low cost and low power consumption, and the calculation capacity is limited accordingly.
  • IoT devices are required to save power.
  • the service when a service using a plurality of NN inference models is performed, the service must be completed within the required processing time unless an operation for inferring a plurality of NN inference models is performed in parallel. Is difficult.
  • operations for inference are performed using a plurality of NN inference models provided in parallel.
  • the required processing time is also described as an allowable time.
  • a DSP Digital Signal Processor
  • NPU Neurological Network Processing Unit
  • ASIC Application Specific Integrated Circuit
  • the service required for the IoT device has come to utilize the inference processing of a plurality of NNs as described above, and the processing amount for the service tends to increase.
  • the IoT device is required to save power in addition to completing the service within the required processing time. Therefore, the IoT device tends to have a problem that the inference process cannot be completed within the required processing time depending on the input image.
  • a service that uses a plurality of NN inference models is, for example, to determine that the target person existing in the scene image has "something" in the right hand by inference processing of the NN inference model for skeleton detection.
  • One example is the process of determining that "something" is a smartphone by the inference process of the NN inference model for object detection.
  • Patent Document 1 is a method assuming a service that uses inference processing of a single NN inference model, and discloses a method related to guaranteeing processing time in a service that uses inference processing of a plurality of NN inference models. It has not been. Further, conventionally, a design and technical solution for processing in which the processing time required for inference processing of a plurality of inference models is estimated at the initial stage and the inference processing is performed in the optimum operation order within the required processing time. No studies have been made regarding this, and Patent Document 1 does not disclose such a thing.
  • the information processing apparatus is information on an acquisition unit for acquiring sensing data and information on the processing time of a plurality of subsequent tasks of inputting the sensing data into an inference model and processing the inference result and the inference model.
  • the information processing apparatus determines the task schedule of the task processing unit (for example, a plurality of NN inference models) that processes a plurality of subsequent tasks based on the information regarding the processing time of the plurality of subsequent tasks for the sensing data. can do.
  • the information processing device determines the task schedule so that the processing time of the task processing unit is within the required processing time based on the information on the processing time of a plurality of subsequent tasks, so that the processing time is limited.
  • inference processing using a plurality of inference models becomes possible.
  • the inference model includes a first inference model and a second inference model
  • the sensing data is input to the first inference model
  • the inference result is acquired
  • the acquired inference result or the inference result is described.
  • Intermediate data of inference may be input to the second inference model to acquire information on the processing time of the plurality of subsequent tasks.
  • the amount of calculation of the second inference model can be reduced as compared with the case where the sensing data is input to the second inference model. Therefore, it is possible to shorten the processing time in the second inference model.
  • the inference result is input, since the input of the second inference model is the same as the input of the subsequent task processing unit, it is expected that the accuracy or accuracy of the information regarding the processing time of the subsequent task processing unit will be improved. Is done.
  • the processing of the second inference model can be started before the inference of the first inference model is completed, so that the processing time of the second inference model can be further shortened.
  • the inference model includes a first inference model and a second inference model
  • the sensing data is input to the first inference model to acquire the inference result
  • the sensing data is used in the second inference model. It may be input to the inference model to obtain information on the processing time of the plurality of subsequent tasks.
  • the second inference model can start processing using the sensing data without waiting for the inference result to be output from the first inference model. That is, it is possible to advance the start timing of the processing of the second inference model.
  • the information regarding the processing time of the plurality of subsequent tasks may include information regarding a delay with respect to a predetermined time determined with respect to the processing time of the plurality of succeeding tasks.
  • the information processing device determines the task schedule so that the processing time of the task processing unit is within the required processing time based on the information regarding the delay of the plurality of subsequent tasks, so that the inference processing of the plurality of inference models is performed. Increases the certainty that inference processing can be performed within the required processing time in services that use.
  • a first schedule is determined, and the information regarding the delay indicates that the delay is greater than or equal to a predetermined value.
  • a second schedule may be determined in which the processing time of the plurality of subsequent tasks is shorter than that of the first schedule.
  • the second schedule for shortening the processing time is determined, so that the certainty that the inference processing can be performed within the required processing time is increased.
  • the first rule is used, and in determining the second schedule, the second schedule is more than the first schedule of the plurality of subsequent tasks.
  • a second rule that shortens the processing time may be used.
  • the schedule is determined based on the first and second rules, so that the amount of calculation and the calculation time can be reduced as compared with the case of dynamically searching the schedule.
  • the inference model may execute an inference process which is a pre-process common to the plurality of subsequent tasks.
  • the inference model for the preprocessing common to each task the total calculation amount and the memory usage amount of the inference processing required for each task processing can be compressed.
  • the inference model and the task processing unit are neural network models
  • the inference result is a feature amount of the sensing data
  • the task schedule is the order of memory loading and processing of the task processing unit. May include.
  • the inference result is input to the task processing unit that processes the plurality of subsequent tasks, the plurality of subsequent tasks are processed, the inference result is input to the task processing unit, and then the plurality of subsequent tasks are input.
  • the inference time including the time until the task processing is completed is measured, the sensing data is used as input data, the information regarding the processing time of the plurality of subsequent tasks is used as output data, and the measured inference time is used as reference data.
  • the inference model is trained by the machine learning used.
  • the program is a program for causing a computer to execute the above information processing method.
  • the task schedule is set so that the processing time of the task processing unit is within the required processing time based on the information on the processing time of multiple subsequent tasks. It becomes possible to decide.
  • each figure is a schematic diagram and is not necessarily exactly illustrated. Therefore, for example, the scales and the like do not always match in each figure. Further, in each figure, substantially the same configuration is designated by the same reference numeral, and duplicate description will be omitted or simplified.
  • FIG. 1 is a block diagram showing a functional configuration of the information processing system 10 according to the present embodiment.
  • FIG. 2 is a block diagram showing a functional configuration of the inference processing unit 110 according to the present embodiment.
  • the information processing system 10 includes a device 100, a camera 200, and a training device 300.
  • the device 100 performs inference processing on the input image from the camera 200, and provides a service according to the inference result.
  • the training device 300 generates NN data 400 for performing inference processing on the device 100.
  • each component will be described.
  • the device 100 is, for example, an IoT device, and has a function of providing a plurality of services based on an input image acquired from the camera 200.
  • the device 100 has an inference processing unit 110 and a task execution unit 140.
  • the input image acquired from the camera 200 is an example of sensing data.
  • the inference processing unit 110 performs inference processing on the input image input from the camera 200 by using the NN data 400 generated by the training device 300.
  • the inference processing unit 110 performs inference processing using a plurality of NNs provided in parallel.
  • the NN data 400 is configured to include a plurality of NNs provided in parallel.
  • the NN data 400 is, for example, data in which the layer configuration, weight, and bias of the NN are stored.
  • the NN data 400 includes a common NN 121 and a specialized NN group 124.
  • the common NN 121 is an NN for preprocessing in the NN data 400
  • the specialized NN group 124 is an NN group for subsequent processing in the NN data 400.
  • the time required for inference processing on the device 100 may change depending on the input image. Therefore, depending on the input image, it may take time for the inference processing and the service may not be performed within the processing time required for the device 100. Therefore, the inference processing unit 110 acquires an inference result regarding the time of the subsequent inference processing for the input image using the NN for preprocessing, and based on the acquired inference result, the order of the subsequent inference processing (task schedule). For example), etc. are changed.
  • the configuration of the inference processing unit 110 and the like will be described.
  • the inference processing unit 110 has an NN inference unit 120, an NN inference calculation management unit 130, and an acquisition unit 150.
  • the inference processing unit 110 is an inference processing device that can change the calculation order. It can be said that the inference processing unit 110 is an operation order variable inference device. Further, the inference processing unit 110 is an example of an information processing device.
  • the NN inference unit 120 performs inference processing on an input image input from the camera 200 by using a plurality of NNs based on the NN data 400 generated by the training device 300.
  • the NN inference unit 120 performs inference processing using a common NN 121 and a specialized NN group 124 including a plurality of NNs provided in parallel.
  • the NN inference unit 120 first performs forward propagation calculation processing using the common NN 121.
  • the common NN 121 is, for example, a forward propagation type NN.
  • the common NN 121 is an NN that outputs an inference processing result common to a plurality of NNs of the specialized NN group 124 and delay flag information.
  • the common NN121 executes inference processing, which is a preprocessing common to each task. It can be said that the common NN121 is a model executed as a preprocessing common to each task.
  • the common NN 121 includes a feature classification unit 122 and a delay flag classification unit 123.
  • the feature classification unit 122 and the delay flag classification unit 123 are, for example, trained NNs.
  • the common NN121 is an example of an inference processing unit. Further, the inference processing which is the pre-processing is not limited to the processing using NN.
  • the NN inference unit 120 acquires the inference processing result that is the output of the feature classification unit 122 by inputting the input image to the feature classification unit 122 of the common NN 121.
  • the inference processing result is, for example, a feature amount (image feature amount), but is not limited thereto. In the following, an example in which the inference processing result is a feature quantity will be described.
  • the feature classification unit 122 is a trained NN (NN for feature classification) trained to input an input image and output a feature amount corresponding to the input image.
  • the feature classification unit 122 performs inference processing common to each of the plurality of NNs of the specialized NN group 124 to be forward-propagated.
  • the feature amount is information common to each of the plurality of NNs in the specialized NN group 124.
  • the NN inference unit 120 outputs the feature amount, which is the output of the feature classification unit 122, to each of the plurality of NNs of the specialized NN group 124. Further, in the present embodiment, the NN inference unit 120 also outputs the feature amount to the delay flag classification unit 123. As described above, the feature amount output from the feature classification unit 122 may be used by the delay flag classification unit 123. In the present embodiment, the same feature amount is input to each of the delay flag classification unit 123 and the plurality of NNs of the specialized NN group 124.
  • the NN inference unit 120 acquires the delay flag information which is the output of the delay flag classification unit 123 by inputting the feature amount from the feature classification unit 122 to the delay flag classification unit 123.
  • the delay flag classification unit 123 is a trained NN (NN for delay flag classification) trained to input a feature amount and output delay flag information according to the feature amount.
  • the delay flag information is the time (inference time) including the time from when the feature amount (inference result) is input to the specialized NN group 124 (task processing unit or a part thereof) until the processing of a plurality of subsequent tasks is completed. ).
  • the delay flag information is information indicating an inference result as to whether or not the inference processing time of the entire NN inference unit 120 exceeds the threshold value.
  • the delay flag information is information regarding a delay with respect to a predetermined time (for example, a threshold value).
  • the predetermined time is a time determined for the processing time of a plurality of subsequent tasks.
  • the threshold value may be set, for example, based on the processing time required for the device 100 or the service content of the device 100. In addition, the threshold value is set in advance.
  • the delay flag information may be, for example, information indicating an inference result as to whether or not the processing time of the entire device 100 exceeds the threshold value.
  • the delay flag information may be, for example, information indicating an inference result as to whether or not the total processing time of the NN inference unit 120 and the task execution unit 140 exceeds the threshold value.
  • the delay flag information may be, for example, information indicating "OFF" when the inference processing time is equal to or less than the threshold value, and information indicating "ON” when the inference processing time exceeds the threshold value. Further, a plurality of “ON” may be set.
  • the delay flag information is, for example, information indicating "ON1" when the inference processing time exceeds the first threshold value and is equal to or less than the second threshold value larger than the first threshold value, and when the inference processing time exceeds the second threshold value. May be information indicating "ON2".
  • the first threshold is, for example, 10 msec
  • the second threshold is, for example, 15 msec, but is not limited thereto.
  • the delay flag information is an example of information regarding the processing time of a plurality of subsequent tasks.
  • the processing time of the plurality of subsequent tasks may be, for example, the processing time of the specialized NN group 124 or the total processing time of the specialized NN group 124 and the task execution unit 140.
  • the specialized NN group 124 and the task execution unit 140 are examples of the task processing unit.
  • the delay flag information may be set to two or four or more levels.
  • the delay flag information is not limited to information indicating the delay level such as "OFF”, “ON1”, and “ON2”, and may be, for example, the processing time (calculation time) itself.
  • the delay flag classification unit 123 outputs the delay flag information as soon as possible. Therefore, the delay flag classification unit 123 is preferably an NN having a smaller calculation amount than the feature classification unit 122 and the specialized NN group 124.
  • the common NN121 configured as described above is an example of a logical model that outputs feature amount and delay flag information when an input image is input from the camera 200.
  • the feature classification unit 122 is an example of the first inference model
  • the delay flag classification unit 123 is an example of the second inference model. That is, the inference model is configured to include a first inference model and a second inference model.
  • the NN inference operation management unit 130 is a forward propagation operation method (for example, an operation) for processing a plurality of tasks of the subsequent specialized NN group 124 of the common NN 121 based on the delay flag information from the delay flag classification unit 123. The order) is determined and the specialized NN group 124 is notified. Specifically, the NN inference operation management unit 130 notifies the NN inference unit 120, which controls the processing of the specialized NN group 124, of the determined forward propagation operation method. As a result, the NN inference unit 120 can input the feature amount from the feature classification unit 122 into the specialized NN group 124 and process a plurality of subsequent NNs by the determined forward propagation calculation method.
  • the NN inference operation management unit 130 is an example of a determination unit that determines a method of forward propagation operation and a control unit that processes a task in a subsequent stage.
  • the NN inference operation management unit 130 determines the method of the subsequent forward propagation operation of the common NN 121 based on the delay flag information and the table 500 shown in FIG.
  • FIG. 3 is a diagram showing a configuration example of a table 500 including delay flag information according to the present embodiment and a method of forward propagation calculation of the specialized NN group 124 linked to the delay flag information.
  • the parallel calculation item in FIG. 3 shows a method of subsequent forward propagation calculation of the common NN 121, for example, a method of forward propagation calculation of the specialized NN group 124.
  • the delay flag information "OFF” is associated with the parallel calculation item “optimal parallel calculation processing” (see the first line 501 of FIG. 3), and the delay flag information "ON1” is associated with the delay flag information "ON1".
  • Is associated with the parallel calculation item “delay handling parallel calculation processing” see the second line 502 in FIG. 3
  • the delay flag information "ON2” is associated with the parallel calculation item “delay handling parallel calculation processing + CPU clock”.
  • "Up processing” is associated (see the third row 503 of FIG. 3). Note that "ON” here means that the calculation time of the NN inference unit 120 exceeds the allowable time, and it is necessary to change the calculation order from the calculation order indicated by the "optimal parallel calculation process".
  • the order of transmission is an example of a task schedule.
  • Optimal parallel arithmetic processing indicates that arithmetic processing is performed according to a parallel arithmetic method (for example, parallel arithmetic order) determined based on the number of memory accesses, processing time (calculation time), power consumption, and the like. For example, when the delay is less than a predetermined value (for example, the delay is less than the threshold value), the order of the forward propagation operation (an example of the first schedule) is determined by using the "optimal parallel calculation process".
  • the “optimal parallel computing process” is an example of the first rule.
  • the delay of less than the predetermined value means that there is no delay, or the delay length or the degree of delay is less than the predetermined value.
  • Delay coping parallel arithmetic processing indicates that arithmetic processing is performed according to a parallel arithmetic method determined so that the processing time is shorter than that of "optimal parallel arithmetic processing". For example, when the delay is equal to or greater than a predetermined value (for example, the delay is equal to or greater than a threshold value), the order of forward propagation operations (an example of the second schedule) is determined using "delay-handling parallel arithmetic processing". In the parallel calculation method, for example, the calculation order is rearranged so as to preferentially start a process in which the processing time changes according to the number of detection candidate regions in the input image (for example, NMS (Non-Maximum Support) process).
  • NMS Non-Maximum Support
  • the "delayed parallel computing process" is an example of the second rule in which the processing time of a plurality of subsequent tasks is shorter than that of the first rule. Further, the delay of more than a predetermined time includes that there is a delay, or that the delay length or the degree of delay is more than a predetermined time.
  • NMS is an algorithm that deletes the detection area candidate if the degree of overlap (IoU value) between a certain detection area candidate and the detection area candidate with a higher score exceeds the threshold value set by the training process. be.
  • the delay flag information may include the setting of the drive frequency of the CPU in addition to the change of the calculation order of the parallel calculation. That is, the delay countermeasure is not limited to the change of the parallel calculation, and the setting of each processing unit (for example, the drive frequency) provided in the device 100 is performed together with the change of the parallel calculation or instead of the change of the parallel calculation. It may include changing the setting).
  • the calculation order indicated by the "optimal parallel calculation process” and the calculation order indicated by the “delay-handling parallel calculation process” are preset and stored in a memory 605 or the like.
  • delay flag information there may be a plurality of types of delay flag information, such as the delay flags "ON1" and "ON2".
  • delay flag information measuring unit 302 there may be a plurality of types of delay flag information depending on the measurement result of the processing time by the delay flag information measuring unit 302 described later.
  • the specialized NN group 124 includes a plurality of NNs in which each of the plurality of NNs outputs differently from each other based on the feature amount from the feature classification unit 122.
  • the specialized NN group 124 includes the NN125 for the first task and the NN126 for the second task.
  • the NN125 for the first task is an NN for object detection and the NN126 for the second task is a skeleton detection NN will be described, but the present invention is not limited thereto.
  • the NN125 for the first task includes the NMS process and the NN126 for the second task does not include the NMS process will be described, but the present invention is not limited thereto.
  • the specialized NN group 124 (NN inference unit 120 that performs processing using the specialized NN group 124) is an example of a task processing unit.
  • the task processing unit is configured to include the specialized NN group 124, each of the inference model and the task processing unit is an NN model.
  • the NN125 for the first task is a trained NN trained to input a feature amount from the feature classification unit 122 and output an inference result of object detection according to the feature amount.
  • the inference result which is the output of the NN125 for the first task, is output to the task execution unit 140 corresponding to the NN125 for the first task.
  • the NN126 for the second task is a trained NN trained to input the feature amount from the feature classification unit 122 and output the inference result of the skeleton detection according to the feature amount.
  • the inference result which is the output of the second task NN126, is output to the task execution unit 140 corresponding to the second task NN126.
  • object detection and skeleton detection are examples of multiple subsequent tasks.
  • the delay flag classification unit 123 When the delay flag classification unit 123 outputs the delay flag information including "ON1" or "ON2", the calculation order of the first task NN125 and the second task NN126 is changed from the time when the delay flag information "OFF”. .. In the present embodiment, the calculation order in the NN125 for the first task including at least the NMS process is changed from the time when the delay flag information is “OFF”.
  • the NN inference operation management unit 130 performs the forward propagation operation of the specialized NN group 124 according to the parallel operation item (parallel operation method) determined based on the delay flag information and the table 500, for example. To instruct. As a result, the NN inference calculation management unit 130 can change the calculation order according to the inference result (delay flag information) regarding the inference processing time for the input image, so that it is possible to suppress the processing time from becoming long. can.
  • the acquisition unit 150 acquires an input image from the camera 200.
  • the acquisition unit 150 outputs the acquired input image to the NN inference unit 120.
  • the task execution unit 140 executes a preset task based on the inference result of the NN inference unit 120.
  • the task execution unit 140 may be, for example, a display unit that displays the inference result, a light emitting unit that emits light according to the inference result, or a transmission unit that transmits the inference result to an external device. May be.
  • FIG. 4 is a schematic diagram showing the configuration of the SoC (System-on-a-Chip) 601 of the device 100 according to the present embodiment.
  • SoC System-on-a-Chip
  • NPU is mounted.
  • the SoC601 includes a CPU 602, a first NPU 603, a second NPU 604, and a memory 605.
  • Each function of the NN inference unit 120 is realized by implementing the trained NN (NN data 400) in the SoC601.
  • the CPU 602 is a processing unit that executes each process in the device 100.
  • the CPU 602 executes NMS processing, processing of the task execution unit 140, and the like.
  • the first NPU 603 and the second NPU 604 are dedicated circuits for performing NN processing.
  • the first NPU 603 and the second NPU 604 execute the NN process in the device 100.
  • the first NPU 603 and the second NPU 604 execute, for example, a process using the common NN 121 and a process using the specialized NN group 124.
  • the first NPU 603 and the second NPU 604 execute the skeleton detection process, the object detection process, and the delayed label determination process.
  • the memory 605 stores programs executed by each of the CPU 602, the first NPU 603, and the second NPU 604.
  • the memory 605 stores the NN data 400.
  • the inference processing unit 110 acquires the input image, outputs the feature amount and the delay label information when the input image is input to the common NN 121, and sets the specialized NN group 124 based on the delay label information.
  • Determine the forward propagation calculation method (optimal parallel calculation processing, delay target parallel calculation processing, etc.) for processing, input the feature amount to the specialized NN group 124, and use the determined forward propagation calculation method to specialize the NN.
  • It is configured to process group 124.
  • the inference processing unit 110 has an acquisition unit 150 for acquiring an input image, a common NN 121 for inputting an input image to the common NN 121 and outputting feature quantity and delay label information, and a specialized NN based on the delay label information.
  • NN inference operation management unit 130 an example of the determination unit that determines the forward propagation operation method (optimal parallel operation processing, delay target parallel operation processing, etc.) for processing the group 124, and the specialized NN group 124.
  • an NN inference calculation management unit 130 an example of a control unit for inputting and performing a determined forward propagation performance process.
  • the training device 300 generates NN data 400 used for inference processing of the NN inference unit 120 of the device 100.
  • the training device 300 includes a multitask training unit 301, a delay flag information measurement unit 302, a delay flag correct answer label generation unit 303, a delay flag training unit 304, a training label database 305 (training label DB 305), and a scene. It has an image database 306 (scene image DB 306).
  • the multitask training unit 301 trains the feature classification unit 122 and the specialized NN group 124 among the NN data 400.
  • the multitasking training unit 301 performs training for object detection and skeleton detection.
  • the multitask training unit 301 implements a training process in which multitask learning (Multi-Task Learning) is applied to NN training.
  • multitask learning Multi-Task Learning
  • the multitasking training unit 301 inputs the scene image acquired from the scene image DB 306, and corresponds to the correct answer label in the skeleton detection corresponding to the scene image and the scene image acquired from the training label DB 305.
  • the correct label in the object detection to be performed is used as reference data (teacher data), and NNs (common NN121 and specialized NN group 124) are generated based on an error backpropagation method (BP: Backpropagation) or the like.
  • BP Backpropagation
  • multi-task learning is a machine learning method that solves multiple tasks with a single model. It is a method that aims to improve the prediction accuracy of tasks by acquiring "common factors" between tasks by training multiple related tasks at the same time.
  • multiple tasks such as object classification, object detection, and object area (segmentation) recognition may be trained at the same time.
  • the plurality of tasks are skeleton detection and object detection.
  • the multitasking training unit 301 specializes in, for example, NNs commonly used for each task (for example, common NN121) and each task. Train with NN (eg, specialized NN group 124). Further, by using the commonly used NN, there is an advantage that the total calculation amount and the memory usage amount of the inference processing required for each task processing can be compressed.
  • the delay flag information measurement unit 302 and the delay flag correct answer label generation unit 303 perform processing for generating training data when training the delay flag classification unit 123 by the delay flag training unit 304.
  • the delay flag information measuring unit 302 measures the processing time of the forward propagation operation of the common NN 121 and the specialized NN group 124 generated by the multitasking training unit 301. In the present embodiment, the delay flag information measuring unit 302 measures at least the processing time of the NN125 for the first task. This is because the NN125 for the first task includes NMS processing, and the processing time differs depending on the number of detection candidate regions in the input image. Further, the NN126 for the second task does not include processing in which the processing time differs depending on the number of detection candidate regions such as NMS processing, that is, the processing time does not change significantly depending on the input image. Therefore, in the present embodiment, the processing time does not change significantly. Is not measured.
  • the delay flag correct answer label generation unit 303 generates a delay flag correct answer label used for training the common NN 121 in the delay flag training unit 304 by using the information based on the measurement result of the processing time.
  • the delay flag training unit 304 trains the common NN121 among the common NN121 and the specialized NN group 124 generated by the multitask training unit 301 using the delay flag correct answer label generated by the delay flag correct answer label generation unit 303. I do.
  • the delay flag training unit 304 uses, for example, a scene image as input data, a delay flag correct answer label as reference data (teacher data), and weight data and bias data in the delay flag classification unit 123 of the common NN 121 based on the error back propagation method. And update. That is, the delay flag training unit 304 trains the delay flag classification unit 123 of the common NN 121 by using the scene image and the delay flag correct answer label.
  • the delay flag training unit 304 may train the feature classification unit 122 together with the delay flag classification unit 123 using, for example, the delay flag correct answer label.
  • the training label DB 305 stores a training label for generating NN data 400.
  • the training label DB 305 stores, for example, a training label for performing skeleton detection and a training label for performing object detection for one scene image.
  • the scene image DB 306 stores a scene image for generating NN data 400.
  • the training label DB 305 and the scene image DB 306 are realized by, for example, a semiconductor memory, but are not limited thereto.
  • the training device 300 acquires the scene image, inputs the scene image to the common NN 121, acquires the feature amount, inputs the feature amount to the specialized NN group 124, and inputs the feature amount to the specialized NN group 124.
  • the time from the input of the scene image to the common NN 121 to the end of the processing of the specialized NN group 124 is measured, the scene image is used as the input data, and the information regarding the processing time of the specialized NN group 124 is output. It is configured to train the common NN121 by machine learning using the measured time as data as data.
  • the training device 300 acquires a scene image, inputs the scene image to the common NN 121, acquires a feature amount, inputs the feature amount to the specialized NN group 124, and processes the specialized NN group 124.
  • the delay flag information measuring unit 302 that measures the time from when the scene image is input to the common NN 121 until the processing of the specialized NN group 124 is completed, and the processing of the specialized NN group 124 using the scene image as input data. It is provided with a delay flag training unit 304 that trains a common NN 121 by machine learning using information about time as output data and measured time as reference data.
  • FIG. 5 is a flowchart showing the operation of the device 100 according to the present embodiment.
  • FIG. 5 describes an example in which the delay flag information included in the table 500 is of two types, “ON (ON1)” and “OFF”. In other words, it is assumed that the delay flag classification unit 123 is trained to output either "ON" or "OFF”.
  • the acquisition unit 150 of the device 100 acquires an input image from the camera 200 (S101).
  • the acquisition unit 150 outputs the input image acquired in step S101 to the NN inference unit 120.
  • the NN inference unit 120 first executes the forward propagation calculation process using the common NN 121 (S102). Specifically, the NN inference unit 120 acquires the feature amount that is the output of the feature classification unit 122 by inputting the input image into the feature classification unit 122 of the common NN 121. Then, the NN inference unit 120 acquires the delay flag information which is the output of the delay flag classification unit 123 by inputting the acquired feature amount to the delay flag classification unit 123.
  • the delay flag information is the result inferred from the feature amount by the delay flag classification unit 123, and in the present embodiment, it shows the result of inferring whether or not the inference processing time of the entire NN inference unit 120 exceeds the threshold value.
  • the NN inference unit 120 outputs the acquired delay flag information to the NN inference calculation management unit 130.
  • the NN inference unit 120 may further output delay flag information to a functional unit outside the inference processing unit 110, which is a functional unit included in the device 100.
  • the functional unit may be, for example, a functional unit having a graphic function.
  • the NN inference operation management unit 130 acquires the delay flag information (S103).
  • the NN inference operation management unit 130 determines whether or not the acquired delay flag information is “ON” (S104).
  • the NN inference calculation management unit 130 can complete the service within the processing time required by the device 100 even if the delay flag information is "OFF", that is, the inference processing is performed according to the "optimal parallel calculation processing".
  • the forward propagation calculation method of the specialized NN group 124 is determined to be "optimal parallel calculation processing" based on the table 500 shown in FIG. 3 (S105).
  • the NN inference calculation management unit 130 determines to execute the processing of the specialized NN group 124 in the order based on the "optimal parallel calculation processing".
  • the order based on "optimal parallel computing” is an example of the first schedule.
  • the NN inference operation management unit 130 outputs the determined forward propagation operation method of the specialized NN group 124 to the NN inference unit 120.
  • the NN inference unit 120 When the NN inference unit 120 acquires from the NN inference operation management unit 130 that the forward propagation operation method of the specialized NN group 124 is "optimal parallel operation processing", the NN inference unit 120 propagates in parallel in the order indicated by "optimal parallel operation processing". Execute arithmetic processing. For example, the NN inference unit 120 performs a parallel forward propagation operation on the specialized NN group 124 in the most efficient order (S106). The NN inference unit 120 inputs the feature amount, which is the output of the feature classification unit 122, into each NN of the specialized NN group 124, performs inference processing according to a schedule based on "optimal parallel arithmetic processing", and performs inference processing of each NN. Acquire the inference result (skeleton detection result, object detection result, etc.) that is the output.
  • FIG. 6A is a schematic diagram showing the processing time of the common NN 121 and the specialized NN group 124 according to the present embodiment, and an example of the unit in charge of calculation.
  • the first information 700a shown in FIG. 6A shows the processing time when the processing is completed within the allowable time even if the processing is performed in the operation order based on the "optimal parallel calculation processing", and the calculation unit. An example is shown.
  • FIGS. 6A to 6C an example in which NMS processing is outsourced to CPU 602 will be described.
  • Area 701 shows the exclusive rate of each unit (CPU 602, 1st NPU 603 and 2nd NPU 604) in the common NN 121.
  • processing is performed using the common NN 121 by the first NPU 603 (NPU 1 in FIGS. 6A to 6C) and the second NPU 604 (NPU 2 in FIGS. 6A to 6C).
  • Area 702 shows the occupancy rate of each unit in the NN125 for the first task.
  • the object detection process is performed by at least one of the first NPU 603 and the second NPU 604 using the NN125 for the first task.
  • Area 703 shows the occupancy rate of each unit in the NN126 for the second task in the NN126 for the second task.
  • at least one of the first NPU 603 and the second NPU 604 performs a skeleton detection process using the NN126 for the second task.
  • Regions 704a and 704b indicate the occupancy rate of each unit in the NMS processing of the NN125 for the first task.
  • NMS processing is performed by the CPU 602.
  • the forward propagation calculation of the specialized NN group 124 is performed by a parallel calculation method in which the number of memory accesses and the calculation time are balanced.
  • the NN inference unit 120 is instructed to perform the "optimal parallel arithmetic processing" indicating that the arithmetic processing is performed. In this case, even if the processing is performed in the calculation order based on the "optimal parallel calculation processing", the processing can be completed within the allowable time.
  • the NN inference calculation management unit 130 when the delay flag information is "ON”, that is, when the inference processing is performed according to the "optimal parallel operation processing", the NN inference calculation management unit 130 within the processing time required by the device 100. If the inference result indicates that the service cannot be completed (Yes in S104), the forward propagation calculation method of the specialized NN group 124 is changed to "delay countermeasure parallel calculation processing" based on the table 500 shown in FIG. Determine (S107). That is, when the delay flag information is "ON”, the NN inference calculation management unit 130 determines to execute the processing of the specialized NN group 124 in the order based on the "delay countermeasure parallel calculation processing". The order based on "delay countermeasure parallel arithmetic processing" is an example of the second schedule. The NN inference operation management unit 130 outputs the determined forward propagation operation method of the specialized NN group 124 to the NN inference unit 120.
  • the NN inference unit 120 acquires from the NN inference operation management unit 130 that the forward propagation operation method of the specialized NN group 124 is "delay countermeasure parallel arithmetic processing"
  • the NN inference unit 120 is parallel in the order indicated by "delay countermeasure parallel arithmetic processing”.
  • Execute forward propagation operation processing For example, the NN inference unit 120 performs a parallel forward propagation operation on the specialized NN group 124 in a set order (S108).
  • the NN inference unit 120 inputs a feature amount, which is an output of the feature classification unit 122, into each NN of the specialized NN group 124, performs inference processing according to a schedule based on "delay countermeasure parallel arithmetic processing", and performs inference processing for each NN.
  • the inference result (skeleton detection result, object detection result, etc.) which is the output of is acquired.
  • FIG. 6B is a schematic diagram showing an example of the processing time and the unit in charge of calculation of the common NN 121 and the specialized NN group 124 according to the present embodiment.
  • the second information 700b shown in FIG. 6B is the processing time when the processing is not completed within the allowable time when the processing is performed in the calculation order based on the "optimal parallel calculation processing", and the unit in charge of calculation. An example is shown.
  • FIG. 6B shows a case where the allowable time is exceeded when the optimum parallel arithmetic processing is performed, that is, it is determined as Yes in step S104.
  • the inference time of the inference processing unit 110 exceeds the allowable time because the time required for NMS processing (region 704b) is longer than the time in FIG. 6A (region 704a).
  • the time required for the NMS processing may become long as shown in FIG. 6B.
  • step S107 of FIG. 5 if the NN inference calculation management unit 130 performs the inference processing according to the "optimal parallel calculation processing", the allowable time may be exceeded, so the NN inference calculation management unit 130 is changed to the "optimum parallel calculation processing". It is decided to perform inference processing according to "delay countermeasure parallel arithmetic processing".
  • the "delay countermeasure parallel arithmetic processing” indicates that the arithmetic order is rearranged so that the NMS processing (processing performed in the area 704b) can be started preferentially.
  • a delay occurs when the allowable time is exceeded.
  • FIG. 6C is a schematic diagram showing an example of the processing time and the unit in charge of calculation after the calculation order rearrangement of the common NN 121 and the specialized NN group 124 according to the present embodiment.
  • the third information 700c shown in FIG. 6C is when the processing is performed in the calculation order based on the “delay countermeasure parallel calculation processing” when the processing is not completed within the allowable time in the calculation order based on the “optimal parallel calculation processing”.
  • An example of the processing time and the unit in charge of calculation is shown.
  • the third information 700c is obtained by changing the processing order from the second information 700b shown in FIG. 6B.
  • FIG. 6C shows the processing order and the like after the determination is Yes in step S104 and the change is made.
  • the calculation order by the "delay countermeasure parallel calculation process” starts the NMS process preferentially.
  • the timing for starting the NMS process is advanced from the calculation order by the "optimal parallel calculation process” so as to advance the timing for starting the NMS process.
  • the operation order is an example of a task schedule.
  • the task schedule may include the memory load order of the NN model of the specialized NN group 124.
  • the layer whose processing time greatly varies depending on the input image is the layer on which the NMS processing is performed, but the processing time is large depending on the input image. It may be a layer that uses other fluctuating algorithms.
  • the NN inference unit 120 outputs the inference result output by the operation in step S106 or S108 to the task execution unit 140.
  • the task execution unit 140 operates based on the inference result acquired from the NN inference unit 120, and the service is provided to the user. That is, various task processes are executed by the task execution unit 140 (S109).
  • the device 100 has a certain service capacity by having the inference processing unit 110 capable of determining the load of the inference processing at an early stage and changing the calculation order. It can be operated while guaranteeing it. Further, when the delay flag information is "OFF", the inference processing unit 110 can provide the inference service by the optimum parallel calculation, and can also contribute to power saving.
  • the inference processing unit 110 estimates the processing time required for the NN inference processing in the subsequent plurality of NNs in the initial stage (preprocessing) from the feature amount of the input image. Then, the inference processing unit 110 can perform the NN inference processing in the operation order in which the processing can be completed within the required processing time in the parallel operation.
  • the delay flag information is "ON"
  • the arithmetic processing is executed in the order shown in FIG. 6C
  • the present invention is not limited to this, and the arithmetic processing is performed according to the delay flag information.
  • the order may be changed. For example, if the delay flag information contains information indicating the degree of delay (for example, the degree of delay: "large”, “medium”, “small”, or an estimated delay time), the delay degree is determined by the degree of delay.
  • Parallel calculation items may be set. That is, the order of arithmetic processing may be set for each degree of delay.
  • the NN inference calculation management unit 130 may determine the parallel calculation item according to the degree of delay included in the delay flag information as the method of the forward propagation calculation of the specialized NN group 124.
  • FIG. 7 is a flowchart showing the operation of the multitasking training unit 301 according to the present embodiment.
  • FIG. 8 is a diagram schematically showing the operation of the multitasking training unit 301 according to the present embodiment.
  • the multitask training unit 301 acquires a scene image from the scene image DB 306 and acquires the correct answer label of each NN from the training label DB 305 (S201).
  • the multitask training unit 301 includes a scene image, a correct answer label for the NN125 for the first task (the NN correct answer label for the first task) for the scene image, and a correct answer label for the NN126 for the second task for the scene image (the correct answer label for the second task).
  • NN correct answer label for the second task is acquired.
  • the multitask training unit 301 acquires the correct answer label of the object detection NN and the correct answer label of the skeleton detection NN.
  • the multitask training unit 301 performs a forward propagation operation using the common NN 121 and the specialized NN group 124.
  • the multitask training unit 301 performs a forward propagation operation using the feature classification unit 122 of the common NN 121 and the specialized NN group 124 (S202).
  • the multitask training unit 301 acquires a feature amount which is an output of the common NN121 obtained by inputting a scene image to the common NN121, and further inputs the acquired feature amount to the NN125 for the first task.
  • the first inference result, which is the output of the NN125 for the first task, and the second inference result, which is the output of the NN126 for the second task, obtained by inputting the feature amount into the NN126 for the second task are acquired. do.
  • the multitasking training unit 301 then back-propagates the feature classification unit 122 and the specialized NN group 124 using the correct label of each NN as reference data (teacher data), and performs weighting and weighting.
  • the bias is updated (S203).
  • the multitask training unit 301 regards the output value of the loss function as an error, and performs a backpropagation operation to perform weights (weights (weights) in the feature classification unit 122 of the common NN 121 and the specialized NN group 124.
  • the update process of the weight data) and the bias (bias data) is executed.
  • the loss function in the NN125 for the first task indicates how much the first inference result of the NN125 for the first task has an error from the NN correct answer label for the first task.
  • the loss function in the NN126 for the second task indicates how much the second inference result of the NN126 for the second task has an error from the NN correct answer label for the second task.
  • the multitask training unit 301 acquires the first inference result which is the output of the NN125 for the first task based on the scene image, and the output value of the loss function based on the first inference result and the NN correct answer label for the first task. To get. Then, the multitask training unit 301 regards the output value as an error and executes the weight and bias update processing in the feature classification unit 122 of the common NN 121 and the first task NN 125 of the specialized NN group 124 by the back propagation operation. do.
  • the multitask training unit 301 acquires the second inference result which is the output of the NN126 for the second task based on the scene image, and the loss function based on the second inference result and the NN correct answer label for the second task. Get the output value of. Then, the multitask training unit 301 regards the output value as an error and executes the weight and bias update processing in the second task NN126 of the feature classification unit 122 of the common NN121 and the specialized NN group 124 by the back propagation operation. do. In this way, the multitasking training unit 301 alternately executes, for example, the update process.
  • the multitasking training unit 301 determines whether or not the correct answer rate of the NN inference result (or the error rate compared with the correct answer label of the scene image) satisfies the requirement (S204).
  • the requirement may be, for example, the correct answer rate required for the device 100. That is, the multitask training unit 301 may determine in step S204 depending on whether or not the correct answer rate of the NN inference result is equal to or higher than the correct answer rate required for the device 100.
  • the multitasking training unit 301 ends the process when the correct answer rate of the NN inference result satisfies the requirement (Yes in S204). Further, when the correct answer rate of the NN inference result does not satisfy the requirement (No in S204), the multitask training unit 301 returns to step S201 and continues the process. That is, when the correct answer rate of the NN inference result does not satisfy the requirement, the multitask training unit 301 trains using various scene images and the correct answer label associated with the scene image, and the correct answer rate of the NN inference result is a requirement. Continue the training process until it meets the requirements.
  • FIG. 7 is a flowchart showing the operation of the delay flag information measuring unit 302 and the delay flag correct answer label generation unit 303 according to the present embodiment.
  • FIG. 10 is a diagram schematically showing the operation of the delay flag information measuring unit 302 and the delay flag correct answer label generation unit 303 according to the present embodiment.
  • the delay flag information measuring unit 302 acquires an arbitrary scene image (S301).
  • the delay flag information measuring unit 302 may acquire, for example, a scene image used for multitask learning by the multitasking training unit 301.
  • the delay flag information measuring unit 302 measures the calculation time of the forward propagation calculation of the common NN 121 and the specialized NN group 124 trained by the multitask training unit 301 (S302). In the present embodiment, the delay flag information measuring unit 302 measures the calculation time of the NN125 for the first task including the NMS processing.
  • step S302 the delay flag information measuring unit 302 inputs the scene image to the common NN 121 to acquire the feature amount result and the delay flag information, and further inputs the feature amount to the NN125 for the first task to obtain the first task.
  • the task NN125 is processed, and the time from inputting the scene image to the common NN121 until the processing of the specialized NN group 124 is completed is measured.
  • the delay flag information measuring unit 302 may at least measure the time from when the feature amount is input to the NN125 for the first task until the processing of the specialized NN group 124 is completed.
  • FIG. 10 illustrates an example in which the delay flag information measuring unit 302 measures the time (an example of inference time) from the input of the feature amount to the NN125 for the first task to the completion of the processing of the specialized NN group 124. ing.
  • the same hardware device as the device 100 may be used. Further, the processing time may be calculated by simulation.
  • the delay flag information measuring unit 302 provides information regarding the feature amount obtained by inputting the scene image to the common NN 121 and the processing time of a plurality of subsequent tasks of the processing of the common NN 121 (delay flag classification unit 123).
  • (Delay flag information) which is the output of the above, is acquired, and the processing time of the NN125 for the first task when the feature amount is input is measured. Measuring the processing time is an example of measuring the delay flag information.
  • the delay flag information measuring unit 302 determines whether or not the measured processing time exceeds the threshold value (S303).
  • the threshold is set in advance, for example.
  • the delay flag information measuring unit 302 sets the corresponding scene image as the delay flag ON and stores it in the delay flag information DB 302a (see FIG. 10) (S304).
  • the delay flag information measuring unit 302 sets the corresponding scene image as the delay flag OFF and stores it in the delay flag information DB 302a (S305).
  • a delay occurs (exceeds the allowable time) only in the NN125 for the first task, and (ii). ) A delay may occur only in the NN126 for the second task.
  • the contents of the "parallel calculation item" (for example, the calculation order after recombination) may differ between (i) and (ii).
  • a plurality of types of the delay flag "ON" may exist for each content of the "parallel calculation item".
  • the delay flag correct answer label generation unit 303 generates the delay flag correct answer label based on the delay flag information of the delay flag information DB 302a.
  • the delay flag correct answer label generation unit 303 labels the scene image with the delay flag “ON” or “OFF” to generate the delay flag correct answer label (S306). It can be said that the delay flag correct answer label generation unit 303 generates the delay flag correct answer label by associating the delay flag information with the scene image.
  • the delay flag correct answer label generation unit 303 stores the generated delay flag correct answer label in the delay flag correct answer label DB 303a (see FIG. 10).
  • FIG. 11 is a flowchart showing the operation of the delay flag training unit 304 according to the present embodiment.
  • FIG. 12 is a diagram schematically showing the operation of the delay flag training unit 304 according to the present embodiment.
  • the delay flag training unit 304 acquires a scene image from the scene image DB 306, and acquires a delay flag correct answer label corresponding to the scene image from the delay flag correct answer label DB 303a (S401).
  • the delay flag training unit 304 performs a forward propagation operation using the common NN121 (S402).
  • the delay flag training unit 304 uses, for example, the delay flag classification unit 123 of the common NN 121 to perform a forward propagation operation.
  • the delay flag training unit 304 acquires the feature amount that is the output of the feature classification unit 122 obtained by inputting the scene image into the feature classification unit 122 of the common NN 121, and further obtains the acquired feature amount.
  • the delay flag information which is the output of the delay flag classification unit 123 obtained by inputting to the delay flag classification unit 123 is acquired.
  • the delay flag training unit 304 then performs a back propagation operation on the common NN 121 using the delay flag correct answer label as reference data (teacher data), and updates the weight and bias (S403).
  • the delay flag training unit 304 regards the output value of the loss function as an error based on the error back propagation method, and performs a back propagation operation to perform weight (weight data) and bias (bias data) in the delay flag classification unit 123 of the common NN 121. Update processing is executed.
  • the loss function in the common NN 121 indicates how much the inference result (delay flag information) of the delay flag classification unit 123 of the common NN 121 has an error from the delay flag correct answer label corresponding to the scene image. ..
  • the delay flag training unit 304 acquires the delay flag information which is the output of the delay flag classification unit 123 based on the scene image, and acquires the output value of the loss function based on the delay flag information and the delay flag correct answer label. Then, the delay flag training unit 304 regards the output value as an error and executes the weight and bias update processing in the delay flag classification unit 123 of the common NN 121 by the back propagation operation.
  • the scene image is used as input data
  • the delay flag information output from the delay flag classification unit 123 of the common NN 121 is used as output data
  • the time measured by the delay flag information measuring unit 302 is referred to.
  • the common NN121 (for example, the delay flag classification unit 123) is trained by machine learning using it as data.
  • the delay flag training unit 304 may consider the output value as an error and execute weight and bias update processing in the feature classification unit 122 and the delay flag classification unit 123 by back propagation calculation. That is, the delay flag training unit 304 may target the feature classification unit 122 in addition to the delay flag classification unit 123 for training processing. As a result, the weights and biases in the feature classification unit 122 are updated together with the delay flag classification unit 123, and it is expected that the accuracy of the delay flag information output by the delay flag classification unit 123 will be improved.
  • the delay flag training unit 304 determines whether or not the correct answer rate of the NN inference result (or the error rate comparing the inference result and the delay flag correct answer label) satisfies the requirement (S404).
  • the requirement may be, for example, the correct answer rate required for the device 100. That is, the delay flag training unit 304 may determine in step S404 depending on whether or not the correct answer rate of the NN inference result is equal to or higher than the correct answer rate required for the device 100.
  • the delay flag training unit 304 ends the process when the correct answer rate of the NN inference result satisfies the requirement (Yes in S404). Further, when the correct answer rate of the NN inference result does not satisfy the requirement (No in S404), the delay flag training unit 304 returns to step S401 and continues the process. That is, when the correct answer rate of the NN inference result does not satisfy the requirement, the delay flag training unit 304 trains using various scene images and the correct answer label associated with the scene image, and the correct answer rate of the NN inference result is a requirement. Continue the training process until it meets the requirements.
  • the NN data 400 is capable of executing the operation of the device 100 described above.
  • the generated NN data 400 is transmitted to the device 100.
  • the training device 300 sequentially performs training processing, the feature classification unit 122 and the specialized NN group 124 of the common NN 121 and the delay flag classification unit 123 of the common NN 121 are subjected to the training process. Multitask learning may be performed, and at that time, the forward propagation operation of the specialized NN group 124 may be measured and the delay flag information may be acquired. Further, the training device 300 updates the weight and bias of the delay flag classification unit 123 of the common NN 121 by using the error information with the delay flag information (delay flag correct answer label) as the correct answer at the time of the back propagation calculation, and multi-task learning.
  • the weights and biases of the feature classification unit 122 of the common NN 121 and the specialized NN group 124 may be updated using the error information of.
  • the training device 300 may be configured to be capable of performing multitask learning for the feature classification unit 122 and the specialized NN group 124 of the common NN 121 and the delay flag classification unit 123 of the common NN 121.
  • FIG. 13 is a table showing the occurrence rate of the delay flag information according to the present embodiment.
  • the “occurrence rate of delay flag information” shown in FIG. A configuration to output is also conceivable. From the results shown in FIG. 13, it is possible to motivate the developer to change the NN configuration, hyperparameters, etc. in order to increase the occurrence rate of the delay flag information “OFF”. Further, the training device 300 displays the occurrence rate (occurrence rate corresponding to the delay flag information "NG" in FIG. 13) or the information of the corresponding scene image when an inference delay that does not satisfy the required specifications occurs. It is possible to encourage developers and the like to consider measures to prevent inference delays at the process stage of NN training processing.
  • the input data may be, for example, an input image from the camera 200.
  • the NN inference unit 120 may acquire the delay flag information which is the output of the delay flag classification unit 123 by inputting the input image from the camera 200 into the delay flag classification unit 123.
  • the delay flag training unit 304 acquires the delay flag which is the output of the delay flag classification unit 123 obtained by inputting the scene image into the delay flag classification unit 123 of the common NN 121 in step S402 of FIG. ..
  • step S403 of FIG. 11 the delay flag training unit 304 back-propagates the delay flag classification unit 123 of the common NN 121 using the delay flag correct answer label as reference data (teacher data), and weights the delay flag classification unit 123. And update the bias. Further, for example, the same input data (input image) may be input to the feature classification unit 122 and the delay flag classification unit 123.
  • the input data of the delay flag classification unit 123 may be, for example, intermediate data of the inference of the feature classification unit 122.
  • the NN inference unit 120 causes the feature classification unit 122 to output the intermediate data of the inference, and inputs the intermediate data to the delay flag classification unit 123 to acquire the delay flag information which is the output of the delay flag classification unit 123. You may.
  • the processing of the subsequent task is the processing using the NN
  • the NN inference operation management unit 130 has described an example of determining the operation order of the processing using the NN, but the present invention is limited to this. Not done.
  • the processing of the subsequent task is a processing that does not use NN, and the NN inference operation management unit 130 may determine the operation order of the processing that does not use NN.
  • the NPU is mounted on the SoC601 of the device 100
  • the NPU may not be mounted.
  • the CPU 602 and the NPU only the CPU 602 is mounted on the SoC601.
  • each process described above may be executed by the CPU 602.
  • the NN inference processing unit 110 has described an example used in the product field of the IoT device, but the product field is not limited to this.
  • the NN inference processing unit 110 can also be applied to product fields different from IoT devices such as unmanned aerial vehicles such as autonomous vehicles, robots, and drones.
  • the order of the plurality of processes described in the above embodiment is an example.
  • the order of the plurality of processes may be changed, and the plurality of processes may be executed in parallel. Further, a part of the plurality of processes may not be executed.
  • each component described in the embodiment may be realized as software, or may be typically realized as an LSI which is an integrated circuit. These may be individually integrated into one chip, or may be integrated into one chip so as to include a part or all of them. Although it is referred to as LSI here, it may be referred to as IC, system LSI, super LSI, or ultra LSI depending on the degree of integration. Further, the method of making an integrated circuit is not limited to the LSI, and may be realized by a dedicated circuit or a general-purpose processor. An FPGA (Field Programmable Gate Array) that can be programmed after the LSI is manufactured, or a reconfigurable processor that can reconfigure the connection and settings of the circuit cells inside the LSI may be used. Furthermore, if an integrated circuit technology that replaces an LSI appears due to advances in semiconductor technology or another technology derived from it, the components may be integrated using that technology.
  • LSI Field Programmable Gate Array
  • the division of the functional block in the block diagram is an example, and a plurality of functional blocks can be realized as one functional block, one functional block can be divided into a plurality, and some functions can be transferred to other functional blocks. You may. Further, the functions of a plurality of functional blocks having similar functions may be processed by a single hardware or software in parallel or in a time division manner.
  • the training device included in the information processing system may be realized as a single device or may be realized by a plurality of devices.
  • each processing unit of the training device may be realized by two or more server devices.
  • the components included in the information processing system may be distributed to the plurality of server devices in any way.
  • the communication method between the plurality of server devices is not particularly limited.
  • the technique of the present disclosure may be a program for causing a computer to execute characteristic processing in the above-mentioned information processing method, or may be a non-temporary computer-readable recording medium in which the above-mentioned program is recorded.
  • the above program can be distributed via a transmission medium such as the Internet.
  • the above program and a digital signal composed of the above programs may be transmitted via a telecommunication line, a wireless or wired communication line, a network typified by the Internet, data broadcasting, or the like.
  • the program and the digital signal composed of the programs may be executed by another independent computer system by recording and transferring to a recording medium or by transferring via a network or the like. ..
  • each component may be configured by dedicated hardware or may be realized by executing a software program suitable for each component.
  • Each component may be realized by a program execution unit such as a CPU or a processor reading and executing a software program recorded on a recording medium such as a hard disk or a semiconductor memory.
  • This disclosure is applicable to an information processing device or the like that uses inference processing of a plurality of NNs.
  • Information processing system 100 Equipment 110 Inference processing unit 120 NN Inference unit 121 Common NN (Inference processing unit) 122 Feature classification unit 123 Delay flag classification unit 124 Specialized NN group 125 NN for the first task 126 NN for the second task 130 NN inference operation management unit (decision unit, control unit) 140 Task execution unit 150 Acquisition unit 200 Camera 300 Training device 301 Multitask training unit 302 Delay flag information measurement unit 302a Delay flag information DB 303 Delay flag correct answer label generator 303a Delay flag correct answer label DB 304 Delay Flag Training Department 305 Training Label DB 306 Scene image DB 400 NN data 500 table 501 1st row 502 2nd row 503 3rd row 601 SoC 602 CPU 603 1st NPU 604 2nd NPU 605 Memory 700a 1st information 700b 2nd information 700c 3rd information 701, 702, 703, 704a, 704b Area

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Toxicology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Environmental & Geological Engineering (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)

Abstract

情報処理装置は、センシングデータを取得する取得部(150)と、センシングデータを推論モデルに入力して、推論結果及び推論モデルの処理の複数の後続のタスクの処理時間に関する情報を取得する共通NN(121)と、複数の後続のタスクの処理時間に関する情報に基づいて、複数の後続のタスクを処理するタスク処理部の複数の後続のタスクを処理するためのタスクスケジュールを決定し、タスク処理部に推論結果を入力して、決定したタスクスケジュールで複数の後続のタスクを処理させるNN推論演算管理部(130)とを備える。

Description

情報処理装置、情報処理方法及びプログラム
 本開示は、情報処理装置、情報処理方法及びプログラムに関する。
 近年、ニューラルネットワーク(以下、NN)を採用した推論モデル(以下、NN推論モデル又は単にNNとも称する。)を搭載した種々の装置が提案されている。例えば、一般的に安価、低電力稼働が求められ、それに伴い計算能力も制限されるIoT(Internet of Things)機器にNN推論モデルを搭載することが提案されている。例えば、特許文献1には、NN推論モデルのレイヤごとに要求される精度、計算量などに応じた駆動周波数でNN推論モデルに推論を実行させることにより、高い精度を維持しつつ装置全体での消費電力を低減することができるNN装置等が開示されている。
特開2018-005297号公報
 しかし、特許文献1には、単一の推論モデルの推論処理についての技術しか開示されていない。
 そこで、本開示は、限られた計算環境下においても複数の推論モデルを用いた推論処理が可能な情報処理装置、情報処理方法及びプログラムを提供する。
 本開示の一態様に係る情報処理装置は、センシングデータを取得する取得部と、前記センシングデータを推論モデルに入力して、推論結果及び推論モデルの処理の複数の後続のタスクの処理時間に関する情報を取得する推論処理部と、前記複数の後続のタスクの処理時間に関する情報に基づいて、前記複数の後続のタスクを処理するタスク処理部の前記複数の後続のタスクを処理するためのタスクスケジュールを決定する決定部と、前記タスク処理部に推論結果を入力して、決定した前記タスクスケジュールで前記複数の後続のタスクを処理させる制御部と、を備える。
 本開示の一態様に係る情報処理方法は、コンピュータにより実行される方法であって、センシングデータを取得し、前記センシングデータを推論モデルに入力して、推論結果及び推論モデルの処理の複数の後続のタスクの処理時間に関する情報を取得し、前記複数の後続のタスクを処理するタスク処理部に前記推論結果を入力して、前記複数の後続のタスクを処理させ、前記推論結果を前記タスク処理部に入力してから前記複数の後続のタスクの処理が終了するまでの時間を含む推論時間を測定し、前記センシングデータを入力データとし、前記複数の後続のタスクの処理時間に関する情報を出力データとし、測定した前記推論時間をリファレンスデータとして用いた機械学習により前記推論モデルを訓練する。
 本開示の一態様に係るプログラムは、上記の情報処理方法をコンピュータに実行させるためのプログラムである。
 本開示の一態様によれば、限られた計算環境下においても複数の推論モデルを用いた推論処理が可能な情報処理装置等を実現することができる。
図1は、実施の形態に係る情報処理システムの機能構成を示すブロック図である。 図2は、実施の形態に係る推論処理部の機能構成を示すブロック図である。 図3は、実施の形態に係る遅延フラグ情報と、当該遅延フラグ情報に紐づいた特化NN群の順伝播演算手法とを含むテーブルの構成例を示す図である。 図4は、実施の形態に係るSoCの構成を示す模式図である。 図5は、実施の形態に係る機器の動作を示すフローチャートである。 図6Aは、実施の形態に係る共通NN及び特化NN群の処理時間及び演算担当ユニットの一例を示す模式図である。 図6Bは、実施の形態に係る共通NN及び特化NN群の処理時間及び演算担当ユニットの他の一例を示す模式図である。 図6Cは、実施の形態に係る共通NN及び特化NN群の演算順序組み換え後の処理時間及び演算担当ユニットの一例を示す模式図である。 図7は、実施の形態に係るマルチタスク訓練部の動作を示すフローチャートである。 図8は、実施の形態に係るマルチタスク訓練部の動作を模式的に示す図である。 図9は、実施の形態に係る遅延フラグ情報測定部及び遅延フラグ正解ラベル生成部の動作を示すフローチャートである。 図10は、実施の形態に係る遅延フラグ情報測定部及び遅延フラグ正解ラベル生成部の動作を模式的に示す図である。 図11は、実施の形態に係る遅延フラグ訓練部の動作を示すフローチャートである。 図12は、実施の形態に係る遅延フラグ訓練部の動作を模式的に示す図である。 図13は、実施の形態に係る遅延フラグ情報の発生率を示すテーブルである。
 (本開示の基礎となった知見)
 本開示の実施の形態の説明に先立ち、本開示の基礎に至った経緯について説明する。
 本開示は、機械学習を用いて生成される推論モデルを搭載した装置(以下、推論装置)に関する。より詳しくは、演算順序変更によるサービス品質維持を可能にするNN型の推論装置、及び、そのための訓練処理に関する。
 近年、推論装置のうちの物体検出装置、分類装置などでは、ディープラーニング技術の採用により、飛躍的に性能が向上し、研究又は商品化が多数行われている。また、スマートフォン又は運転手の代わりに機械が運転する自動運転車(ロボットカー)においても、カメラ装置、赤外線アレイセンサ等から転送される画像に対する推論装置は、要素機能の1つである。物体とは、自動運転車の場合は、例えば、歩行者、乗用車、道路標識、建物、道路の領域等を示す。
 また、IoT(Internet of Things)機器にNN推論モデルを搭載させ、常にクラウドに判定させるのではなく、IoT機器自体の判定によって機器が動作する、エッジAI(Artificial Intelligence)の分野が最近普及し始めている。例えば、IoT機器を含む様々な工業製品の分野において、当該工業製品にNN型の推論装置を搭載し、その推論結果に基づき、サービスを実施する製品が市場に投入されている。ちなみに、IoT機器は、一般的に安価、低電力稼働が求められ、それに伴い計算能力も制限される。
 IoT機器は、省電力が求められる。そのようなIoT機器において、複数のNN推論モデルを使用するサービスを行う場合、複数のNN推論モデルを並列に推論するための演算を行わなければ、要求される処理時間内にサービスを完了することが困難である。このように、例えば、IoT機器においては、並列に設けられた複数のNN推論モデルを用いて、推論のための演算を行うことが想定される。なお、要求される処理時間を、許容時間とも記載する。
 また、NPU(Neural network Processing Unit)と呼ばれるDSP(Digital Signal Processor)、ASIC(Application Specific Integrated Circuit)などで実装されたNN処理専用回路がCPU(Central Processing Unit)とは別にIoT機器に搭載され始めている。しかしながら、IoT機器に要求されるサービスが、上記のように複数のNNの推論処理を利用するようになってきており、当該サービスのための処理量が増える傾向にある。
 また、IoT機器は、要求される処理時間内にサービスを完了することに加えて、省電力であることが求められる。そのため、IoT機器では、入力画像によっては、要求される処理時間内に推論処理を完了できないという課題が発生しやすい。
 なお、複数のNN推論モデルを使用するサービスとは、例えば、シーン画像に存在する対象人物が右手に「何か」を持っていることを骨格検出用NN推論モデルの推論処理によって判定し、かつ、その「何か」がスマートフォンであることを物体検出用NN推論モデルの推論処理によって判定する処理などが一例として挙げられる。
 上記の特許文献1は、単一のNN推論モデルの推論処理を使用するサービスを想定した方式であり、複数のNN推論モデルの推論処理を使用するサービスにおける、処理時間の担保に関する方式については開示されていない。また、従来では、初期段階で複数の推論モデルの推論処理に必要な処理時間を推定して、要求される処理時間内で最適な演算順序で推論処理を行う処理に関する設計及び技術的な解決策に関して検討はされておらず、特許文献1においてもそのようなことは開示されていない。
 そこで、複数のNN推論モデルの推論処理を使用するサービスにおいて、要求される処理時間内で推論処理を行い得る情報処理装置等について鋭意検討を行い、以下に説明する情報処理方法等を創案した。
 本開示の一態様に係る情報処理装置は、センシングデータを取得する取得部と、前記センシングデータを推論モデルに入力して、推論結果及び推論モデルの処理の複数の後続のタスクの処理時間に関する情報を取得する推論処理部と、前記複数の後続のタスクの処理時間に関する情報に基づいて、前記複数の後続のタスクを処理するタスク処理部の前記複数の後続のタスクを処理するためのタスクスケジュールを決定する決定部と、前記タスク処理部に推論結果を入力して、決定した前記タスクスケジュールで前記複数の後続のタスクを処理させる制御部と、を備える。
 これにより、情報処理装置は、センシングデータに対する複数の後続のタスクの処理時間に関する情報に基づいて、複数の後続のタスクを処理するタスク処理部(例えば、複数のNN推論モデル)のタスクスケジュールを決定することができる。情報処理装置は、複数の後続のタスクの処理時間に関する情報に基づいて、タスク処理部の処理時間を要求される処理時間内となるようにタスクスケジュールを決定することで、限られた計算環境下においても複数の推論モデルを用いた推論処理が可能となる。
 また、例えば、前記推論モデルは、第1推論モデルと、第2推論モデルとを含み前記センシングデータを前記第1推論モデルに入力して前記推論結果を取得し、取得された前記推論結果又は前記推論の中間データを前記第2推論モデルに入力して前記複数の後続のタスクの処理時間に関する情報を取得してもよい。
 これにより、センシングデータを第2推論モデルに入力する場合に比べて、第2推論モデルの計算量を小さくすることができる。よって、第2推論モデルにおける処理時間を短くすることが可能である。また、推論結果が入力される場合は、第2推論モデルの入力が後続のタスク処理部の入力と同一であるため、後続のタスク処理部の処理時間に関する情報の正確性又は精度の向上が見込まれる。推論の中間データが入力される場合は、第1推論モデルの推論終了前に第2推論モデルの処理を開始することができるため、第2推論モデルの処理時間をより短くすることができる。
 また、例えば、前記推論モデルは、第1推論モデルと、第2推論モデルとを含み、前記センシングデータを前記第1推論モデルに入力して前記推論結果を取得し、前記センシングデータを前記第2推論モデルに入力して前記複数の後続のタスクの処理時間に関する情報を取得してもよい。
 これにより、第1推論モデルから推論結果が出力されることを待つことなく、センシングデータを用いて第2推論モデルに処理を開始させることができる。つまり、第2推論モデルの処理の開始タイミングを早めることが可能となる。
 また、例えば、前記複数の後続のタスクの処理時間に関する情報は、前記複数の後続のタスクの処理時間に対して定められる所定時間に対する遅延に関する情報を含んでもよい。
 これにより、遅延に関する情報に基づいてタスク処理部のタスクスケジュールを決定することができる。情報処理装置は、複数の後続のタスクの遅延に関する情報に基づいて、タスク処理部の処理時間を要求される処理時間内となるようにタスクスケジュールを決定することで、複数の推論モデルの推論処理を使用するサービスにおいて、要求される処理時間内で推論処理を行い得る確実性が増す。
 また、例えば、前記遅延に関する情報に、前記遅延が所定未満であることを示す情報が含まれる場合、第1のスケジュールを決定し、前記遅延に関する情報に、前記遅延が所定以上であることを示す情報が含まれる場合、前記第1のスケジュールより前記複数の後続のタスクの処理時間が短い第2のスケジュールを決定してもよい。
 これにより、遅延が所定以上である場合に、処理時間が短くなる第2のスケジュールが決定されるので、要求される処理時間内で推論処理を行い得る確実性が増す。
 また、例えば、前記第1のスケジュールの決定には、第1ルールを用い、前記第2のスケジュールの決定には、前記第2のスケジュールが前記第1のスケジュールよりも前記複数の後続のタスクの処理時間が短くなる第2ルールを用いてもよい。
 これにより、第1及び第2ルールに基づいてスケジュールが決定されることにより、スケジュールを動的に探索するよりも計算量及び計算時間を低減することができる。
 また、例えば、前記推論モデルは、前記複数の後続のタスクに共通する前処理である推論処理を実行してもよい。
 これにより、各タスクに共通する前処理のための推論モデルを使用することによって、各タスク処理に必要な推論処理の全体計算量及びメモリ使用量を圧縮することができる。
 また、例えば、前記推論モデル及び前記タスク処理部は、ニューラルネットワークモデルであり、前記推論結果は、前記センシングデータの特徴量であり、前記タスクスケジュールは、前記タスク処理部のメモリロード及び処理の順序を含んでもよい。
 これにより、高性能なNN推論モデルをIoT機器などの限られた計算環境下において適用することができる。また、センシングデータの特徴量に基づいて後続のタスクの処理時間が推論されるため、センシングデータに対するタスク処理の難易度に応じた処理時間が推論されやすくなる。
 また、コンピュータにより実行される方法であって、センシングデータを取得し、前記センシングデータを推論モデルに入力して、推論結果及び推論モデルの処理の複数の後続のタスクの処理時間に関する情報を取得し、前記複数の後続のタスクを処理するタスク処理部に前記推論結果を入力して、前記複数の後続のタスクを処理させ、前記推論結果を前記タスク処理部に入力してから前記複数の後続のタスクの処理が終了するまでの時間を含む推論時間を測定し、前記センシングデータを入力データとし、前記複数の後続のタスクの処理時間に関する情報を出力データとし、測定した前記推論時間をリファレンスデータとして用いた機械学習により前記推論モデルを訓練する。また、プログラムは、上記の情報処理方法をコンピュータに実行させるためのプログラムである。
 これにより、上記情報処理装置において実行される処理を実現する推論モデルを生成することができる。生成された推論モデルを用いて推論処理が行われることで、複数の後続のタスクの処理時間に関する情報に基づいて、タスク処理部の処理時間を要求される処理時間内となるようにタスクスケジュールを決定することが可能となる。
 さらに、これらの包括的又は具体的な態様は、システム、装置、方法、集積回路、コンピュータプログラム、又は、コンピュータ読み取り可能なCD-ROMなどの非一時的な記録媒体で実現されてもよく、システム、装置、方法、集積回路、コンピュータプログラム、及び、記録媒体の任意な組み合わせで実現されてもよい。
 以下、本開示の一態様に係る情報処理装置等の具体例について、図面を参照しながら説明する。ここで示す実施の形態は、いずれも本開示の一具体例を示すものである。従って、以下の実施の形態で示される数値、数値、構成要素、ステップ、ステップの順序などは、一例であり、本開示を限定する主旨ではない。また、以下の実施の形態における構成要素のうち、独立請求項に記載されていない構成要素については、任意の構成要素として説明される。また全ての実施の形態において、各々の内容を組み合わせることもできる。
 また、各図は、模式図であり、必ずしも厳密に図示されたものではない。したがって、例えば、各図において縮尺などは必ずしも一致しない。また、各図において、実質的に同一の構成については同一の符号を付しており、重複する説明は省略又は簡略化する。
 また、本明細書において、同じ、一致などの要素間の関係性を示す用語、並びに、数値、および、数値範囲は、厳格な意味のみを表す表現ではなく、実質的に同等な範囲、例えば数%程度の差異をも含むことを意味する表現である。
 (実施の形態)
 以下、本実施の形態に係る情報処理システム等について、図1~図13を参照しながら説明する。
 [1.情報処理システムの構成]
 まずは、本実施の形態に係る情報処理システム10の構成について、図1~図4を参照しながら説明する。図1は、本実施の形態に係る情報処理システム10の機能構成を示すブロック図である。図2は、本実施の形態に係る推論処理部110の機能構成を示すブロック図である。
 図1に示すように、情報処理システム10は、機器100と、カメラ200と、訓練装置300とを備える。機器100は、カメラ200からの入力画像に対して推論処理を行い、推論結果に応じたサービスを行う。訓練装置300は、機器100で推論処理を行うためのNNデータ400を生成する。以下、各構成要素について、説明する。
 機器100は、例えば、IoT機器であり、カメラ200から取得した入力画像に基づいて、複数のサービスを提供する機能を有する。機器100は、推論処理部110と、タスク実行部140とを有する。カメラ200から取得する入力画像は、センシングデータの一例である。
 推論処理部110は、訓練装置300により生成されたNNデータ400を用いて、カメラ200から入力される入力画像に対して推論処理を行う。推論処理部110は、並列に設けられた複数のNNを用いて推論処理を行う。言い換えると、NNデータ400は、並列に設けられた複数のNNを含んで構成される。なお、NNデータ400は、例えば、NNのレイヤ構成、重み及びバイアスを格納したデータである。
 図2に示すように、NNデータ400は、共通NN121と、特化NN群124とを含んで構成される。共通NN121は、NNデータ400における前処理用のNNであり、特化NN群124は、NNデータ400における後続の処理用のNN群である。
 機器100での推論処理に要する時間は、入力画像に応じて変化することがある。そのため、入力画像によっては、推論処理に時間を要し、機器100に要求される処理時間内にサービスを行えないことが起こり得る。そこで、推論処理部110は、前処理用のNNを用いて入力画像に対する後続の推論処理の時間に関する推論結果を取得し、取得した推論結果に基づいて、後続の推論処理の順序(タスクスケジュールの一例)等を変更する。以下、推論処理部110等の構成について説明する。
 推論処理部110は、NN推論部120と、NN推論演算管理部130と、取得部150とを有する。なお、推論処理部110は、演算順序を変更可能な推論処理装置である。推論処理部110は、演算順序可変推論装置であるとも言える。また、推論処理部110は、情報処理装置の一例である。
 NN推論部120は、訓練装置300により生成されたNNデータ400に基づく複数のNNを用いて、カメラ200から入力される入力画像に対して推論処理を行う。
 NN推論部120は、共通NN121と、並列に設けられた複数のNNを含む特化NN群124とを用いて推論処理を行う。NN推論部120は、まず共通NN121を使用して、順伝播演算処理を行う。共通NN121は、例えば、順伝播型のNNである。
 共通NN121は、特化NN群124の複数のNNに共通する推論処理結果、及び、遅延フラグ情報を出力するNNである。共通NN121は、各タスクに共通する前処理である推論処理を実行する。共通NN121は、各タスクに共通する前処理として実行されるモデルであるとも言える。共通NN121は、特徴分類部122と、遅延フラグ分類部123とを含む。特徴分類部122と、遅延フラグ分類部123とは、例えば、訓練済みNNである。なお、共通NN121は、推論処理部の一例である。また、前処理である推論処理は、NNを用いた処理に限定されない。
 NN推論部120は、共通NN121の特徴分類部122に入力画像が入力することで、特徴分類部122の出力である推論処理結果を取得する。推論処理結果(推論結果)は、例えば、特徴量(画像特徴量)であるがこれに限定されない。以下では、推論処理結果が特徴量である例について説明する。
 特徴分類部122は、入力画像を入力とし、当該入力画像に応じた特徴量を出力するように訓練された訓練済みのNN(特徴分類用のNN)である。特徴分類部122は、順伝播演算処理される特化NN群124の複数のNNのそれぞれに共通の推論処理を行う。特徴量は、特化NN群124の複数のNNのそれぞれに共通の情報である。
 NN推論部120は、特徴分類部122の出力である特徴量を、特化NN群124の複数のNNのそれぞれに出力する。また、本実施の形態では、NN推論部120は、遅延フラグ分類部123にも特徴量を出力する。このように、特徴分類部122の出力である特徴量は、遅延フラグ分類部123で利用されてもよい。本実施の形態では、遅延フラグ分類部123と、特化NN群124の複数のNNのそれぞれとに、同一の特徴量が入力される。
 NN推論部120は、特徴分類部122から特徴量を遅延フラグ分類部123に入力することで、遅延フラグ分類部123の出力である遅延フラグ情報を取得する。遅延フラグ分類部123は、特徴量を入力とし、当該特徴量に応じた遅延フラグ情報を出力するように訓練された訓練済みのNN(遅延フラグ分類用のNN)である。遅延フラグ情報は、特徴量(推論結果)を特化NN群124(タスク処理部又はその一部)に入力してから複数の後続のタスクの処理が終了するまでの時間を含む時間(推論時間)を示す情報である。例えば、遅延フラグ情報は、NN推論部120全体の推論処理時間が閾値を超えるか否かの推論結果を示す情報である。遅延フラグ情報は、所定時間(例えば、閾値)に対する遅延に関する情報であるとも言える。所定時間は、複数の後続のタスクの処理時間に対して定められる時間である。閾値は、例えば、機器100又は機器100のサービス内容に要求される処理時間に基づいて設定されてもよい。また、閾値は、予め設定される。なお、遅延フラグ情報は、例えば、機器100全体の処理時間が閾値を超えるか否かの推論結果を示す情報であってもよい。遅延フラグ情報は、例えば、NN推論部120及びタスク実行部140の合計の処理時間が閾値を超えるか否かの推論結果を示す情報であってもよい。
 遅延フラグ情報は、例えば、推論処理時間が閾値以下である場合は「OFF」を示す情報であり、推論処理時間が閾値を超える場合は「ON」を示す情報であってもよい。また、「ON」は、複数設定されてもよい。遅延フラグ情報は、例えば、推論処理時間が第1閾値を超え、かつ第1閾値より大きい第2閾値以下である場合は「ON1」を示す情報であり、推論処理時間が第2閾値を超える場合は「ON2」を示す情報であってもよい。第1閾値は、例えば10msecであり、第2閾値は、例えば、15msecであるがこれに限定されない。遅延フラグ情報は、複数の後続のタスクの処理時間に関する情報の一例である。複数の後続のタスクの処理時間は、例えば、特化NN群124の処理時間であってもよいし、特化NN群124及びタスク実行部140の合計の処理時間であってもよい。この場合は、特化NN群124及びタスク実行部140がタスク処理部の一例となる。
 本実施の形態では、遅延フラグ情報は、「OFF」、「ON1」及び「ON2」の3つレベルが設定されている例について説明する。なお、遅延フラグ情報は、2つ又は4つ以上のレベルが設定されていてもよい。
 なお、遅延フラグ情報は、「OFF」、「ON1」及び「ON2」などの遅延のレベルを示す情報であることに限定されず、例えば、処理時間(演算時間)そのものであってもよい。
 なお、遅延フラグ分類部123は、遅延フラグ情報を早く出力することが望まれる。よって、遅延フラグ分類部123は、特徴分類部122及び特化NN群124より計算量が小さいNNであるとよい。
 上記のように構成された共通NN121は、カメラ200から入力画像が入力されると、特徴量及び遅延フラグ情報を出力する論理モデルの一例である。また、特徴分類部122は、第1推論モデルの一例であり、遅延フラグ分類部123は、第2推論モデルの一例である。つまり、推論モデルは、第1推論モデル及び第2推論モデルを含んで構成される。
 NN推論演算管理部130は、遅延フラグ分類部123からの遅延フラグ情報に基づいて、共通NN121の後続の特化NN群124の複数のタスクを処理するための順伝播演算の手法(例えば、演算順序)を決定し、特化NN群124に通知する。具体的には、NN推論演算管理部130は、特化NN群124の処理を制御するNN推論部120に決定された順伝播演算の手法を通知する。これにより、NN推論部120は、特化NN群124に特徴分類部122からの特徴量を入力して、決定された順伝播演算の手法で複数の後続のNNを処理させることができる。NN推論演算管理部130は、順伝播演算の手法を決定する決定部、及び、後段のタスクを処理させる制御部の一例である。
 本実施の形態では、NN推論演算管理部130は、遅延フラグ情報と、図3に示すテーブル500とに基づいて、共通NN121の後続の順伝播演算の手法を決定する。図3は、本実施の形態に係る遅延フラグ情報と、当該遅延フラグ情報に紐づいた特化NN群124の順伝播演算の手法とを含むテーブル500の構成例を示す図である。図3の並列演算項目は、共通NN121の後続の順伝播演算の手法、例えば特化NN群124の順伝播演算の手法を示す。
 図3に示すように、遅延フラグ情報「OFF」には、並列演算項目「最適並列演算処理」が対応付けられており(図3の第1行501を参照)、遅延フラグ情報「ON1」には、並列演算項目「遅延対処並列演算処理」が対応付けられており(図3の第2行502を参照)、遅延フラグ情報「ON2」には、並列演算項目「遅延対処並列演算処理+CPUクロックアップ処理」が対応付けられている(図3の第3行503を参照)。なお、ここでの「ON」は、NN推論部120の演算時間が許容時間を超えており、「最適並列演算処理」が示す演算順序から演算順序を変更する必要があることを意味する。なお、順伝順序は、タスクスケジュールの一例である。
 「最適並列演算処理」は、メモリアクセス数、処理時間(演算時間)、消費電力などに基づいて決定された並列演算方式(例えば、並列演算順序)に従って、演算処理を行うことを示す。例えば、遅延が所定未満(例えば、遅延が閾値未満)である場合、「最適並列演算処理」を用いて順伝播演算の順序(第1のスケジュールの一例)が決定される。なお、「最適並列演算処理」は、第1ルールの一例である。遅延が所定未満とは、遅延がないこと、又は、遅延長若しくは遅延度が所定未満であることを含む。
 「遅延対処並列演算処理」は、「最適並列演算処理」に比べて処理時間が短くなるように決定された並列演算方式に従って、演算処理を行うことを示す。例えば、遅延が所定以上(例えば、遅延が閾値以上)である場合、「遅延対処並列演算処理」を用いて順伝播演算の順序(第2のスケジュールの一例)が決定される。当該並列演算方式は、例えば、入力画像に検出候補領域の数に応じて処理時間が変化する処理(例えば、NMS(Non-Maximum Supression)処理)を優先的に開始するように演算順序を組み替えた方式であるが、これに限定されない。なお、「遅延対処並列演算処理」は、複数の後続のタスクの処理時間が第1のルールより短くなる第2ルールの一例である。また、遅延が所定以上とは、遅延があること、又は、遅延長若しくは遅延度が所定以上であることを含む。
 なお、NMSは、ある検出領域候補と、それよりも得点の高い検出領域候補との重なり度合(IoU値)が、訓練処理によって設定された閾値を超えるなら、その検出領域候補を削除するアルゴリズムである。
 「遅延対処並列演算処理+CPUクロックアップ処理」は、「遅延対処並列演算処理」に加えて、CPU(例えば、後述する図4に示すCPU602)の駆動周波数の設定を上げることを示す。このように、遅延フラグ情報には、並列演算の演算順序の変更以外に、CPUの駆動周波数の設定に関することが含まれていてもよい。つまり、遅延対策を行うことは、並列演算の変更に限定されるものではなく、並列演算の変更とともに、又は並列演算の変更に代えて、機器100が備える各処理部の設定(例えば、駆動周波数の設定)を変更することを含んでいてもよい。
 なお、「最適並列演算処理」が示す演算順序、及び、「遅延対処並列演算処理」が示す演算順序は、予め設定されており、メモリ605などに記憶されている。
 このように、遅延フラグ情報は、遅延フラグ「ON1」及び「ON2」のように、複数の種類が存在してもよい。例えば、遅延フラグ情報は、後述する遅延フラグ情報測定部302による処理時間の測定結果に応じて、複数の種類が存在してもよい。
 特化NN群124は、特徴分類部122からの特徴量に基づいて、複数のNNのそれぞれが、互いに異なる出力を行う複数のNNを含む。本実施の形態では、特化NN群124は、第1タスク用NN125と、第2タスク用NN126とを含む。以下では、第1タスク用NN125が物体検出用NNであり、第2タスク用NN126が骨格検出用NNである例について説明するが、これに限定されない。また、第1タスク用NN125は、NMS処理を含み、第2タスク用NN126は、NMS処理を含まない例について説明するが、これに限定されない。なお、特化NN群124(特化NN群124を用いて処理を行うNN推論部120)は、タスク処理部の一例である。タスク処理部が特化NN群124を含んで構成される場合、推論モデル及びタスク処理部のそれぞれは、NNモデルである。
 第1タスク用NN125は、特徴分類部122からの特徴量を入力とし、当該特徴量に応じた物体検出の推論結果を出力するように訓練された訓練済みNNである。第1タスク用NN125の出力である推論結果は、第1タスク用NN125に対応するタスク実行部140に出力される。
 第2タスク用NN126は、特徴分類部122からの特徴量を入力とし、当該特徴量に応じた骨格検出の推論結果を出力するように訓練された訓練済みNNである。第2タスク用NN126の出力である推論結果は、第2タスク用NN126に対応するタスク実行部140に出力される。
 なお、物体検出及び骨格検出は、複数の後続のタスクの一例である。
 遅延フラグ分類部123が「ON1」又は「ON2」を含む遅延フラグ情報を出力した場合、第1タスク用NN125及び第2タスク用NN126の演算順序が遅延フラグ情報「OFF」のときから変更される。本実施の形態では、少なくともNMS処理を含む第1タスク用NN125における演算順序が遅延フラグ情報「OFF」のときから変更される。
 NN推論演算管理部130は、例えば、遅延フラグ情報とテーブル500とに基づいて決定された並列演算項目(並列演算方式)に従って、特化NN群124の順伝播演算を行うようにNN推論部120に指示する。これにより、NN推論演算管理部130は、入力画像に対する推論処理の時間に関する推論結果(遅延フラグ情報)に応じて演算順序を変更することができるので、処理時間が長くなることを抑制することができる。
 取得部150は、カメラ200から入力画像を取得する。取得部150は、取得した入力画像をNN推論部120に出力する。
 続いて、タスク実行部140は、NN推論部120の推論結果に基づいて、予め設定されたタスクを実行する。タスク実行部140は、例えば、推論結果を表示する表示部であってもよいし、推論結果に応じた発光を行う発光部であってもよいし、推論結果を外部の機器に送信する送信部であってもよい。
 図4は、本実施の形態に係る機器100のSoC(System-on-a-Chip)601の構成を示す模式図である。本実施の形態では、NPUが搭載されている。
 図4に示すように、SoC601は、CPU602と、第1NPU603と、第2NPU604と、メモリ605とを含んで構成される。NN推論部120の各機能は、訓練済みのNN(NNデータ400)をSoC601に実装することで実現される。
 CPU602は、機器100における各処理を実行する処理部である。CPU602は、NMS処理、タスク実行部140の処理などを実行する。
 第1NPU603及び第2NPU604は、NN処理を行う専用回路である。第1NPU603及び第2NPU604は、機器100におけるNN処理を実行する。第1NPU603及び第2NPU604は、例えば、共通NN121を用いた処理と、特化NN群124を用いた処理とを実行する。本実施の形態では、第1NPU603及び第2NPU604は、骨格検出処理、物体検出処理及び遅延ラベル決定処理を実行する。
 メモリ605は、CPU602、第1NPU603及び第2NPU604のそれぞれが実行するプログラムを記憶する。メモリ605は、NNデータ400を記憶する。
 上記のように、推論処理部110は、入力画像を取得し、入力画像が共通NN121に入力されると特徴量及び遅延ラベル情報を出力し、遅延ラベル情報に基づいて、特化NN群124を処理するための順伝播演算の手法(最適並列演算処理、遅延対象並列演算処理など)を決定し、特化NN群124に特徴量を入力して、決定した順伝播演算の手法で特化NN群124を処理させるように構成される。例えば、推論処理部110は、入力画像を取得する取得部150と、入力画像を共通NN121に入力して特徴量及び遅延ラベル情報を出力する共通NN121と、遅延ラベル情報に基づいて、特化NN群124を処理するための順伝播演算の手法(最適並列演算処理、遅延対象並列演算処理など)を決定するNN推論演算管理部130(決定部の一例)と、特化NN群124に特徴量を入力して、決定した順伝播演処理させるNN推論演算管理部130(制御部の一例)とを備える。
 次に、訓練装置300について説明する。訓練装置300は、機器100のNN推論部120の推論処理に用いられるNNデータ400を生成する。訓練装置300は、マルチタスク訓練部301と、遅延フラグ情報測定部302と、遅延フラグ正解ラベル生成部303と、遅延フラグ訓練部304と、訓練用ラベルデータベース305(訓練用ラベルDB305)と、シーン画像データベース306(シーン画像DB306)とを有する。
 マルチタスク訓練部301は、NNデータ400のうち特徴分類部122及び特化NN群124の訓練を行う。本実施の形態では、マルチタスク訓練部301は、物体検出及び骨格検出のための訓練を行う。
 マルチタスク訓練部301は、マルチタスク学習(Multi-Task Learning)をNNの訓練に適用した訓練処理を実施する。詳細は後述するが、マルチタスク訓練部301は、シーン画像DB306から取得したシーン画像を入力とし、訓練用ラベルDB305から取得した、当該シーン画像に対応する骨格検出における正解ラベル及び当該シーン画像に対応する物体検出における正解ラベルをリファレンスデータ(教師データ)とし、誤差逆伝播法(BP:BackPropagation)などに基づき、NN(共通NN121及び特化NN群124)を生成する。
 なお、マルチタスク学習とは、単一のモデルで複数の課題を解く機械学習の手法である。関連する複数の課題を同時に訓練させることで、課題間の「共通の要因」を獲得し、課題の予測精度向上を目指す手法である。画像認識分野では、物体分類、物体検出、物体領域(セグメンテーション)の認識といった複数のタスクを同時に訓練させることがある。本実施の形態では、複数のタスクは、骨格検出及び物体検出である。
 マルチタスク学習をNNデータの訓練処理に適用した研究は行われており、マルチタスク訓練部301は、例えば、各タスクに共通に使用されるNN(例えば、共通NN121)と各タスクに特化したNN(例えば、特化NN群124)とを訓練する。また、共通に使用されるNNを使用することによって、各タスク処理に必要な推論処理の全体計算量及びメモリ使用量を圧縮することができるというメリットもある。
 遅延フラグ情報測定部302及び遅延フラグ正解ラベル生成部303は、遅延フラグ訓練部304により遅延フラグ分類部123の訓練を行うときの訓練用データを生成するための処理を行う。
 遅延フラグ情報測定部302は、マルチタスク訓練部301により生成された共通NN121及び特化NN群124の順伝播演算の処理時間を測定する。本実施の形態では、遅延フラグ情報測定部302は、少なくとも第1タスク用NN125の処理時間を測定する。第1タスク用NN125は、NMS処理を含み、入力画像における検出候補領域の数によって処理時間が異なるためである。また、第2タスク用NN126は、NMS処理などの検出候補領域の数によって処理時間が異なる処理を含んでいない、つまり入力画像に応じて処理時間が大きく変化しないので、本実施の形態では処理時間の測定が行われない。
 遅延フラグ正解ラベル生成部303は、処理時間の測定結果に基づく情報を用いて、遅延フラグ訓練部304での共通NN121の訓練に用いられる遅延フラグ正解ラベルを生成する。
 遅延フラグ訓練部304は、マルチタスク訓練部301で生成された共通NN121及び特化NN群124のうち共通NN121を、遅延フラグ正解ラベル生成部303が生成した遅延フラグ正解ラベルを用いて訓練する処理を行う。遅延フラグ訓練部304は、例えば、シーン画像を入力データとし、遅延フラグ正解ラベルをリファレンスデータ(教師データ)として、誤差逆伝播法に基づき、共通NN121の遅延フラグ分類部123における重みデータとバイアスデータとを更新する。つまり、遅延フラグ訓練部304は、シーン画像と遅延フラグ正解ラベルとを用いて、共通NN121の遅延フラグ分類部123の訓練を行う。なお、遅延フラグ訓練部304は、例えば、遅延フラグ正解ラベルを用いて遅延フラグ分類部123とともに特徴分類部122を訓練させてもよい。
 訓練用ラベルDB305は、NNデータ400を生成するための訓練用のラベルを記憶する。訓練用ラベルDB305は、例えば、1枚のシーン画像に対して、骨格検出を行うときの訓練用ラベルと、物体検出を行うときの訓練用ラベルとを記憶する。
 シーン画像DB306は、NNデータ400を生成するためのシーン画像を記憶する。
 訓練用ラベルDB305及びシーン画像DB306は、例えば、半導体メモリなどにより実現されるが、これに限定されない。
 上記のように、訓練装置300は、シーン画像を取得し、シーン画像を共通NN121に入力して、特徴量を取得し、特化NN群124に特徴量を入力して、特化NN群124を処理させ、シーン画像を共通NN121に入力してから特化NN群124の処理が終了するまでの時間を測定し、シーン画像を入力データとし、特化NN群124の処理時間に関する情報を出力データとし、測定した時間をリファレンスデータとして用いた機械学習により共通NN121を訓練するように構成される。例えば、訓練装置300は、シーン画像を取得し、シーン画像を共通NN121に入力して、特徴量を取得し、特化NN群124に当該特徴量を入力して、特化NN群124を処理させ、シーン画像を共通NN121に入力してから特化NN群124の処理が終了するまでの時間を測定する遅延フラグ情報測定部302と、シーン画像を入力データとし、特化NN群124の処理時間に関する情報を出力データとし、測定した時間をリファレンスデータとして用いた機械学習により共通NN121を訓練する遅延フラグ訓練部304とを備える。
 [2.情報処理システムの動作]
 続いて、上記の情報処理システム10の動作について、図5~図13を参照しながら説明する。
 [2-1.機器の動作]
 まずは、機器100における処理について、図5~図6Cを参照しながら説明する。図5は、本実施の形態に係る機器100の動作を示すフローチャートである。なお、便宜上、図5では、テーブル500に含まれる遅延フラグ情報は、「ON(ON1)」及び「OFF」の2種類である例について説明する。言い換えると、遅延フラグ分類部123は、「ON」及び「OFF」のいずれかを出力するように訓練されているとする。
 図5に示すように、機器100の取得部150は、カメラ200から入力画像を取得する(S101)。取得部150は、ステップS101で取得した入力画像をNN推論部120に出力する。
 次に、NN推論部120は、取得部150から入力画像が入力されると、まず共通NN121を使用して、順伝播演算処理を実行する(S102)。具体的には、NN推論部120は、共通NN121の特徴分類部122に入力画像を入力することで、特徴分類部122の出力である特徴量を取得する。そして、NN推論部120は、取得した特徴量を遅延フラグ分類部123に入力することで、遅延フラグ分類部123の出力である遅延フラグ情報を取得する。遅延フラグ情報は、遅延フラグ分類部123が特徴量から推論した結果であり、本実施の形態では、NN推論部120全体の推論処理時間が閾値を超えたか否かを推論した結果を示す。
 NN推論部120は、取得した遅延フラグ情報をNN推論演算管理部130に出力する。なお、NN推論部120は、さらに、機器100が備える機能部であって、推論処理部110の外部の機能部に遅延フラグ情報を出力してもよい。機能部は、例えば、グラフィック機能を担っている機能部などであってもよい。
 次に、NN推論演算管理部130は、遅延フラグ情報を取得する(S103)。NN推論演算管理部130は、取得した遅延フラグ情報が「ON」であるか否かを判定する(S104)。NN推論演算管理部130は、遅延フラグ情報が「OFF」である場合、つまり「最適並列演算処理」に従って推論処理を行っても機器100の要求される処理時間内にサービスを完了することができること示す推論結果である場合(S104でNo)、図3に示すテーブル500に基づいて、特化NN群124の順伝播演算手法を「最適並列演算処理」に決定する(S105)。つまり、NN推論演算管理部130は、遅延フラグ情報が「OFF」である場合、「最適並列演算処理」に基づく順序で特化NN群124の処理を実行することを決定する。「最適並列演算処理」に基づく順序は、第1のスケジュールの一例である。NN推論演算管理部130は、決定した特化NN群124の順伝播演算手法をNN推論部120に出力する。
 NN推論部120は、NN推論演算管理部130から特化NN群124の順伝播演算手法が「最適並列演算処理」であることを取得すると、「最適並列演算処理」が示す順序で並列順伝播演算処理を実行する。例えば、NN推論部120は、特化NN群124を最も効率的な順序で並列順伝播演算する(S106)。NN推論部120は、特化NN群124のそれぞれのNNに、特徴分類部122の出力である特徴量を入力し、「最適並列演算処理」に基づくスケジュールで推論処理を行い、それぞれのNNの出力である推論結果(骨格検出結果、物体検出結果など)を取得する。
 図6Aは、本実施の形態に係る共通NN121及び特化NN群124の処理時間、及び、演算担当ユニットの一例を示す模式図である。具体的には、図6Aに示す第1情報700aは、「最適並列演算処理」に基づく演算順序で処理を行っても許容時間内に処理が終了する場合の処理時間、及び、演算担当ユニットの一例を示す。なお、図6A~図6Cでは、NMS処理をCPU602にアウトソーシングしている例について説明する。
 領域701は、共通NN121における各ユニット(CPU602、第1NPU603及び第2NPU604)の専有率を示す。領域701では、第1NPU603(図6A~6C中のNPU1)及び第2NPU604(図6A~6C中のNPU2)により共通NN121を用いて処理が行われる。領域702は、第1タスク用NN125における各ユニットの専有率を示す。領域702では、第1NPU603及び第2NPU604の少なくとも一方により第1タスク用NN125を用いて物体検出処理が行われる。
 領域703は、第2タスク用NN126における第2タスク用NN126における各ユニットの専有率を示す。領域703では、第1NPU603及び第2NPU604の少なくとも一方により第2タスク用NN126を用いて骨格検出処理が行われる。領域704a及び704bは、第1タスク用NN125のNMS処理における各ユニットの専有率を示す。領域704a及び704bでは、CPU602によりNMS処理が行われる。
 図6Aに示すように、NN推論演算管理部130は、ステップS104でNoである場合、特化NN群124の順伝播演算を、メモリアクセス数及び演算時間などのバランスがとれた並列演算方式で演算処理を行うことを示す「最適並列演算処理」で行うことをNN推論部120に指示する。この場合、「最適並列演算処理」に基づく演算順序で処理を行っても、許容時間以内に処理を終えることができる。
 図5を再び参照して、NN推論演算管理部130は、遅延フラグ情報が「ON」である場合、つまり「最適並列演算処理」に従って推論処理を行うと機器100の要求される処理時間内にサービスを完了することができないことを示す推論結果である場合(S104でYes)、図3に示すテーブル500に基づいて、特化NN群124の順伝播演算手法を「遅延対策並列演算処理」に決定する(S107)。つまり、NN推論演算管理部130は、遅延フラグ情報が「ON」である場合、「遅延対策並列演算処理」に基づく順序で特化NN群124の処理を実行することを決定する。「遅延対策並列演算処理」に基づく順序は、第2のスケジュールの一例である。NN推論演算管理部130は、決定した特化NN群124の順伝播演算手法をNN推論部120に出力する。
 NN推論部120は、NN推論演算管理部130から特化NN群124の順伝播演算手法が「遅延対策並列演算処理」であることを取得すると、「遅延対策並列演算処理」が示す順序で並列順伝播演算処理を実行する。例えば、NN推論部120は、特化NN群124を設定された順序で並列順伝播演算する(S108)。NN推論部120は、特化NN群124のそれぞれのNNに、特徴分類部122の出力である特徴量を入力し、「遅延対策並列演算処理」に基づくスケジュールで推論処理を行い、それぞれのNNの出力である推論結果(骨格検出結果、物体検出結果など)を取得する。
 図6Bは、本実施の形態に係る共通NN121及び特化NN群124の処理時間及び演算担当ユニットの一例を示す模式図である。具体的には、図6Bに示す第2情報700bは、「最適並列演算処理」に基づく演算順序で処理を行ったときに許容時間内に処理が終了しない場合の処理時間、及び、演算担当ユニットの一例を示す。図6Bは、最適並列演算処理を行ったときに許容時間を超えてしまう、つまりステップS104でYesと判定される場合を示している。
 図6Bに示すように、例えば、NMS処理に要する時間(領域704b)が図6Aのときの時間(領域704a)より長くなることにより、推論処理部110の推論時間が許容時間を超えている。入力画像によっては、図6Bに示すようにNMS処理に要する時間が長くなることが起こり得る。
 そこで、図5のステップS107で示すように、NN推論演算管理部130は、「最適並列演算処理」に従って推論処理を行うと許容時間を超える可能性があるので、「最適並列演算処理」に変えて「遅延対策並列演算処理」に従って推論処理を行うことを決定する。本実施の形態では、「遅延対策並列演算処理」は、NMS処理(領域704bで行われる処理)を優先的に開始できるように演算順序を組み替えることを示す。なお、以下において、許容時間を超えることを、遅延が発生するとも記載する。
 図6Cは、本実施の形態に係る共通NN121及び特化NN群124の演算順序組み換え後の処理時間及び演算担当ユニットの一例を示す模式図である。図6Cに示す第3情報700cは、「最適並列演算処理」に基づく演算順序では許容時間内に処理が終了しない場合に、「遅延対策並列演算処理」に基づく演算順序で処理を行ったときの処理時間、及び、演算担当ユニットの一例を示す。第3情報700cは、図6Bに示す第2情報700bから処理順序を変更したものである。図6Cは、ステップS104でYesと判定されて、変更された後の処理順序等を示している。
 図6Cに示すように、「遅延対策並列演算処理」による演算順序は、NMS処理を優先的に開始する。当該演算順序は、NMS処理を開始するタイミングを早めるように、「最適並列演算処理」による演算順序から、NMS処理を開始するタイミングが早められている。これにより、NMS処理に要する時間が長くなる場合でも、推論処理部110の推論時間が許容時間を超えることを抑制することができる。当該演算順序(処理の順序)は、タスクスケジュールの一例である。また、タスクスケジュールは、特化NN群124のNNモデルのメモリロードの順序を含んでいてもよい。
 なお、図6B及び図6Cに示すように、「最適並列演算処理」及び「遅延対策並列演算処理」では、NMS処理の処理タイミングは変更されるが、処理内容の変更、及び、処理の削除などは行われない。そのため、「最適並列演算処理」及び「遅延対策並列演算処理」で推論処理を行った場合の推論結果の精度は、実質的に同じである。
 なお、本実施の形態では、図6B及び図6Cに示すように、入力画像によって処理時間が大きく変動するレイヤがNMS処理を行うレイヤである例を示しているが、入力画像によって処理時間が大きく変動する他のアルゴリズムを使用するレイヤであってもよい。
 NN推論部120は、ステップS106又はS108の演算により出力された推論結果をタスク実行部140に出力する。
 図5を再び参照して、タスク実行部140は、NN推論部120から取得した推論結果に基づいて動作し、ユーザにサービスが提供される。つまり、タスク実行部140による各種タスク処理が実行される(S109)。
 以上のように、機器100は、許容時間内に推論サービスを提供するため、早期に推論処理の負荷を判定し、演算順序を変更可能な推論処理部110を有することにより、一定のサービス能力を担保しながら稼働することができる。また、推論処理部110は、遅延フラグ情報が「OFF」の場合、最適な並列演算で推論サービスを提供することができ、かつ、省電力にも貢献できる。
 また、推論処理部110は、入力画像の特徴量から、初期段階(前処理)で後続の複数のNNにおけるNN推論処理に必要な処理時間を推定する。そして、推論処理部110は、並列演算において、要求される処理時間内で処理を完了できる演算順序でNN推論処理を行うことができる。
 なお、上記では、遅延フラグ情報が「ON」である場合、図6Cに示す順序で演算処理が実行される例について説明したが、これに限定されず、遅延フラグ情報に応じて、演算処理の順序が変更されてもよい。例えば、遅延フラグ情報に遅延の度合いを示す情報(例えば、遅延度:「大」、「中」、「小」、又は、遅延時間の推定値など)が含まれる場合、遅延の度合いごとに、並列演算項目が設定されていてもよい。つまり、遅延の度合いごとに、演算処理の順序が設定されてもよい。そして、NN推論演算管理部130は、ステップS107において、遅延フラグ情報に含まれる遅延の度合いに応じた並列演算項目を、特化NN群124の順伝播演算の手法に決定してもよい。
 [2-2.訓練装置の動作]
 続いて、訓練装置300の動作について、図7~図13を参照しながら説明する。まずは、マルチタスク訓練部301の動作について、図7及び図8を参照しながら説明する。図7は、本実施の形態に係るマルチタスク訓練部301の動作を示すフローチャートである。図8は、本実施の形態に係るマルチタスク訓練部301の動作を模式的に示す図である。
 図7に示すように、マルチタスク訓練部301は、シーン画像DB306からシーン画像を取得し、訓練用ラベルDB305から各NNの正解ラベルを取得する(S201)。マルチタスク訓練部301は、シーン画像と、当該シーン画像に対する第1タスク用NN125用の正解ラベル(第1タスク用NN正解ラベル)、及び、当該シーン画像に対する第2タスク用NN126用の正解ラベル(第2タスク用NN正解ラベル)を取得する。本実施の形態では、マルチタスク訓練部301は、物体検出用NNの正解ラベル及び骨格検出用NNの正解ラベルを取得する。
 次に、マルチタスク訓練部301は、共通NN121及び特化NN群124を使用して順伝播演算を行う。例えば、マルチタスク訓練部301は、共通NN121の特徴分類部122及び特化NN群124を使用して順伝播演算を行う(S202)。
 図8に示すように、マルチタスク訓練部301は、シーン画像を共通NN121に入力して得られる共通NN121の出力である特徴量を取得し、さらに取得した特徴量を第1タスク用NN125に入力して得られる第1タスク用NN125の出力である第1推論結果、及び、当該特徴量を第2タスク用NN126に入力して得られる第2タスク用NN126の出力である第2推論結果を取得する。
 図7を再び参照して、次に、マルチタスク訓練部301は、各NNの正解ラベルをリファレンスデータ(教師データ)として、特徴分類部122及び特化NN群124を逆伝播演算し、重み及びバイアスを更新する(S203)。マルチタスク訓練部301は、誤差逆伝播法に基づき、損失関数(loss function)の出力値を誤差と見立てて、逆伝播演算によって、共通NN121の特徴分類部122及び特化NN群124における重み(重みデータ)及びバイアス(バイアスデータ)の更新処理を実行する。
 図8に示すように、第1タスク用NN125における損失関数は、第1タスク用NN125の第1推論結果が第1タスク用NN正解ラベルとどれだけ誤差があるかを表す。第2タスク用NN126における損失関数は、第2タスク用NN126の第2推論結果が第2タスク用NN正解ラベルとどれだけ誤差があるかを表す。
 マルチタスク訓練部301は、シーン画像に基づいて第1タスク用NN125の出力である第1推論結果を取得し、第1推論結果と第1タスク用NN正解ラベルとに基づいて損失関数の出力値を取得する。そして、マルチタスク訓練部301は、当該出力値を誤差と見立てて、逆伝播演算によって、共通NN121の特徴分類部122及び特化NN群124の第1タスクNN125における重み及びバイアスの更新処理を実行する。
 次に、マルチタスク訓練部301は、シーン画像に基づいて第2タスク用NN126の出力である第2推論結果を取得し、第2推論結果と第2タスク用NN正解ラベルとに基づいて損失関数の出力値を取得する。そして、マルチタスク訓練部301は、当該出力値を誤差と見立てて、逆伝播演算によって、共通NN121の特徴分類部122及び特化NN群124の第2タスクNN126における重み及びバイアスの更新処理を実行する。このように、マルチタスク訓練部301は、例えば、更新処理を交互に実行する。
 図7を再び参照して、マルチタスク訓練部301は、NN推論結果の正解率(又は、シーン画像の正解ラベルと比較した誤差率)が要件を満たすか否かを判定する(S204)。要件は、例えば、機器100に求められる正解率であってもよい。つまり、マルチタスク訓練部301は、NN推論結果の正解率が機器100に求められる正解率以上であるか否かによりステップS204の判定を行ってもよい。
 マルチタスク訓練部301は、NN推論結果の正解率が要件を満たす場合(S204でYes)、処理を終了する。また、マルチタスク訓練部301は、NN推論結果の正解率が要件を満たさない場合(S204でNo)、ステップS201に戻り処理を継続する。つまり、マルチタスク訓練部301は、NN推論結果の正解率が要件を満たさない場合、様々なシーン画像とそれに紐づく正解ラベルとを使用して訓練していき、NN推論結果の正解率が要件を満たすまで訓練処理を継続する。
 続いて、遅延フラグ情報測定部302及び遅延フラグ正解ラベル生成部303の動作について、図9及び図10を参照しながら説明する。図7は、本実施の形態に係る遅延フラグ情報測定部302及び遅延フラグ正解ラベル生成部303の動作を示すフローチャートである。図10は、本実施の形態に係る遅延フラグ情報測定部302及び遅延フラグ正解ラベル生成部303の動作を模式的に示す図である。
 図9に示すように、遅延フラグ情報測定部302は、任意のシーン画像を取得する(S301)。遅延フラグ情報測定部302は、例えば、マルチタスク訓練部301によるマルチタスク学習に使用したシーン画像を取得してもよい。
 次に、遅延フラグ情報測定部302は、マルチタスク訓練部301により訓練された共通NN121及び特化NN群124の順伝播演算の演算時間を測定する(S302)。本実施の形態では、遅延フラグ情報測定部302は、NMS処理を含む第1タスク用NN125の演算時間を測定する。
 遅延フラグ情報測定部302は、ステップS302において、シーン画像を共通NN121に入力して、特徴量果及び遅延フラグ情報を取得し、さらに、第1タスク用NN125に特徴量を入力して、第1タスク用NN125を処理させ、シーン画像を共通NN121に入力してから特化NN群124の処理が終了するまでの時間を測定する。なお、ステップS302では、遅延フラグ情報測定部302は、少なくとも、第1タスク用NN125に特徴量を入力してから特化NN群124の処理が終了するまでの時間を測定すればよい。図10では、遅延フラグ情報測定部302が第1タスク用NN125に特徴量を入力してから特化NN群124の処理が終了するまでの時間(推論時間の一例)を測定する例を図示している。
 なお、処理時間の測定では、機器100と同じハード機器が使用されてもよい。また、処理時間は、シミュレーションによって算出されたものであってもよい。
 図10に示すように、遅延フラグ情報測定部302は、シーン画像を共通NN121に入力して得られる特徴量及び共通NN121の処理の複数の後続のタスクの処理時間に関する情報(遅延フラグ分類部123の出力である遅延フラグ情報)を取得し、当該特徴量が入力されたときの第1タスク用NN125の処理時間を測定する。処理時間を測定することは、遅延フラグ情報を測定することの一例である。
 図9を再び参照して、遅延フラグ情報測定部302は、測定した処理時間が閾値を超えたか否かを判定する(S303)。閾値は、例えば、予め設定されている。遅延フラグ情報測定部302は、処理時間が閾値を超えた場合(S303でYes)、該当シーン画像を遅延フラグONとして、遅延フラグ情報DB302a(図10参照)に記憶する(S304)。また、遅延フラグ情報測定部302は、処理時間が閾値を超えなかった場合(S303でNo)、該当シーン画像を遅延フラグOFFとして、遅延フラグ情報DB302aに記憶する(S305)。
 なお、第1タスク用NN125及び第2タスク用NN126のそれぞれにおいて、処理時間を測定している場合、(i)第1タスク用NN125のみで遅延が発生する(許容時間を超える)こと、(ii)第2タスク用NN126のみで遅延が発生することが起こり得る。この場合、(i)と(ii)とでは、「並列演算項目」の内容(例えば、組み換え後の演算順序)が異なる場合がある。このように、「並列演算項目」の内容が異なる場合、遅延フラグ「ON」は、「並列演算項目」の内容ごとに複数の種類が存在してもよい。
 次に、遅延フラグ正解ラベル生成部303は、遅延フラグ情報DB302aの遅延フラグ情報に基づいて、遅延フラグ正解ラベルを生成する。遅延フラグ正解ラベル生成部303は、シーン画像に遅延フラグ「ON」又は「OFF」をラベル付けして遅延フラグ正解ラベルを生成する(S306)。遅延フラグ正解ラベル生成部303は、遅延フラグ情報をシーン画像と対応付けることで遅延フラグ正解ラベルを生成するとも言える。遅延フラグ正解ラベル生成部303は、生成した遅延フラグ正解ラベルを遅延フラグ正解ラベルDB303a(図10参照)に記憶する。
 続いて、遅延フラグ訓練部304の動作について、図11及び図12を参照しながら説明する。図11は、本実施の形態に係る遅延フラグ訓練部304の動作を示すフローチャートである。図12は、本実施の形態に係る遅延フラグ訓練部304の動作を模式的に示す図である。
 図11に示すように、遅延フラグ訓練部304は、シーン画像DB306からシーン画像を取得し、遅延フラグ正解ラベルDB303aから当該シーン画像に対応する遅延フラグ正解ラベルを取得する(S401)。
 次に、遅延フラグ訓練部304は、共通NN121を使用して順伝播演算を行う(S402)。遅延フラグ訓練部304は、例えば、共通NN121の遅延フラグ分類部123を使用して順伝播演算を行う。
 図12に示すように、遅延フラグ訓練部304は、シーン画像を共通NN121の特徴分類部122に入力して得られる特徴分類部122の出力である特徴量を取得し、さらに取得した特徴量を遅延フラグ分類部123に入力して得られる遅延フラグ分類部123の出力である遅延フラグ情報を取得する。
 図11を再び参照して、次に、遅延フラグ訓練部304は、遅延フラグ正解ラベルをリファレンスデータ(教師データ)として、共通NN121を逆伝播演算し、重み及びバイアスを更新する(S403)。遅延フラグ訓練部304は、誤差逆伝播法に基づき、損失関数の出力値を誤差と見立てて、逆伝播演算によって、共通NN121の遅延フラグ分類部123における重み(重みデータ)及びバイアス(バイアスデータ)の更新処理を実行する。
 図12に示すように、共通NN121における損失関数は、共通NN121の遅延フラグ分類部123の推論結果(遅延フラグ情報)が当該シーン画像に対応する遅延フラグ正解ラベルとどれだけ誤差があるかを表す。
 遅延フラグ訓練部304は、シーン画像に基づいて遅延フラグ分類部123の出力である遅延フラグ情報を取得し、遅延フラグ情報と遅延フラグ正解ラベルとに基づいて損失関数の出力値を取得する。そして、遅延フラグ訓練部304は、当該出力値を誤差と見立てて、逆伝播演算によって、共通NN121の遅延フラグ分類部123における重み及びバイアスの更新処理を実行する。
 このように、ステップS402及び403では、シーン画像を入力データとし、共通NN121の遅延フラグ分類部123から出力される遅延フラグ情報を出力データとし、遅延フラグ情報測定部302で測定された時間をリファレンスデータとして用いて共通NN121(例えば遅延フラグ分類部123)を機械学習で訓練する。
 なお、遅延フラグ訓練部304は、当該出力値を誤差と見立てて、逆伝播演算によって、特徴分類部122及び遅延フラグ分類部123における重み及びバイアスの更新処理を実行してもよい。つまり、遅延フラグ訓練部304は、遅延フラグ分類部123に加えて特徴分類部122を訓練処理の対象としてもよい。これにより、遅延フラグ分類部123とともに特徴分類部122における重み及びバイアスが更新されることで、遅延フラグ分類部123が出力する遅延フラグ情報の精度が向上することが期待できる。
 図11を再び参照して、遅延フラグ訓練部304は、NN推論結果の正解率(又は推論結果と遅延フラグ正解ラベルと比較した誤差率)が要件を満たすか否かを判定する(S404)。要件は、例えば、機器100に求められる正解率であってもよい。つまり、遅延フラグ訓練部304は、NN推論結果の正解率が機器100に求められる正解率以上であるか否かによりステップS404の判定を行ってもよい。
 遅延フラグ訓練部304は、NN推論結果の正解率が要件を満たす場合(S404でYes)、処理を終了する。また、遅延フラグ訓練部304は、NN推論結果の正解率が要件を満たさない場合(S404でNo)、ステップS401に戻り処理を継続する。つまり、遅延フラグ訓練部304は、NN推論結果の正解率が要件を満たさない場合、様々なシーン画像とそれに紐づく正解ラベルとを使用して訓練していき、NN推論結果の正解率が要件を満たすまで訓練処理を継続する。
 遅延フラグ訓練部304による訓練処理完了後に、上記で説明した機器100の動作を実行可能なNNデータ400となる。生成されたNNデータ400は、機器100に送信される。
 なお、本実施の形態に係る訓練装置300は、逐次的に訓練処理を行っているが、共通NN121の特徴分類部122及び特化NN群124と、共通NN121の遅延フラグ分類部123とに対してマルチタスク学習を実施し、その際に特化NN群124の順伝播演算の測定も実施し、遅延フラグ情報を取得してもよい。また、訓練装置300は、逆伝播演算時において、遅延フラグ情報(遅延フラグ正解ラベル)を正解とした誤差情報を用いて共通NN121の遅延フラグ分類部123の重み及びバイアスを更新し、マルチタスク学習の誤差情報を用いて共通NN121の特徴分類部122及び特化NN群124の重み及びバイアスを更新してもよい。このように、訓練装置300は、共通NN121の特徴分類部122及び特化NN群124と、共通NN121の遅延フラグ分類部123とに対してマルチタスク学習を実施可能な構成であってもよい。
 ここで、本実施の形態に係る訓練装置300の訓練結果の評価の出力について、図13を参照しながら説明する。図13は、本実施の形態に係る遅延フラグ情報の発生率を示すテーブルである。
 本実施の形態に係る訓練装置300の訓練結果の評価の出力例として特化NN群124のmAP(Mean Average Precision)などの推論品質情報以外に図13に示す「遅延フラグ情報の発生率」を出力する構成も考えられる。図13に示す結果から、遅延フラグ情報「OFF」の発生率を大きくするために、NNの構成又はハイパーパラメータなどを変更するといった開発者の動機付けを促すこともできる。また、訓練装置300は、要求仕様を満たさない推論遅延が発生した場合の発生率(図13中の遅延フラグ情報「NG」に対応する発生率)又は該当シーン画像の情報を表示することによって、NNの訓練処理の工程段階で推論遅延が発生しないような対策の検討を開発者などに促すことができる。
 (その他の実施の形態)
 以上、本開示について実施の形態に基づいて説明したが、本開示は、上記実施の形態に限定されるものではない。
 例えば、上記実施の形態では、遅延フラグ分類部123に特徴分類部122の出力である特徴量が入力データとして入力される例について説明したが、入力データはこれに限定されない。入力データは、例えば、カメラ200からの入力画像であってもよい。例えば、NN推論部120は、カメラ200からの入力画像を遅延フラグ分類部123に入力することで、遅延フラグ分類部123の出力である遅延フラグ情報を取得してもよい。また、この場合、遅延フラグ訓練部304は、図11のステップS402において、シーン画像を共通NN121の遅延フラグ分類部123に入力して得られる遅延フラグ分類部123の出力である遅延フラグを取得する。そして、遅延フラグ訓練部304は、図11のステップS403において、遅延フラグ正解ラベルをリファレンスデータ(教師データ)として、共通NN121の遅延フラグ分類部123を逆伝播演算し、遅延フラグ分類部123の重み及びバイアスを更新する。また、例えば、特徴分類部122及び遅延フラグ分類部123には、同じ入力データ(入力画像)が入力されてもよい。
 また、遅延フラグ分類部123の入力データは、例えば、特徴分類部122の推論の中間データであってもよい。例えば、NN推論部120は、特徴分類部122に推論の中間データを出力させ、当該中間データを遅延フラグ分類部123に入力することで、遅延フラグ分類部123の出力である遅延フラグ情報を取得してもよい。
 また、上記実施の形態では、後続のタスクの処理がNNを用いた処理であり、NN推論演算管理部130は、NNを用いた処理の演算順序を決定する例について説明したが、これに限定されない。後続のタスクの処理がNNを用いない処理であり、NN推論演算管理部130は、NNを用いない処理の演算順序を決定してもよい。
 また、上記実施の形態では、機器100のSoC601には、NPUが搭載されている例について説明したが、NPUは搭載されていなくてもよい。SoC601には、CPU602及びNPUのうちCPU602のみが搭載されており、例えば、上記で説明した各処理は、CPU602により実行されてもよい。
 また、上記実施の形態では、NN推論処理部110は、IoT機器の製品分野で用いられる例について説明したが、製品分野はこれに限定されない。NN推論処理部110は、自動運転車、ロボット、ドローンなどの無人飛行体などのIoT機器とは異なる製品分野においても適用可能である。
 また、上記実施の形態において説明された複数の処理の順序は一例である。複数の処理の順序は、変更されてもよいし、複数の処理は、並行して実行されてもよい。また、複数の処理の一部は、実行されなくてもよい。
 また、実施の形態で説明した各構成要素は、ソフトウェアとして実現されても良いし、典型的には、集積回路であるLSIとして実現されてもよい。これらは、個別に1チップ化されてもよいし、一部または全てを含むように1チップ化されてもよい。ここでは、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称されることもある。また、集積回路化の手法はLSIに限るものではなく、専用回路または汎用プロセッサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサを利用してもよい。更には、半導体技術の進歩または派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて構成要素の集積化を行ってもよい。
 また、ブロック図における機能ブロックの分割は一例であり、複数の機能ブロックを1つの機能ブロックとして実現したり、1つの機能ブロックを複数に分割したり、一部の機能を他の機能ブロックに移してもよい。また、類似する機能を有する複数の機能ブロックの機能を単一のハードウェア又はソフトウェアが並列又は時分割に処理してもよい。
 また、情報処理システムが備える訓練装置は、単一の装置として実現されてもよいし、複数の装置によって実現されてもよい。例えば、訓練装置の各処理部は、2以上のサーバ装置で実現されてもよい。情報処理システムが複数のサーバ装置によって実現される場合、情報処理システムが備える構成要素は、複数のサーバ装置にどのように振り分けられてもよい。また、複数のサーバ装置間の通信方法は、特に限定されない。
 さらに、本開示の技術は上記の情報処理方法における特徴的な処理をコンピュータに実行させるためのプログラムであってもよいし、上記プログラムが記録された非一時的なコンピュータ読み取り可能な記録媒体であってもよい。また、上記プログラムは、インターネット等の伝送媒体を介して流通させることができるのは言うまでもない。例えば、上記プログラム及び上記プログラムからなるデジタル信号は、電気通信回線、無線又は有線通信回線、インターネットを代表とするネットワーク、データ放送等を経由して伝送するものであってもよい。また、上記プログラム及び上記プログラムからなるデジタル信号は、記録媒体に記録して移送されることにより、又はネットワーク等を経由して移送されることにより、独立した他のコンピュータシステムにより実行されてもよい。
 また、各実施の形態において、各構成要素は、専用のハードウェアで構成されるか、各構成要素に適したソフトウェアプログラムを実行することによって実現されてもよい。各構成要素は、CPUまたはプロセッサなどのプログラム実行部が、ハードディスクまたは半導体メモリなどの記録媒体に記録されたソフトウェアプログラムを読み出して実行することによって実現されてもよい。
 本開示は、複数のNNの推論処理を使用する情報処理装置等に適用可能である。
 10  情報処理システム
 100  機器
 110  推論処理部
 120  NN推論部
 121  共通NN(推論処理部)
 122  特徴分類部
 123  遅延フラグ分類部
 124  特化NN群
 125  第1タスク用NN
 126  第2タスク用NN
 130  NN推論演算管理部(決定部、制御部)
 140  タスク実行部
 150  取得部
 200  カメラ
 300  訓練装置
 301  マルチタスク訓練部
 302  遅延フラグ情報測定部
 302a  遅延フラグ情報DB
 303  遅延フラグ正解ラベル生成部
 303a  遅延フラグ正解ラベルDB
 304  遅延フラグ訓練部
 305  訓練用ラベルDB
 306  シーン画像DB
 400  NNデータ
 500  テーブル
 501  第1行
 502  第2行
 503  第3行
 601  SoC
 602  CPU
 603  第1NPU
 604  第2NPU
 605  メモリ
 700a  第1情報
 700b  第2情報
 700c  第3情報
 701、702、703、704a、704b  領域

Claims (10)

  1.  センシングデータを取得する取得部と、
     前記センシングデータを推論モデルに入力して、推論結果及び推論モデルの処理の複数の後続のタスクの処理時間に関する情報を取得する推論処理部と、
     前記複数の後続のタスクの処理時間に関する情報に基づいて、前記複数の後続のタスクを処理するタスク処理部の前記複数の後続のタスクを処理するためのタスクスケジュールを決定する決定部と、
     前記タスク処理部に推論結果を入力して、決定した前記タスクスケジュールで前記複数の後続のタスクを処理させる制御部と、を備える
     情報処理装置。
  2.  前記推論モデルは、第1推論モデルと、第2推論モデルとを含み、
     前記センシングデータを前記第1推論モデルに入力して前記推論結果を取得し、
     取得された前記推論結果又は前記推論の中間データを前記第2推論モデルに入力して前記複数の後続のタスクの処理時間に関する情報を取得する
     請求項1に記載の情報処理装置。
  3.  前記推論モデルは、第1推論モデルと、第2推論モデルとを含み、
     前記センシングデータを前記第1推論モデルに入力して前記推論結果を取得し、
     前記センシングデータを前記第2推論モデルに入力して前記複数の後続のタスクの処理時間に関する情報を取得する
     請求項1に記載の情報処理装置。
  4.  前記複数の後続のタスクの処理時間に関する情報は、前記複数の後続のタスクの処理時間に対して定められる所定時間に対する遅延に関する情報を含む
     請求項1~3のいずれか1項に記載の情報処理装置。
  5.  前記遅延に関する情報に、前記遅延が所定未満であることを示す情報が含まれる場合、第1のスケジュールを決定し、
     前記遅延に関する情報に、前記遅延が所定以上であることを示す情報が含まれる場合、前記第1のスケジュールより前記複数の後続のタスクの処理時間が短い第2のスケジュールを決定する
     請求項4に記載の情報処理装置。
  6.  前記第1のスケジュールの決定には、第1ルールを用い、
     前記第2のスケジュールの決定には、前記第2のスケジュールが前記第1のスケジュールよりも前記複数の後続のタスクの処理時間が短くなる第2ルールを用いる
     請求項5に記載の情報処理装置。
  7.  前記推論モデルは、前記複数の後続のタスクに共通する前処理である推論処理を実行する
     請求項1~6のいずれか1項に記載の情報処理装置。
  8.  前記推論モデル及び前記タスク処理部は、ニューラルネットワークモデルであり、
     前記推論結果は、前記センシングデータの特徴量であり、
     前記タスクスケジュールは、前記タスク処理部のメモリロード及び処理の順序を含む
     請求項1~7のいずれか1項に記載の情報処理装置。
  9.  コンピュータにより実行される方法であって、
     センシングデータを取得し、
     前記センシングデータを推論モデルに入力して、推論結果及び推論モデルの処理の複数の後続のタスクの処理時間に関する情報を取得し、
     前記複数の後続のタスクを処理するタスク処理部に前記推論結果を入力して、前記複数の後続のタスクを処理させ、
     前記推論結果を前記タスク処理部に入力してから前記複数の後続のタスクの処理が終了するまでの時間を含む推論時間を測定し、
     前記センシングデータを入力データとし、前記複数の後続のタスクの処理時間に関する情報を出力データとし、測定した前記推論時間をリファレンスデータとして用いた機械学習により前記推論モデルを訓練する
     情報処理方法。
  10.  請求項9に記載の情報処理方法をコンピュータに実行させるためのプログラム。
PCT/JP2021/019553 2020-07-10 2021-05-24 情報処理装置、情報処理方法及びプログラム WO2022009542A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2022534937A JPWO2022009542A1 (ja) 2020-07-10 2021-05-24
CN202180046869.8A CN115989481A (zh) 2020-07-10 2021-05-24 信息处理装置、信息处理方法以及程序
EP21837781.0A EP4180954A4 (en) 2020-07-10 2021-05-24 INFORMATION PROCESSING DEVICE, INFORMATION PROCESSING METHOD, AND PROGRAM
US18/090,639 US20230133989A1 (en) 2020-07-10 2022-12-29 Information processing apparatus, information processing method, and recording medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020-119205 2020-07-10
JP2020119205 2020-07-10

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/090,639 Continuation US20230133989A1 (en) 2020-07-10 2022-12-29 Information processing apparatus, information processing method, and recording medium

Publications (1)

Publication Number Publication Date
WO2022009542A1 true WO2022009542A1 (ja) 2022-01-13

Family

ID=79552391

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/019553 WO2022009542A1 (ja) 2020-07-10 2021-05-24 情報処理装置、情報処理方法及びプログラム

Country Status (5)

Country Link
US (1) US20230133989A1 (ja)
EP (1) EP4180954A4 (ja)
JP (1) JPWO2022009542A1 (ja)
CN (1) CN115989481A (ja)
WO (1) WO2022009542A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116596990B (zh) * 2023-07-13 2023-09-29 杭州菲数科技有限公司 目标检测方法、装置、设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018005297A (ja) 2016-06-27 2018-01-11 富士通株式会社 ニューラルネットワーク装置及びニューラルネットワーク装置の制御方法
JP2018190045A (ja) * 2017-04-28 2018-11-29 日立オートモティブシステムズ株式会社 車両電子制御装置
JP2020106935A (ja) * 2018-12-26 2020-07-09 オムロン株式会社 画像検査器生成装置、画像検査装置、画像検査器生成プログラム、及び画像検査器生成方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200093093A (ko) * 2019-01-08 2020-08-05 삼성전자주식회사 분산 추론 시스템 및 이의 동작 방법
JP6614373B1 (ja) * 2019-02-13 2019-12-04 富士通クライアントコンピューティング株式会社 推論処理システム、推論処理装置及びプログラム

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018005297A (ja) 2016-06-27 2018-01-11 富士通株式会社 ニューラルネットワーク装置及びニューラルネットワーク装置の制御方法
JP2018190045A (ja) * 2017-04-28 2018-11-29 日立オートモティブシステムズ株式会社 車両電子制御装置
JP2020106935A (ja) * 2018-12-26 2020-07-09 オムロン株式会社 画像検査器生成装置、画像検査装置、画像検査器生成プログラム、及び画像検査器生成方法

Also Published As

Publication number Publication date
EP4180954A1 (en) 2023-05-17
US20230133989A1 (en) 2023-05-04
CN115989481A (zh) 2023-04-18
JPWO2022009542A1 (ja) 2022-01-13
EP4180954A4 (en) 2023-08-23

Similar Documents

Publication Publication Date Title
EP3540652B1 (en) Method, device, chip and system for training neural network model
US20180053085A1 (en) Inference device and inference method
US20190050729A1 (en) Deep learning solutions for safe, legal, and/or efficient autonomous driving
US20210319317A1 (en) Methods and apparatus to perform machine-learning model operations on sparse accelerators
US20160092767A1 (en) Apparatus and method for learning a model corresponding to time-series input data
KR20180063189A (ko) 선택적 역전파
JP2023510566A (ja) ニューラル・ネットワークのための適応的探索方法および装置
CN112711478B (zh) 基于神经网络的任务处理方法、装置、服务器和存储介质
US20210312295A1 (en) Information processing method, information processing device, and information processing program
US11513851B2 (en) Job scheduler, job schedule control method, and storage medium
EP3282407A1 (en) Assembly line balancing apparatus, method and program
CN110659069B (zh) 用于执行神经网络计算的指令调度方法及相应计算系统
WO2022009542A1 (ja) 情報処理装置、情報処理方法及びプログラム
CN115066694A (zh) 计算图优化
WO2020149820A1 (en) Hardware accelerator extension to transfer learning - extending/finishing training to the edge
Chen et al. Fuzzy-neural approaches with example post-classification for estimating job cycle time in a wafer fab
US20200234120A1 (en) Generation of tensor data for learning based on a ranking relationship of labels
JP6985997B2 (ja) 機械学習システムおよびボルツマンマシンの計算方法
US20220359079A1 (en) Systems, methods and devices for predicting personalized biological state with model produced with meta-learning
CN116719706A (zh) 数据中心中的自动误差预测
US20210168195A1 (en) Server and method for controlling server
US20220019873A1 (en) Elastic bottleneck architectures for variable convolution operations
WO2019103773A1 (en) Automatically identifying alternative functional capabilities of designed artifacts
CN115409168A (zh) 神经网络优化方法及其装置
US11314517B2 (en) Method and apparatus for updating pipeline operations for data processing

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21837781

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022534937

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2021837781

Country of ref document: EP

Effective date: 20230210

NENP Non-entry into the national phase

Ref country code: DE