WO2023173804A1 - Brain-computer information fusion classification method and system for shared subspace learning - Google Patents

Brain-computer information fusion classification method and system for shared subspace learning Download PDF

Info

Publication number
WO2023173804A1
WO2023173804A1 PCT/CN2022/134523 CN2022134523W WO2023173804A1 WO 2023173804 A1 WO2023173804 A1 WO 2023173804A1 CN 2022134523 W CN2022134523 W CN 2022134523W WO 2023173804 A1 WO2023173804 A1 WO 2023173804A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
brain
shared subspace
dual
load
Prior art date
Application number
PCT/CN2022/134523
Other languages
French (fr)
Chinese (zh)
Inventor
梁继民
郭开泰
郑洋
闫健璞
胡海虹
任胜寒
王梓宇
Original Assignee
西安电子科技大学
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 西安电子科技大学 filed Critical 西安电子科技大学
Publication of WO2023173804A1 publication Critical patent/WO2023173804A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/12Classification; Matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • 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
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/08Feature extraction

Definitions

  • the invention belongs to the technical field of brain-computer interface technology application, and in particular relates to a brain-computer information fusion classification method and system for shared subspace learning.
  • brain-computer interface technology is used to build a brain-computer information fusion system to achieve a deep connection between biological intelligence and machine intelligence. Information perception, interaction and integration are expected to form a more advanced intelligent model.
  • This brain-computer information fusion system provides a new processing paradigm for image classification tasks in complex open environments by migrating the brain's high-level cognitive information into machine intelligence models.
  • Existing technology fusion method based on image-brain response complementary information
  • existing technology two shared subspace learning based on image-brain response correlation information method.
  • the main theoretical basis of the existing technology one is to use brain response and image information as expressions of image targets from different sources, and use information fusion methods to maximize the complementary information of the two to obtain a more complete joint representation of image target expressions. Its technical characteristics It lies in designing reasonable information fusion methods to maximize the effective information of different modalities.
  • the main representative methods of existing technology one include: "A brain-computer interface for the detection of mine-like objects in sidescan sonar imagery” (IEEE Journal of Oceanic Engineering, 2016, 41(1):123-138) using feature level The joint method fuses the image Haar type features and the subject's EEG features, effectively improving the performance of mine target detection in side-scan sonar images; "An adaptive brain-computer information fusion classification method and system” (Application No.: CN202111017296.4) By constructing a feature reliability learning model of two modalities, learning the feature reliability of images and brain responses, adaptively adjusting the fusion weights of their different modalities, and using adaptive fusion features for classification, this method The complementary information of the two modalities is maximized and the performance of image classification is improved.
  • the existing technology requires real-time participation of the brain in the application paradigm.
  • This "brain-in-the-loop" application paradigm is limited by subjective factors such as fatigue and injuries of the subjects, and it is difficult to achieve real-time and high-intensity
  • the fully automated application does not fully utilize the respective advantages of the brain and the machine.
  • the main theory of the second prior art is to construct a shared representation space based on the relevant information between the image and the brain response, thereby achieving the goal of migrating high-level cognitive information in the brain's cognitive decision-making process to the machine learning model. Its technical characteristics It lies in designing efficient associated information learning models.
  • the main representative methods of existing technology 1 include: "Bridging the Semantic Gap via Functional Brain Imaging” (IEEE Transactions on Multimedia: 2012,14(2):314-325) uses PCA method to establish brain magnetic resonance data features and video low-level images
  • the correlation prediction model between features realizes the emotional classification of videos by mapping video features to the brain response representation space.
  • deep learning technology it has been able to extract high-level semantic information of videos, and its performance is no longer weaker than human recognition.
  • a brain-computer information fusion classification method and system for brain-out-of-loop applications achieves prediction of image-to-brain response by building a feature domain reconstruction model, learns the reliability of features from different sources by building a feature reliability prediction module, and achieves adaptive information fusion classification for "brain-out-of-the-loop” applications.
  • related methods pass through multiple The separate learning process for each stage is cumbersome and troublesome during model deployment. How to build an image-brain response shared subspace learning model when brain response data is scarce, learn the associated information between the two end-to-end, and maximize the transfer of brain cognitive information.
  • the present invention provides a brain-computer information fusion classification method and system based on shared subspace learning, and particularly relates to a brain-computer information fusion classification method and system based on shared subspace learning, and its technical characteristics In order to use the contrastive learning method based on positive and negative sample sampling to build an image-brain response shared subspace end-to-end to achieve the transfer of brain cognitive abilities.
  • the present invention is implemented as follows: a brain-computer information fusion classification method of shared subspace learning.
  • the brain-computer information fusion classification method of shared subspace learning includes a training phase and an inference phase; wherein the training phase uses pairs Image and brain response data, through the contrastive learning strategy of positive and negative sample sampling, optimize the shared subspace model parameters of the image and brain response, and train the image classifier; the inference stage extracts image features for classification, realizing the entire brain-computer information
  • the application goals of the fusion classification system is implemented as follows: a brain-computer information fusion classification method of shared subspace learning.
  • the brain-computer information fusion classification method of shared subspace learning includes a training phase and an inference phase; wherein the training phase uses pairs Image and brain response data, through the contrastive learning strategy of positive and negative sample sampling, optimize the shared subspace model parameters of the image and brain response, and train the image classifier; the inference stage extracts image features for classification, realizing the entire brain-computer information
  • the application goals of the fusion classification system
  • Another object of the present invention is to provide a brain-computer information fusion classification system that applies the brain-computer information fusion classification method of shared subspace learning.
  • the brain-computer information fusion classification system includes:
  • Data loading device used to load test images and perform preliminary size transformation and format conversion functions to be suitable for the input model
  • Feature extraction device used to store model parameters successfully trained by the contrastive learning method based on positive and negative sample sampling, load input image data and perform forward inference to obtain image features in the shared subspace;
  • the classifier device is used to store the successfully trained SVM classifier parameters, load image features for SVM classification, and output the classification results.
  • the computer device includes a memory and a processor.
  • the memory stores a computer program.
  • the processor executes the following steps: step:
  • a dual-stream network is used to map images and brain responses to the same subspace respectively. Paired image and brain response data are used to train the dual-stream network model parameters of the shared subspace.
  • the current batch of image and brain response features are extracted in the shared subspace.
  • the positive and negative sample sampling method based on category information obtains the positive and negative feature set of the current sample, uses the InfoNCE loss function to calculate the loss value of the current sample, and extracts the image features of the shared subspace after optimization to train the SVM classifier; the inference phase is performed through load testing Image, extract the image features of the shared subspace and input them into the SVM classifier for classification.
  • Another object of the present invention is to provide a computer-readable storage medium that stores a computer program.
  • the computer program When executed by a processor, it causes the processor to perform the following steps:
  • a dual-stream network is used to map images and brain responses to the same subspace respectively. Paired image and brain response data are used to train the dual-stream network model parameters of the shared subspace.
  • the current batch of image and brain response features are extracted in the shared subspace.
  • the positive and negative sample sampling method based on category information obtains the positive and negative feature set of the current sample, uses the InfoNCE loss function to calculate the loss value of the current sample, and extracts the image features of the shared subspace after optimization to train the SVM classifier; the inference phase is performed through load testing Image, extract the image features of the shared subspace and input them into the SVM classifier for classification.
  • Another object of the present invention is to provide an information data processing terminal, which is used to implement the brain-computer information fusion classification system.
  • the present invention uses a contrastive learning method of positive and negative sample sampling based on category information to optimize a dual-stream network model of shared subspace under the constraints of the InfoNCE loss function; the image classification system includes a data loading device, a feature extraction device and a classifier device, By saving the model parameters of the shared subspace, "brain-out-of-the-loop" image classification applications can be realized.
  • the brain-computer information fusion classification system of shared subspace learning extracted by the present invention can train the shared subspace end-to-end, realize efficient transfer of brain cognitive information, and greatly improve the performance in complex open scenarios.
  • the performance of image classification tasks, the application paradigm of the brain-computer information fusion image classification system proposed by the present invention can naturally avoid the limitations of "brain-in-the-loop” applications. Through “brain-out-of-the-loop” applications, it can be greatly improved. It improves efficiency and stability in real-world applications and has broad application prospects under the new paradigm of brain-computer information collaborative work.
  • the brain-computer information fusion classification method based on shared subspace learning proposed by this invention can learn the correlation information between images and brain response data end-to-end under limited brain response data, and is compared with triple loss Function, the InfoNCE contrast loss function of positive and negative sample sampling proposed by the present invention can quickly converge the dual-stream network and efficiently realize the migration of cognitive information of the brain response to the image model.
  • the shared subspace learning method proposed by the present invention can directly realize the "brain-out-of-the-loop" application, greatly exerting the advantages of machine intelligence automation applications, and greatly improving the deployment and application of brain-computer information fusion classification systems. The efficiency is of extremely high application significance.
  • the present invention proposes a contrastive learning method based on positive and negative sample sampling, constructs a shared subspace of image-brain response, effectively realizes the migration of brain cognitive information, and can realize "brain-out-of-the-loop" applications with extremely high It improves the performance of image classification in complex open scenes.
  • the expected income and commercial value after the transformation of the technical solution of the present invention is: after the transformation of the technology of the present invention, it can be used for error detection, such as automatic driving, remote sensing image interpretation, synthetic aperture radar image interpretation, intelligent medical auxiliary recognition detection, etc.
  • Image recognition and classification tasks in complex open application scenarios with low rate tolerance can combine the dual advantages of machine intelligence and human intelligence in the above application scenarios, which can improve the classification accuracy of its application system.
  • the technical solution of the present invention fills the technical gap in the industry at home and abroad: the technical solution of the present invention fills the gap in applying the contrastive learning method to the field of brain-computer hybrid intelligent computing, and realizes the use of a small amount of data to construct an image-brain response shared subspace the goal of.
  • the brain-computer hybrid intelligent computing solution based on shared subspace learning proposed by the present invention adopts an end-to-end learning method. Constructing a shared subspace breaks through the technical problems of "brain-in-the-loop” modeling and "brain-out-of-the-loop” applications.
  • the technical solution of the present invention confirms the application prospects of introducing the specific brain responses of visual experts into computer vision methods.
  • Figure 1 is a flow chart of a brain-computer information fusion classification method provided by an embodiment of the present invention.
  • Figure 2 is a process schematic diagram of the training phase and the inference phase provided by the embodiment of the present invention.
  • Figure 3 is a principle framework diagram based on shared subspace learning provided by an embodiment of the present invention.
  • Figure 4 is a schematic diagram of positive and negative sample sampling provided by an embodiment of the present invention.
  • Figure 5 is a computer application system diagram of the brain-computer hybrid intelligent classification system provided by an embodiment of the present invention.
  • Figure 6 is a schematic diagram of part of the stimulus images used for the classification task provided by the embodiment of the present invention.
  • the present invention provides a brain-computer information fusion classification method and system for shared subspace learning.
  • the present invention will be described in detail below with reference to the accompanying drawings.
  • the present invention provides a brain-computer information fusion classification method and system based on shared subspace learning, which can realize brain visual cognitive information learning from machines under the condition of "brain not in the loop" application. Efficient migration of models improves target recognition performance in complex scenarios.
  • the brain-computer information fusion classification method includes the following steps:
  • S105 Send the image features to the SVM classifier and output the probability category of the image feature classification.
  • S101 ⁇ S103 constitute the training phase
  • S104 ⁇ S105 constitute the inference phase
  • the brain-computer information fusion classification method based on shared subspace learning provided by the embodiment of the present invention loads pairs of stimulation images and brain response data; using pairs of brain response data, the training is optimized based on the contrastive learning method of positive and negative sample sampling.
  • Image-brain response dual-stream network model parameters of the shared subspace extract the image feature set of the shared subspace and train a linear SVM classifier to output the classification results.
  • the brain-computer information fusion classification method based on shared subspace learning specifically includes the following steps:
  • the data loading process mainly includes the loading of image data, the loading of brain response data, and the loading process of paired image-brain response data:
  • the present invention trains a dual-stream network for shared subspace learning in an end-to-end manner.
  • an embodiment of the present invention provides a principle framework diagram of a dual-stream network for shared subspace learning. Paired image and brain response features are extracted respectively, and a positive sample set and a negative sample set of the current sample are constructed within the batch through the method of category-based positive and negative sample sampling.
  • the embodiment of the present invention provides a method based on Schematic diagram of positive and negative sample sampling of categories. After determining the set of positive and negative samples in the current sample batch, the current loss value is calculated through InfoNCE, gradient backpropagation is performed, and the network parameters are optimized. The specific steps are as follows:
  • any image feature f( vi ) in the batch its category is c, and all brain response features of the same category in the batch are all positive sample pairs of the current image feature, that is, the positive sample pair of the image feature f( vi ) is Combine all brain response features in the batch that are different from it does not belong to category c, it is recorded as the negative sample pair of the current image feature, that is, the negative sample pair of the image feature f( vi ) is That is, the positive/negative brain response feature set corresponding to each image feature is obtained accordingly.
  • m and n respectively represent the number of positive and negative samples of the brain response corresponding to the current image feature f(vi )
  • S(.) represents the cosine similarity of the two features
  • the Adam optimizer is used for backpropagation.
  • the model parameters are saved.
  • the batch size is set to 128, the initial learning rate is set to 0.1, the learning rate decays to 0.1, and the decay occurs every 30 epochs, and a total of 100 epochs are trained.
  • an embodiment of the present invention provides an application example of a computer image classification system based on a brain-computer fusion system based on shared subspace learning.
  • the system mainly includes a data loading device, a feature extraction device and a classifier device.
  • Each device of the system can store the computer program required for the corresponding module and the successfully trained model parameters to ensure the correct application of the system.
  • the specific information of each device in the system is as follows:
  • Data loading device loads the test image and performs preliminary size transformation and format conversion functions to be suitable for the input model.
  • (2) Feature extraction device used to store model parameters successfully trained by the contrastive learning method based on positive and negative sample sampling, load input image data, and perform forward inference to obtain image features in the shared subspace.
  • Classifier device used to store successfully trained SVM classifier parameters, load image features for SVM classification, and output the classification results.
  • the creativity of the technical solution of the present invention lies in proposing a brain-computer information fusion classification method and system based on shared subspace learning, and proposing a contrastive learning method based on positive and negative sample sampling to construct a shared subspace.
  • the application basis of the present invention is to use the contrastive learning strategy based on positive and negative sample sampling proposed by the present invention to train the feature extraction model of the shared subspace on the image-brain response data set, and train the classifier based on the features in the shared subspace.
  • the application implementation of the present invention needs to save the above-mentioned successfully trained shared subspace feature extraction model parameters and classifier parameters into the computer hardware system. Subsequent applications can load the image data to be tested through the software system described in Figure 5 of the embodiment, and then perform feature extraction and classifier inference through the above model parameters to achieve classification result output.
  • embodiments of the present invention may be implemented by hardware, software, or a combination of software and hardware.
  • the hardware part can be implemented using dedicated logic; the software part can be stored in memory and executed by an appropriate instruction execution system, such as a microprocessor or specially designed hardware.
  • an appropriate instruction execution system such as a microprocessor or specially designed hardware.
  • processor control code for example on a carrier medium such as a disk, CD or DVD-ROM, such as a read-only memory.
  • Such code is provided on a programmable memory (firmware) or on a data carrier such as an optical or electronic signal carrier.
  • the device and its modules of the present invention may be implemented by hardware circuits such as very large scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., It can also be implemented by software executed by various types of processors, or by a combination of the above-mentioned hardware circuits and software, such as firmware.
  • the hardware conditions for the experiment of this invention are: an ordinary computer, Intel i5 CPU, 8G memory, and an NVIDIA GeForce GTX 1070 graphics card; software platform: Ubuntu 18.04, PyTorch deep learning framework, python 3.6 language; the brain response used in this invention is
  • the stimulus image data set comes from the public data of the Brain-Score platform of the McGovern Institute for Brain Science at MIT.
  • the data set used in the present invention includes two parts: stimulation images and brain response data.
  • the stimulus images are composite images of 8 categories of targets and random natural scenes, with a total number of 3200, 400 images of each category. Each stimulus image contains only one target.
  • the target image is generated by changing the posture of the three-dimensional model of the target object, as shown in Figure 6. By changing the target posture and random natural background, this data set can effectively simulate the complex transformation of targets and scenes.
  • Open scene. Brain response data were collected from the ventral stream area of two well-trained adult rhesus monkeys. The brain response of the corresponding brain area was captured through a 168-channel electrode array in the inferotemporal area (IT).
  • each A group of 5 to 10 stimulus images were presented in the center of the monitor in sequence. Each image was displayed for 100 ms, followed by a 100 ms blank. During the entire process, the rhesus monkey was kept focused on the center of the monitor. Each stimulus image was presented multiple times, at least 28 times, and on average 50 times.
  • the data processing framework disclosed by the Brain-Score https://brain-score.readthedocs.io/en/latest/index.html
  • Brain-Score https://brain-score.readthedocs.io/en/latest/index.html
  • the computer's GPU is used to accelerate the training process of the dual-stream network of the shared subspace.
  • the model converges and the SVM classifier is trained. After the model training is successful, save the model parameters.
  • the inference process loads the parameters of each model, performs forward reasoning, and obtains the classification results.
  • This invention uses classification accuracy to describe the performance of classification, and evaluates the classification results of shared subspace learning under different image feature extraction branches, which mainly include four image feature extraction networks: AlexNet, VGG, GoogLeNet and ResNet, and are shown in Table 1
  • AlexNet AlexNet
  • VGG VGG
  • GoogLeNet GoogLeNet
  • ResNet ResNet
  • Table 1 The performance of IT and image single-modality classification was compared with the brain-computer information fusion classification method based on shared subspace learning. It can be seen from the table that the contrastive learning method based on positive and negative sample sampling proposed by the present invention can effectively improve the image classification performance by training the image-brain response shared subspace. Compared with single-modal SVM classification, the average improvement is 7.43%.
  • the performance of optimization by directly using InfoNCE loss is improved by 6.05%, which shows that the contrastive learning method of positive and negative sample sampling based on category information proposed by the present invention can efficiently realize the migration of brain cognitive information and improve image recognition in downstream complex open scenes. performance.
  • the application paradigm of the present invention can naturally avoid the limitations of "brain-in-the-loop” applications, and greatly improves the efficiency and stability in real-world applications through "brain-out-of-the-loop” applications. Therefore, the present invention has more practical application value and has broad application prospects under the new paradigm of brain-computer information collaborative work.

Abstract

The present invention relates to the technical field of brain-computer interface technology applications, and disclosed is a brain-computer information fusion classification method and system for shared subspace learning. The brain-computer information fusion classification method comprises a training stage and a reasoning stage. In the training stage, paired images and brain response data are utilized, shared subspace model parameters of the images and brain responses are optimized by means of a contrastive learning policy of positive/negative sample sampling, and an image classifier is trained; and in the reasoning stage, image features are extracted for classification, and an application target of the whole brain-computer information fusion classification system is achieved. The brain-computer information fusion classification system for shared subspace learning of the present invention can train a shared subspace in an end-to-end mode, efficient migration of brain cognitive information is achieved, and the performance of an image classification task in a complex open scenario is improved; by means of an application that "the brain is not in a loop", the efficiency and the stability in the practical application are improved, and the present invention has a wide application prospect under a new normal form of brain-computer information cooperative work.

Description

一种共享子空间学习的脑机信息融合分类方法及系统A brain-computer information fusion classification method and system based on shared subspace learning 技术领域Technical field
本发明属于脑机接口技术应用技术领域,尤其涉及一种共享子空间学习的脑机信息融合分类方法及系统。The invention belongs to the technical field of brain-computer interface technology application, and in particular relates to a brain-computer information fusion classification method and system for shared subspace learning.
背景技术Background technique
近年来,以深度学习为代表的人工智能方法发展迅速,在图像分类任务上的性能已经超越人类。但是,目前深度学习系统仅在人脸识别、语音识别、光学字符识别等有限的特定简单场景下大规模落地应用,其主要依赖于数据驱动,需要构建合适的模型、利用充足的算力去充分挖掘海量数据中的分布规则,并不能达到类人的认知能力。因此,面对目标/背景复杂多变、遮挡、对抗干扰等复杂开放场景时,例如自动驾驶、遥感图像解译等,尽管有充足的数据也很难完全模拟物理世界的完整分布,很难建立目标通用鲁棒的表征,从而导致性能急剧下降,还远未达到类人的强泛化能力。In recent years, artificial intelligence methods represented by deep learning have developed rapidly, and their performance in image classification tasks has surpassed humans. However, at present, deep learning systems are only used on a large scale in limited specific simple scenarios such as face recognition, speech recognition, and optical character recognition. They are mainly driven by data and need to build appropriate models and use sufficient computing power to fully Mining distribution rules in massive data cannot achieve human-like cognitive abilities. Therefore, when faced with complex open scenarios such as complex targets/backgrounds, occlusions, and counter-interference, such as autonomous driving, remote sensing image interpretation, etc., it is difficult to fully simulate the complete distribution of the physical world despite sufficient data, and it is difficult to establish The target is universally robust representation, resulting in a sharp drop in performance, which is far from reaching human-like strong generalization capabilities.
目前在军事应用、医疗诊断、自动驾驶等对失误决策容忍性低的复杂开放应用场景下,基于视觉识别专家的人工判读方式仍然是主流的图像识别与决策手段。但是,视觉专家的人工判读过程是一个主观的视觉认知决策过程,其行为可能会受到外部环境因素、疲劳、伤病等内部因素的影响而造成决策失误,与机器智能相比,视觉专家难以实现长时间、高强度、大范围的实时判读,并且大多数领域的视觉专家需要经过长周期、高投入的培养才能成为合格的专家。Currently, in complex open application scenarios with low tolerance for erroneous decision-making, such as military applications, medical diagnosis, and autonomous driving, manual interpretation methods based on visual recognition experts are still the mainstream means of image recognition and decision-making. However, the manual interpretation process of visual experts is a subjective visual cognitive decision-making process. Their behavior may be affected by external environmental factors, fatigue, injuries and other internal factors, resulting in decision-making errors. Compared with machine intelligence, it is difficult for visual experts to To achieve long-term, high-intensity, and large-scale real-time interpretation, visual experts in most fields require long-term, high-investment training to become qualified experts.
鉴于大脑是以人类为代表的灵长类动物行为和认知的物质基础和控制中枢,从工程角度出发利用脑机接口技术构建脑机信息融合系统,实现生物智能与机器智能之间深层次的信息感知、交互与整合,有望形成更高级的智能模式。这种脑机信息融合系统通过将大脑的高级认知信息迁移到机器智能模式中,为复杂开放环境下的图像分类任务提供了新的处理范式。In view of the fact that the brain is the material basis and control center for the behavior and cognition of primates represented by humans, from an engineering perspective, brain-computer interface technology is used to build a brain-computer information fusion system to achieve a deep connection between biological intelligence and machine intelligence. Information perception, interaction and integration are expected to form a more advanced intelligent model. This brain-computer information fusion system provides a new processing paradigm for image classification tasks in complex open environments by migrating the brain's high-level cognitive information into machine intelligence models.
目前,业内构建脑机信息融合分类系统的技术主要有两类,现有技术一:基于图像-大脑响应互补信息的融合方法;现有技术二:基于图像-大脑响应关联信息的共享子空间学习方法。现有技术一的主要理论依据是将大脑响应和图像信息作为图像目标不同来源的表达,利用信息融合的方法最大化两者的互补信息,以获取图像目标表达更加完善的联合表征,其技术特征在于设计合理的信息融合方法最大化不同模态的有效信息。现有技术一的主要代表方法包括:“A brain-computer interface for the detection of mine-like objects in sidescan sonar imagery”(IEEE Journal of Oceanic Engineering,2016,41(1):123-138)利用特征级联的方法融合图像Haar类型特征以及被试的脑电图特征,有效的提升了侧扫声呐图像中水雷目标检测的性 能;“一种自适应脑机信息融合分类方法及系统”(申请号:CN202111017296.4)通过构造两个模态的特征可靠性学习模型,学习图像和大脑响应的特征可靠性,并自适应调整其不同模态的融合权重,并利用自适应融合特征进行分类,该方法最大化的利用了两个模态的互补信息,提高了图像分类的性能。但是,现有技术一在应用范式上需要大脑的实时参与,这种“脑在环路”应用的范式受限于被试的疲劳、伤病等主观因素的影响,难以实现实时性、高强度的全自动化应用,并未完全发挥大脑-机器的各自优势。现有技术二的主要理论是根据图像和大脑响应之间的相关信息,构建其共享表征空间,从而实现大脑认知决策过程中的高级认知信息向机器学习模型中迁移的目标,其技术特征在于设计高效的关联信息学习模型。现有技术一的主要代表方法包括:“Bridging the Semantic Gap via Functional Brain Imaging”(IEEE Transactions on Multimedia:2012,14(2):314-325)利用PCA方法建立大脑磁共振数据特征与视频低层图像特征间的关联预测模型,通过将视频特征映射到大脑响应表征空间实现视频的情感分类,但是随着深度学习技术的发展,已经能够提取到视频的高级语义信息,其性能已经不弱于人类识别,因此类似的应用逐渐减少;“Decoding Brain Representations by Multimodal Learning of Neural Activity and Visual Features”(IEEE Transactions on Pattern Analysis and Machine Intelligence:2020)利用三元组损失优化基于深度学习方法构建的双流网络,约束图像特征的高级语义空间逼近脑电图的特征空间,以实现大脑认知信息的迁移,但是训练三元组损失在大量的训练数据下也很难达到收敛,受限于大脑响应的特性,很难收集到足够高质量的脑电图数据,现有的公开数据难以支持此类模型的训练;“一种脑不在环路应用的脑机信息融合分类方法及系统”(申请号:CN202111017290.7)通过构建特征域重建模型实现图像到大脑响应的预测,通过构建特征可靠性预测模块学习不同来源特征的可靠性,实现“脑不在环路”应用的自适应信息融合分类,但是相关方法通过多个阶段的单独学习处理,流程较为繁琐,在模型部署时比较麻烦。如何在大脑响应数据稀缺的情况下,构建图像-大脑响应共享子空间学习模型,端到端的学习到两者之间的关联信息,实现大脑认知信息的最大化迁移。Currently, there are two main types of technologies in the industry for building brain-computer information fusion classification systems. Existing technology one: fusion method based on image-brain response complementary information; existing technology two: shared subspace learning based on image-brain response correlation information method. The main theoretical basis of the existing technology one is to use brain response and image information as expressions of image targets from different sources, and use information fusion methods to maximize the complementary information of the two to obtain a more complete joint representation of image target expressions. Its technical characteristics It lies in designing reasonable information fusion methods to maximize the effective information of different modalities. The main representative methods of existing technology one include: "A brain-computer interface for the detection of mine-like objects in sidescan sonar imagery" (IEEE Journal of Oceanic Engineering, 2016, 41(1):123-138) using feature level The joint method fuses the image Haar type features and the subject's EEG features, effectively improving the performance of mine target detection in side-scan sonar images; "An adaptive brain-computer information fusion classification method and system" (Application No.: CN202111017296.4) By constructing a feature reliability learning model of two modalities, learning the feature reliability of images and brain responses, adaptively adjusting the fusion weights of their different modalities, and using adaptive fusion features for classification, this method The complementary information of the two modalities is maximized and the performance of image classification is improved. However, the existing technology requires real-time participation of the brain in the application paradigm. This "brain-in-the-loop" application paradigm is limited by subjective factors such as fatigue and injuries of the subjects, and it is difficult to achieve real-time and high-intensity The fully automated application does not fully utilize the respective advantages of the brain and the machine. The main theory of the second prior art is to construct a shared representation space based on the relevant information between the image and the brain response, thereby achieving the goal of migrating high-level cognitive information in the brain's cognitive decision-making process to the machine learning model. Its technical characteristics It lies in designing efficient associated information learning models. The main representative methods of existing technology 1 include: "Bridging the Semantic Gap via Functional Brain Imaging" (IEEE Transactions on Multimedia: 2012,14(2):314-325) uses PCA method to establish brain magnetic resonance data features and video low-level images The correlation prediction model between features realizes the emotional classification of videos by mapping video features to the brain response representation space. However, with the development of deep learning technology, it has been able to extract high-level semantic information of videos, and its performance is no longer weaker than human recognition. , so similar applications are gradually decreasing; "Decoding Brain Representations by Multimodal Learning of Neural Activity and Visual Features" (IEEE Transactions on Pattern Analysis and Machine Intelligence: 2020) uses triplet loss to optimize a two-stream network built based on deep learning methods, constraint The high-level semantic space of image features approximates the feature space of EEG to achieve the transfer of brain cognitive information. However, the training triplet loss is difficult to achieve convergence under a large amount of training data. It is limited by the characteristics of the brain response. It is difficult to collect high-quality EEG data, and existing public data cannot support the training of such models; "A brain-computer information fusion classification method and system for brain-out-of-loop applications" (Application No.: CN202111017290.7 ) achieves prediction of image-to-brain response by building a feature domain reconstruction model, learns the reliability of features from different sources by building a feature reliability prediction module, and achieves adaptive information fusion classification for "brain-out-of-the-loop" applications. However, related methods pass through multiple The separate learning process for each stage is cumbersome and troublesome during model deployment. How to build an image-brain response shared subspace learning model when brain response data is scarce, learn the associated information between the two end-to-end, and maximize the transfer of brain cognitive information.
通过上述分析,现有技术存在的问题及缺陷为:Through the above analysis, the problems and defects existing in the existing technology are:
(1)现有技术受限于“脑在环路”的应用范式,难以实现高强度、实时性的全自动化处理,难以完全发挥机器智能全自动化处理的优势。(1) Existing technology is limited by the "brain-in-the-loop" application paradigm, making it difficult to achieve high-intensity, real-time fully automated processing, and to fully leverage the advantages of fully automated machine intelligence processing.
(2)现有技术受限于大脑响应数据获取的难度,很难在有限的数据下端到端的学习到高质量的图像-脑电共享子空间,难以实现大脑认知信息的全部迁移。(2) Existing technology is limited by the difficulty of obtaining brain response data. It is difficult to learn high-quality image-EGG shared subspace end-to-end with limited data, and it is difficult to realize the transfer of all brain cognitive information.
(3)现有实现“脑不在环路”应用的自适应信息融合分类的方法通过多个阶段的单独学习处理,流程较为繁琐,在模型部署时比较麻烦。(3) The existing adaptive information fusion classification method for "brain-out-of-the-loop" applications uses multiple stages of separate learning and processing, which makes the process cumbersome and troublesome during model deployment.
发明内容Contents of the invention
针对现有技术存在的问题,本发明提供了一种共享子空间学习的脑机信息融合分类方法及系统,尤其涉及一种基于共享子空间学习的脑机信息融合分类方法及系统,其技术特性为利用基于正负样本采样的对比学习方法端到端的构建图像-大脑响应共享子空间,实现大脑认知能力的迁移。In view of the problems existing in the existing technology, the present invention provides a brain-computer information fusion classification method and system based on shared subspace learning, and particularly relates to a brain-computer information fusion classification method and system based on shared subspace learning, and its technical characteristics In order to use the contrastive learning method based on positive and negative sample sampling to build an image-brain response shared subspace end-to-end to achieve the transfer of brain cognitive abilities.
本发明是这样实现的,一种共享子空间学习的脑机信息融合分类方法,所述共享子空间学习的脑机信息融合分类方法包括训练阶段和推理阶段;其中,所述训练阶段利用成对的图像和大脑响应数据,通过正负样本采样的对比学习策略,优化图像和大脑响应的共享子空间模型参数,并训练图像分类器;所述推理阶段提取图像特征进行分类,实现整个脑机信息融合分类系统的应用目标。The present invention is implemented as follows: a brain-computer information fusion classification method of shared subspace learning. The brain-computer information fusion classification method of shared subspace learning includes a training phase and an inference phase; wherein the training phase uses pairs Image and brain response data, through the contrastive learning strategy of positive and negative sample sampling, optimize the shared subspace model parameters of the image and brain response, and train the image classifier; the inference stage extracts image features for classification, realizing the entire brain-computer information The application goals of the fusion classification system.
本发明的另一目的在于提供一种应用所述的共享子空间学习的脑机信息融合分类方法的脑机信息融合分类系统,所述脑机信息融合分类系统包括:Another object of the present invention is to provide a brain-computer information fusion classification system that applies the brain-computer information fusion classification method of shared subspace learning. The brain-computer information fusion classification system includes:
数据加载装置,用于加载测试图像,并进行初步的尺寸变换,格式转换功能,以适用于输入模型;Data loading device, used to load test images and perform preliminary size transformation and format conversion functions to be suitable for the input model;
特征提取装置,用于存储基于正负样本采样的对比学习方法训练成功的模型参数,加载输入图像数据并进行前向推理,获取共享子空间中的图像特征;Feature extraction device, used to store model parameters successfully trained by the contrastive learning method based on positive and negative sample sampling, load input image data and perform forward inference to obtain image features in the shared subspace;
分类器装置,用于存储训练成功的SVM分类器参数,加载图像特征进行SVM分类,并输出分类结果。The classifier device is used to store the successfully trained SVM classifier parameters, load image features for SVM classification, and output the classification results.
本发明的另一目的在于提供一种计算机设备,所述计算机设备包括存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如下步骤:Another object of the present invention is to provide a computer device. The computer device includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor performs the following steps: step:
训练阶段利用双流网络分别将图像和大脑响应映射到同一子空间,利用成对的图像和大脑响应数据训练共享子空间的双流网络模型参数,在共享子空间提取当前批次的图像和大脑响应特征;基于类别信息的正负样本采样方法获取当前样本的正负特征集合,利用InfoNCE损失函数计算当前样本的损失值,进行优化后提取共享子空间的图像特征训练SVM分类器;推理阶段通过加载测试图像,提取共享子空间的图像特征输入SVM分类器进行分类。In the training phase, a dual-stream network is used to map images and brain responses to the same subspace respectively. Paired image and brain response data are used to train the dual-stream network model parameters of the shared subspace. The current batch of image and brain response features are extracted in the shared subspace. ; The positive and negative sample sampling method based on category information obtains the positive and negative feature set of the current sample, uses the InfoNCE loss function to calculate the loss value of the current sample, and extracts the image features of the shared subspace after optimization to train the SVM classifier; the inference phase is performed through load testing Image, extract the image features of the shared subspace and input them into the SVM classifier for classification.
本发明的另一目的在于提供一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行如下步骤:Another object of the present invention is to provide a computer-readable storage medium that stores a computer program. When the computer program is executed by a processor, it causes the processor to perform the following steps:
训练阶段利用双流网络分别将图像和大脑响应映射到同一子空间,利用成对的图像和大脑响应数据训练共享子空间的双流网络模型参数,在共享子空间提取当前批次的图像和大脑 响应特征;基于类别信息的正负样本采样方法获取当前样本的正负特征集合,利用InfoNCE损失函数计算当前样本的损失值,进行优化后提取共享子空间的图像特征训练SVM分类器;推理阶段通过加载测试图像,提取共享子空间的图像特征输入SVM分类器进行分类。In the training phase, a dual-stream network is used to map images and brain responses to the same subspace respectively. Paired image and brain response data are used to train the dual-stream network model parameters of the shared subspace. The current batch of image and brain response features are extracted in the shared subspace. ; The positive and negative sample sampling method based on category information obtains the positive and negative feature set of the current sample, uses the InfoNCE loss function to calculate the loss value of the current sample, and extracts the image features of the shared subspace after optimization to train the SVM classifier; the inference phase is performed through load testing Image, extract the image features of the shared subspace and input them into the SVM classifier for classification.
本发明的另一目的在于提供一种信息数据处理终端,所述信息数据处理终端用于实现所述的脑机信息融合分类系统。Another object of the present invention is to provide an information data processing terminal, which is used to implement the brain-computer information fusion classification system.
结合上述的技术方案和解决的技术问题,请从以下几方面分析本发明所要保护的技术方案所具备的优点及积极效果为:Combined with the above technical solutions and the technical problems to be solved, please analyze the advantages and positive effects of the technical solutions to be protected by the present invention from the following aspects:
第一、针对上述现有技术存在的技术问题以及解决该问题的难度,紧密结合本发明的所要保护的技术方案以及研发过程中结果和数据等,详细、深刻地分析本发明技术方案如何解决的技术问题,解决问题之后带来的一些具备创造性的技术效果。具体描述如下:First, in view of the technical problems existing in the above-mentioned existing technologies and the difficulty of solving the problems, closely combine the technical solutions to be protected by the present invention and the results and data in the research and development process, etc., to conduct a detailed and profound analysis of how to solve the technical solutions of the present invention. Technical problems, and some creative technical effects brought about by solving the problems. The specific description is as follows:
本发明利用基于类别信息的正负样本采样的对比学习方法,在InfoNCE损失函数的约束下优化共享子空间的双流网络模型;所述图像分类系统包括数据加载装置、特征提取装置和分类器装置,通过保存共享子空间的模型参数,可以实现“脑不在环路”的图像分类应用。与现有技术相比,本发明提取的共享子空间学习的脑机信息融合分类系统能够端到端的训练共享子空间,实现大脑认知信息的高效迁移,极大的提升了在复杂开场景下图像分类任务的性能,本发明提出的脑机信息融合的图像分类系统,其应用范式可以自然的避开“脑在环路”应用的限制,通过“脑不在环路”应用,极大的提高了现实应用中的效率与稳定性,在脑机信息协同工作的新范式下具有广泛的应用前景。The present invention uses a contrastive learning method of positive and negative sample sampling based on category information to optimize a dual-stream network model of shared subspace under the constraints of the InfoNCE loss function; the image classification system includes a data loading device, a feature extraction device and a classifier device, By saving the model parameters of the shared subspace, "brain-out-of-the-loop" image classification applications can be realized. Compared with the existing technology, the brain-computer information fusion classification system of shared subspace learning extracted by the present invention can train the shared subspace end-to-end, realize efficient transfer of brain cognitive information, and greatly improve the performance in complex open scenarios. The performance of image classification tasks, the application paradigm of the brain-computer information fusion image classification system proposed by the present invention can naturally avoid the limitations of "brain-in-the-loop" applications. Through "brain-out-of-the-loop" applications, it can be greatly improved. It improves efficiency and stability in real-world applications and has broad application prospects under the new paradigm of brain-computer information collaborative work.
第二,把技术方案看做一个整体或者从产品的角度,本发明所要保护的技术方案具备的技术效果和优点,具体描述如下:Second, considering the technical solution as a whole or from a product perspective, the technical effects and advantages possessed by the technical solution to be protected by the present invention are specifically described as follows:
本发明提出的基于共享子空间学习的脑机信息融合分类方法,能够在有限的大脑响应数据下,端到端的学习到图像和大脑响应数据之间的关联信息,并且相较于三元组损失函数,本发明提出的正负样本采样的InfoNCE对比损失函数能够使双流网络快速收敛,高效的实现大脑响应的认知信息向图像模型的迁移。另外,本发明提出的共享子空间学习的方法能够直接实现“脑不在环路”应用,极大的发挥了机器智能自动化应用的优势,极大的提高了脑机信息融合分类系统的部署与应用的效率,具有极高的应用意义。本发明提出了一种基于正负样本采样的对比学习方法,构建图像-大脑响应的共享子空间,有效的实现了大脑认知信息的迁移,并且能够实现“脑不在环路”应用,极高的提升了复杂开放场景下图像分类的性能。The brain-computer information fusion classification method based on shared subspace learning proposed by this invention can learn the correlation information between images and brain response data end-to-end under limited brain response data, and is compared with triple loss Function, the InfoNCE contrast loss function of positive and negative sample sampling proposed by the present invention can quickly converge the dual-stream network and efficiently realize the migration of cognitive information of the brain response to the image model. In addition, the shared subspace learning method proposed by the present invention can directly realize the "brain-out-of-the-loop" application, greatly exerting the advantages of machine intelligence automation applications, and greatly improving the deployment and application of brain-computer information fusion classification systems. The efficiency is of extremely high application significance. The present invention proposes a contrastive learning method based on positive and negative sample sampling, constructs a shared subspace of image-brain response, effectively realizes the migration of brain cognitive information, and can realize "brain-out-of-the-loop" applications with extremely high It improves the performance of image classification in complex open scenes.
第三,作为本发明的权利要求的创造性辅助证据,还体现在以下几个重要方面:Third, as auxiliary evidence of inventive step for the claims of the present invention, it is also reflected in the following important aspects:
(1)本发明的技术方案转化后的预期收益和商业价值为:本发明技术转化后能够用于自 动驾驶、遥感图像解译、合成孔径雷打图像解译、智能医学辅助识别检测等对错误率忍耐度较低的复杂开放应用场景下的图像识别分类任务,能够在上述应用场景下结合机器智能和人类智能的双重优势,能够提高其应用系统的分类准确率。(1) The expected income and commercial value after the transformation of the technical solution of the present invention is: after the transformation of the technology of the present invention, it can be used for error detection, such as automatic driving, remote sensing image interpretation, synthetic aperture radar image interpretation, intelligent medical auxiliary recognition detection, etc. Image recognition and classification tasks in complex open application scenarios with low rate tolerance can combine the dual advantages of machine intelligence and human intelligence in the above application scenarios, which can improve the classification accuracy of its application system.
(2)本发明的技术方案填补了国内外业内技术空白:本发明的技术方案填补了将对比学习方法应用到脑机混合智能计算领域,并且实现了利用少量数据构建图像-大脑响应共享子空间的目的。(2) The technical solution of the present invention fills the technical gap in the industry at home and abroad: the technical solution of the present invention fills the gap in applying the contrastive learning method to the field of brain-computer hybrid intelligent computing, and realizes the use of a small amount of data to construct an image-brain response shared subspace the goal of.
(3)本发明的技术方案是否解决了人们一直渴望解决、但始终未能获得成功的技术难题:本发明提出的基于共享子空间学习的脑机混合智能计算方案,通过端到端学习的方式构建共享子空间,突破了“脑在环路”建模,“脑不在环路”应用的技术难题。(3) Whether the technical solution of the present invention solves the technical problem that people have been eager to solve but have never been successful: The brain-computer hybrid intelligent computing solution based on shared subspace learning proposed by the present invention adopts an end-to-end learning method. Constructing a shared subspace breaks through the technical problems of "brain-in-the-loop" modeling and "brain-out-of-the-loop" applications.
(4)本发明的技术方案是否克服了技术偏见:本发明的技术方案证实了将视觉专家的特异性大脑响应引入计算机视觉方法的应用前景。(4) Whether the technical solution of the present invention overcomes technical bias: The technical solution of the present invention confirms the application prospects of introducing the specific brain responses of visual experts into computer vision methods.
附图说明Description of the drawings
图1是本发明实施例提供的脑机信息融合分类方法流程图。Figure 1 is a flow chart of a brain-computer information fusion classification method provided by an embodiment of the present invention.
图2是本发明实施例提供的训练阶段与推理阶段的过程示意图。Figure 2 is a process schematic diagram of the training phase and the inference phase provided by the embodiment of the present invention.
图3是本发明实施例提供的基于共享子空间学习的原理框架图。Figure 3 is a principle framework diagram based on shared subspace learning provided by an embodiment of the present invention.
图4是本发明实施例提供的正负样本采样的示意图。Figure 4 is a schematic diagram of positive and negative sample sampling provided by an embodiment of the present invention.
图5是本发明实施例提供的脑机混合智能分类系统的计算机应用系统图。Figure 5 is a computer application system diagram of the brain-computer hybrid intelligent classification system provided by an embodiment of the present invention.
图6是本发明实施例提供的用于分类任务的部分刺激图像示意图。Figure 6 is a schematic diagram of part of the stimulus images used for the classification task provided by the embodiment of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with examples. It should be understood that the specific embodiments described here are only used to explain the present invention and are not intended to limit the present invention.
针对现有技术存在的问题,本发明提供了一种共享子空间学习的脑机信息融合分类方法及系统,下面结合附图对本发明作详细的描述。In view of the problems existing in the prior art, the present invention provides a brain-computer information fusion classification method and system for shared subspace learning. The present invention will be described in detail below with reference to the accompanying drawings.
一、解释说明实施例。为了使本领域技术人员充分了解本发明如何具体实现,该部分是对权利要求技术方案进行展开说明的解释说明实施例。1. Explain the embodiment. In order to enable those skilled in the art to fully understand how the present invention is specifically implemented, this section is an illustrative example that expands and explains the technical solutions of the claims.
针对现有技术存在的问题,本发明提供了一种基于共享子空间学习的脑机信息融合分类方法及系统,可在“脑不在环路”应用的条件下实现大脑视觉认知信息向机器学习模型的高效迁移,提高复杂场景下的目标识别性能。In view of the problems existing in the existing technology, the present invention provides a brain-computer information fusion classification method and system based on shared subspace learning, which can realize brain visual cognitive information learning from machines under the condition of "brain not in the loop" application. Efficient migration of models improves target recognition performance in complex scenarios.
如图1所示,本发明实施例提供的脑机信息融合分类方法包括以下步骤:As shown in Figure 1, the brain-computer information fusion classification method provided by the embodiment of the present invention includes the following steps:
S101,利用ResNet特征提取结构和全连接层分别构建图像和大脑响应的双流特征提取网络,作为共享子空间的特征提取模型;S101, use the ResNet feature extraction structure and the fully connected layer to construct a dual-stream feature extraction network for image and brain response respectively, as a feature extraction model of shared subspace;
S102,加载成对的刺激图像和大脑响应数据集,基于正负采样的对比学习方法优化共享子空间的双流网络模型参数,直至模型收敛;S102, load paired stimulus images and brain response data sets, and optimize the parameters of the dual-stream network model of the shared subspace based on the contrastive learning method of positive and negative sampling until the model converges;
S103,利用收敛的双流网络提取训练集刺激图像在共享子空间的图像特征集,并利用所述图像特征集训练SVM分类器;S103, use the converged dual-stream network to extract the image feature set of the training set stimulus image in the shared subspace, and use the image feature set to train the SVM classifier;
S104,加载测试图像以及双流网络中的图像分支模型,提取测试图像在共享子空间中的图像特征;S104, load the test image and the image branch model in the dual-stream network, and extract the image features of the test image in the shared subspace;
S105,将图像特征送入SVM分类器,输出图像特征分类的概率类别。S105: Send the image features to the SVM classifier and output the probability category of the image feature classification.
S101~S103,构成训练阶段,S104~S105,构成推理阶段。S101~S103 constitute the training phase, and S104~S105 constitute the inference phase.
本发明实施例提供的基于共享子空间学习的脑机信息融合分类方法,通过加载成对的刺激图像和大脑响应数据;利用成对的大脑响应数据,基于正负样本采样的对比学习方法优化训练图像-大脑响应共享子空间的双流网络模型参数;提取共享子空间的图像特征集并训练线性SVM分类器,输出分类结果。The brain-computer information fusion classification method based on shared subspace learning provided by the embodiment of the present invention loads pairs of stimulation images and brain response data; using pairs of brain response data, the training is optimized based on the contrastive learning method of positive and negative sample sampling. Image-brain response dual-stream network model parameters of the shared subspace; extract the image feature set of the shared subspace and train a linear SVM classifier to output the classification results.
如图2所示,本发明实施例提供的基于共享子空间学习的脑机信息融合分类方法具体包括以下步骤:As shown in Figure 2, the brain-computer information fusion classification method based on shared subspace learning provided by the embodiment of the present invention specifically includes the following steps:
步骤一、训练阶段:Step 1. Training phase:
(1)利用ResNet特征提取结构和全连接层分别构建图像和大脑响应的双流特征提取网络,作为共享子空间的特征提取模型。(1) Use the ResNet feature extraction structure and the fully connected layer to construct a dual-stream feature extraction network for image and brain response respectively, as a shared subspace feature extraction model.
1)利用PyTorch深度学习框架搭建ResNet34模型结构,去除其全连接层,并添加一个全连接层,其输入尺寸为512,输出尺寸为168维,设置模型参数“pretrained=True”,加载ImageNet预训练模型参数。以上作为双流网络的图像特征提取分支。1) Use the PyTorch deep learning framework to build the ResNet34 model structure, remove its fully connected layer, and add a fully connected layer with an input size of 512 and an output size of 168 dimensions. Set the model parameter "pretrained=True" and load ImageNet pre-training. model parameters. The above serves as the image feature extraction branch of the dual-stream network.
2)利用PyTorch深度学习框架构建三层全连接网络,其输入输出尺寸均为168维,并赋随机初始化参数,作为双流网络的大脑响应特征提取分支。2) Use the PyTorch deep learning framework to build a three-layer fully connected network, whose input and output sizes are both 168 dimensions, and given random initialization parameters as the brain response feature extraction branch of the dual-stream network.
3)将图像和大脑响应特征提取模块类集成为双流网络的共用类模块。3) Integrate image and brain response feature extraction module classes into common class modules of the dual-stream network.
(2)加载成对的刺激图像和大脑响应数据集,基于正负采样的对比学习方法优化双流网络模型参数,直至模型收敛。(2) Load paired stimulation images and brain response data sets, and optimize the dual-stream network model parameters based on the contrastive learning method of positive and negative sampling until the model converges.
数据加载的流程主要包括图像数据的加载、大脑响应数据的加载、以及成对的图像-大脑响应数据的加载过程:The data loading process mainly includes the loading of image data, the loading of brain response data, and the loading process of paired image-brain response data:
图像数据加载的过程:Image data loading process:
1)利用PyTorch的Dataset工具包加载刺激图像。1) Use PyTorch’s Dataset toolkit to load stimulus images.
2)利用torchvision的transforms工具包将图像尺寸变换为224*224,并进行随机左右翻转进行数据增强,然后将读入的图像数据转换为tensor格式。2) Use torchvision's transforms toolkit to transform the image size to 224*224, perform random left and right flipping for data enhancement, and then convert the read image data into tensor format.
大脑响应数据的加载过程:The loading process of brain response data:
1)加载大脑响应数据集,将同一刺激图像多次呈现时捕获的大脑响应求平均值。1) Load the brain response dataset and average the brain responses captured when the same stimulus image is presented multiple times.
2)选择下颞叶区域(Inferior temporal lobe,IT)放置的电极,提取出对应电极的大脑响应信号。2) Select electrodes placed in the inferior temporal lobe (IT) area and extract the brain response signals of the corresponding electrodes.
3)在每一个电极的大脑响应信号上,沿时间维度求均值,去除时间维度的影响。3) On the brain response signal of each electrode, average the value along the time dimension to remove the influence of the time dimension.
4)将处理后的大脑响应翻转为1*168维特征,并转换为tensor格式,作为刺激图像在IT区域每一个电极上的平均大脑响应特征。4) Flip the processed brain response into 1*168-dimensional features and convert it into tensor format as the average brain response feature of the stimulation image on each electrode in the IT area.
成对图像-大脑响应数据对加载过程:Paired image-brain response data pair loading process:
1)构建dataset公共类,索引到刺激图像名称信息,加载图像数据,然后根据图像名称索引到对应的大脑响应数据信息,加载大脑响应数据。1) Construct the dataset public class, index to the stimulus image name information, load the image data, then index to the corresponding brain response data information according to the image name, and load the brain response data.
2)返回成对的图像-大脑响应数据。2) Return paired image-brain response data.
本发明通过端到端的方式训练共享子空间学习的双流网络,如图3所示,本发明实施例提供了共享子空间学习的双流网络的原理框架图。分别提取成对的图像和大脑响应特征,并在批次内通过基于类别的正负样本采样的方法构建当前样本的正样本集合负样本集,如图4所示,本发明实施例提供了基于类别的正负样本采样的原理图。确定当前样本批次内的正负样本集合之后,通过InfoNCE计算当前损失值,进行梯度反向传播,优化网络参数。其具体步骤如下:The present invention trains a dual-stream network for shared subspace learning in an end-to-end manner. As shown in Figure 3, an embodiment of the present invention provides a principle framework diagram of a dual-stream network for shared subspace learning. Paired image and brain response features are extracted respectively, and a positive sample set and a negative sample set of the current sample are constructed within the batch through the method of category-based positive and negative sample sampling. As shown in Figure 4, the embodiment of the present invention provides a method based on Schematic diagram of positive and negative sample sampling of categories. After determining the set of positive and negative samples in the current sample batch, the current loss value is calculated through InfoNCE, gradient backpropagation is performed, and the network parameters are optimized. The specific steps are as follows:
1)利用PyTorch深度学习框架加载成对的图像和大脑响应数据,其中批次大小设置为256,每次加载256对数据。1) Use the PyTorch deep learning framework to load pairs of image and brain response data, with the batch size set to 256 and 256 pairs of data loaded each time.
2)加载双流网络模型参数,前向推理,获取批次图像和大脑响应的特征集合,记为<f(v),f(b)>。2) Load the dual-stream network model parameters, perform forward reasoning, and obtain the feature set of batch images and brain responses, recorded as <f(v), f(b)>.
3)对于批次中的任意图像特征f(v i),其类别为c,批次中所有与其相同类别的大脑响应特征
Figure PCTCN2022134523-appb-000001
均为当前图像特征的正样本对,即图像特征f(v i)的正样本对为
Figure PCTCN2022134523-appb-000002
将批次中所有与其不同类别的大脑响应特征
Figure PCTCN2022134523-appb-000003
不属于类别c,记为当前图像特征的负样本对,即图像特征f(v i)的负样本对为
Figure PCTCN2022134523-appb-000004
即据此获取每一个图像特征对应的正/负大脑响应 特征集。
3) For any image feature f( vi ) in the batch, its category is c, and all brain response features of the same category in the batch
Figure PCTCN2022134523-appb-000001
are all positive sample pairs of the current image feature, that is, the positive sample pair of the image feature f( vi ) is
Figure PCTCN2022134523-appb-000002
Combine all brain response features in the batch that are different from it
Figure PCTCN2022134523-appb-000003
does not belong to category c, it is recorded as the negative sample pair of the current image feature, that is, the negative sample pair of the image feature f( vi ) is
Figure PCTCN2022134523-appb-000004
That is, the positive/negative brain response feature set corresponding to each image feature is obtained accordingly.
4)利用InfoNCE损失函数计算批次中每一个图像特征f(v i)对应的对比损失L i4) Use the InfoNCE loss function to calculate the contrast loss Li corresponding to each image feature f(vi ) in the batch:
Figure PCTCN2022134523-appb-000005
Figure PCTCN2022134523-appb-000005
其中,m和n分别表示当前图像特征f(v i)对应的大脑响应正样本和负样本数量,S(.)表示两个特征的余弦相似度; Among them, m and n respectively represent the number of positive and negative samples of the brain response corresponding to the current image feature f(vi ) , and S(.) represents the cosine similarity of the two features;
5)根据上述InfoNCE损失函数计算到的对比损失反向传播,优化双流网络的模型参数,直至对比损失稳定收敛。训练双流网络时利用Adam优化器进行反向传播,当损失函数收敛时,保存模型参数。其中,批次大小设置为128,初始学习率设置为0.1,学习率衰减为0.1,每隔30个epoch衰减依次,共训练100个epoch。5) Based on the contrast loss calculated by the above InfoNCE loss function, backpropagate and optimize the model parameters of the dual-stream network until the contrast loss converges stably. When training the dual-stream network, the Adam optimizer is used for backpropagation. When the loss function converges, the model parameters are saved. Among them, the batch size is set to 128, the initial learning rate is set to 0.1, the learning rate decays to 0.1, and the decay occurs every 30 epochs, and a total of 100 epochs are trained.
(3)利用收敛的双流网络提取训练集刺激图像在共享子空间的图像特征集,并训练SVM分类器。(3) Use the converged dual-stream network to extract the image feature set of the training set stimulation image in the shared subspace, and train the SVM classifier.
1)加载双流网络图像分支模型参数,加载训练集图像数据,进行前向推理,获取图像在共享子空间中的特征集。1) Load the dual-stream network image branch model parameters, load the training set image data, perform forward inference, and obtain the feature set of the image in the shared subspace.
2)利用Python的sklearn工具包构建线性SVM分类器,利用上述步骤提取到的图像特征训练分类器参数,并保存模型参数。2) Use Python's sklearn toolkit to build a linear SVM classifier, use the image features extracted in the above steps to train the classifier parameters, and save the model parameters.
步骤二:推理阶段Step 2: Reasoning stage
(1)加载双流网络的图像分支模型参数,只需加载测试图像,经过图像分支模型前向推理,提取共享子空间中的图像特征。(1) To load the image branch model parameters of the dual-stream network, you only need to load the test image, and extract the image features in the shared subspace through forward reasoning of the image branch model.
(2)加载SVM分类器的模型参数,将上述步骤提取到的图像特征输入分类器,获取图像的分类结果。(2) Load the model parameters of the SVM classifier, input the image features extracted in the above steps into the classifier, and obtain the image classification results.
如图5所示,本发明实施例提供了基于共享子空间学习的脑机融合系统的计算机图像分类系统应用图例,主要包括此系统包括数据加载装置、特征提取装置和分类器装置。该系统的各个装置可以存储对应模块所需的计算机程序、训练成功的模型参数,以保证该系统的正确应用。系统各个装置的具体信息如下:As shown in Figure 5, an embodiment of the present invention provides an application example of a computer image classification system based on a brain-computer fusion system based on shared subspace learning. The system mainly includes a data loading device, a feature extraction device and a classifier device. Each device of the system can store the computer program required for the corresponding module and the successfully trained model parameters to ensure the correct application of the system. The specific information of each device in the system is as follows:
(1)数据加载装置:加载测试图像,并进行初步的尺寸变换,格式转换功能,以适用于输入模型。(1) Data loading device: loads the test image and performs preliminary size transformation and format conversion functions to be suitable for the input model.
(2)特征提取装置:用于存储基于正负样本采样的对比学习方法训练成功的模型参数,加载输入图像数据,并进行前向推理,获取共享子空间中的图像特征。(2) Feature extraction device: used to store model parameters successfully trained by the contrastive learning method based on positive and negative sample sampling, load input image data, and perform forward inference to obtain image features in the shared subspace.
(3)分类器装置:用于存储训练成功的SVM分类器参数,加载图像特征进行SVM分 类,并输出分类结果。(3) Classifier device: used to store successfully trained SVM classifier parameters, load image features for SVM classification, and output the classification results.
二、应用实施例。为了证明本发明的技术方案的创造性和技术价值,该部分是对权利要求技术方案进行具体产品上或相关技术上的应用实施例。2. Application examples. In order to prove the creativity and technical value of the technical solution of the present invention, this section is an application example of the claimed technical solution in specific products or related technologies.
本发明技术方案的创造性在于提出了一种基于共享子空间学习的脑机信息融合分类方法及系统,提出基于正负样本采样的对比学习方法构建共享子空间。本发明的应用基础是利用本发明提出的基于正负样本采样的对比学习策略在图像-大脑响应数据集上训练共享子空间的特征提取模型,并依据共享子空间中的特征训练分类器。本发明的应用实施需要保存上述训练成功的共享子空间特征提取模型参数和分类器参数到计算机硬件系统中。后续应用可通过实施例图5描述的软件系统加载需要测试的图像数据,然后通过上述模型参数进行特征提取、分类器推理即可实现分类结果输出。The creativity of the technical solution of the present invention lies in proposing a brain-computer information fusion classification method and system based on shared subspace learning, and proposing a contrastive learning method based on positive and negative sample sampling to construct a shared subspace. The application basis of the present invention is to use the contrastive learning strategy based on positive and negative sample sampling proposed by the present invention to train the feature extraction model of the shared subspace on the image-brain response data set, and train the classifier based on the features in the shared subspace. The application implementation of the present invention needs to save the above-mentioned successfully trained shared subspace feature extraction model parameters and classifier parameters into the computer hardware system. Subsequent applications can load the image data to be tested through the software system described in Figure 5 of the embodiment, and then perform feature extraction and classifier inference through the above model parameters to achieve classification result output.
应当注意,本发明的实施方式可以通过硬件、软件或者软件和硬件的结合来实现。硬件部分可以利用专用逻辑来实现;软件部分可以存储在存储器中,由适当的指令执行系统,例如微处理器或者专用设计硬件来执行。本领域的普通技术人员可以理解上述的设备和方法可以使用计算机可执行指令和/或包含在处理器控制代码中来实现,例如在诸如磁盘、CD或DVD-ROM的载体介质、诸如只读存储器(固件)的可编程的存储器或者诸如光学或电子信号载体的数据载体上提供了这样的代码。本发明的设备及其模块可以由诸如超大规模集成电路或门阵列、诸如逻辑芯片、晶体管等的半导体、或者诸如现场可编程门阵列、可编程逻辑设备等的可编程硬件设备的硬件电路实现,也可以用由各种类型的处理器执行的软件实现,也可以由上述硬件电路和软件的结合例如固件来实现。It should be noted that embodiments of the present invention may be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in memory and executed by an appropriate instruction execution system, such as a microprocessor or specially designed hardware. Those of ordinary skill in the art will understand that the above-described apparatus and methods may be implemented using computer-executable instructions and/or included in processor control code, for example on a carrier medium such as a disk, CD or DVD-ROM, such as a read-only memory. Such code is provided on a programmable memory (firmware) or on a data carrier such as an optical or electronic signal carrier. The device and its modules of the present invention may be implemented by hardware circuits such as very large scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., It can also be implemented by software executed by various types of processors, or by a combination of the above-mentioned hardware circuits and software, such as firmware.
三、实施例相关效果的证据。本发明实施例在研发或者使用过程中取得了一些积极效果,和现有技术相比的确具备很大的优势,下面内容结合试验过程的数据、图表等进行描述。3. Evidence of relevant effects of the embodiment. The embodiments of the present invention have achieved some positive effects during the development or use process, and indeed have great advantages compared with the existing technology. The following content is described in conjunction with the data, charts, etc. of the test process.
1.实验条件:1. Experimental conditions:
本发明实验的硬件条件为:一台普通计算机,Intel i5 CPU,8G内存,一块英伟达GeForce GTX 1070显卡;软件平台:Ubuntu 18.04,PyTorch深度学习框架,python 3.6语言;本发明所使用的大脑响应与刺激图像数据集来自麻省理工学院麦戈文脑科学研究所Brain-Score平台的公开数据。The hardware conditions for the experiment of this invention are: an ordinary computer, Intel i5 CPU, 8G memory, and an NVIDIA GeForce GTX 1070 graphics card; software platform: Ubuntu 18.04, PyTorch deep learning framework, python 3.6 language; the brain response used in this invention is The stimulus image data set comes from the public data of the Brain-Score platform of the McGovern Institute for Brain Science at MIT.
2.训练数据与测试数据:2. Training data and test data:
本发明所用数据集包括刺激图像和大脑响应数据两部分。刺激图像为8类目标与随机自然场景的合成图像,总数量为3200,每类图像400张。每张刺激图像仅包含一个目标,目标图像通过改变目标物体三维模型的姿态生成,如图6所示,通过改变目标姿态以及随机自然 背景,此数据集能够有效的模拟目标、场景复杂变换的复杂开放场景。大脑响应数据采集自两只训练有素的成年恒河猴的腹侧流区域,通过颞下区域(IT)的168通道的电极阵列捕获相应脑区的大脑响应,在脑电采集过程中,每5~10张刺激图像为一组,依次呈现在显示器中央,每张图像显示100ms,紧接着100ms空白,整个过程中保持恒河猴紧盯显示器中央位置。每张刺激图像多次呈现,至少呈现28次,平均呈现50次。其中,可以利用Brain-Score(https://brain-score.readthedocs.io/en/latest/index.html)平台公开的数据处理框架对大脑响应进行预处理,获取预处理后的大脑响应特征。The data set used in the present invention includes two parts: stimulation images and brain response data. The stimulus images are composite images of 8 categories of targets and random natural scenes, with a total number of 3200, 400 images of each category. Each stimulus image contains only one target. The target image is generated by changing the posture of the three-dimensional model of the target object, as shown in Figure 6. By changing the target posture and random natural background, this data set can effectively simulate the complex transformation of targets and scenes. Open scene. Brain response data were collected from the ventral stream area of two well-trained adult rhesus monkeys. The brain response of the corresponding brain area was captured through a 168-channel electrode array in the inferotemporal area (IT). During the EEG collection process, each A group of 5 to 10 stimulus images were presented in the center of the monitor in sequence. Each image was displayed for 100 ms, followed by a 100 ms blank. During the entire process, the rhesus monkey was kept focused on the center of the monitor. Each stimulus image was presented multiple times, at least 28 times, and on average 50 times. Among them, the data processing framework disclosed by the Brain-Score (https://brain-score.readthedocs.io/en/latest/index.html) platform can be used to preprocess the brain response and obtain the preprocessed brain response characteristics.
3.实验内容:3.Experimental content:
按照上述的训练阶段的步骤,通过计算机的GPU来加速共享子空间的双流网络的训练过程,经过训练直至模型收敛,并训练SVM分类器。模型训练成功后保存模型参数。According to the above steps in the training phase, the computer's GPU is used to accelerate the training process of the dual-stream network of the shared subspace. After training, the model converges and the SVM classifier is trained. After the model training is successful, save the model parameters.
推理过程加载各个模型的参数,前向推理,获取分类结果即可。The inference process loads the parameters of each model, performs forward reasoning, and obtains the classification results.
4.实验结果分析4. Analysis of experimental results
本发明利用分类准确率描述分类的性能,评估了不同的图像特征提取分支下的共享子空间学习的分类结果,主要包括AlexNet、VGG、GoogLeNet和ResNet四种图像特征提取网络,并在表1中比较了IT和图像单模态分类与基于共享子空间学习的脑机信息融合分类方法的性能对比。从表中可以看出本发明提出的基于正负样本采样的对比学习方法训练图像-大脑响应的共享子空间能够有效的提升图像的分类性能,相较单模态SVM分类平均提升7.43%,比直接利用InfoNCE损失进行优化的性能提升6.05%,说明本发明提出的基于类别信息的正负样本采样的对比学习方法能够高效的实现大脑认知信息的迁移,提升在下游复杂开放场景下的图像识别性能。另外,本发明的应用范式可以自然的避开“脑在环路”应用的限制,通过“脑不在环路”应用,极大的提高了现实应用中的效率与稳定性。因此,本发明更有实际应用价值,在脑机信息协同工作的新范式下具有广泛的应用前景。This invention uses classification accuracy to describe the performance of classification, and evaluates the classification results of shared subspace learning under different image feature extraction branches, which mainly include four image feature extraction networks: AlexNet, VGG, GoogLeNet and ResNet, and are shown in Table 1 The performance of IT and image single-modality classification was compared with the brain-computer information fusion classification method based on shared subspace learning. It can be seen from the table that the contrastive learning method based on positive and negative sample sampling proposed by the present invention can effectively improve the image classification performance by training the image-brain response shared subspace. Compared with single-modal SVM classification, the average improvement is 7.43%. The performance of optimization by directly using InfoNCE loss is improved by 6.05%, which shows that the contrastive learning method of positive and negative sample sampling based on category information proposed by the present invention can efficiently realize the migration of brain cognitive information and improve image recognition in downstream complex open scenes. performance. In addition, the application paradigm of the present invention can naturally avoid the limitations of "brain-in-the-loop" applications, and greatly improves the efficiency and stability in real-world applications through "brain-out-of-the-loop" applications. Therefore, the present invention has more practical application value and has broad application prospects under the new paradigm of brain-computer information collaborative work.
表1 仿真结果Table 1 Simulation results
Figure PCTCN2022134523-appb-000006
Figure PCTCN2022134523-appb-000006
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,都应涵盖在本发明的保护范围之内。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technical field shall, within the technical scope disclosed in the present invention, be within the spirit and principles of the present invention. Any modifications, equivalent substitutions and improvements made within the above shall be included in the protection scope of the present invention.

Claims (10)

  1. 一种共享子空间学习的脑机信息融合分类方法,其特征在于,所述共享子空间学习的脑机信息融合分类方法包括训练阶段和推理阶段;其中,所述训练阶段利用成对的图像和大脑响应数据,通过正负样本采样的对比学习策略,优化图像和大脑响应的共享子空间模型参数,并训练图像分类器;所述推理阶段提取图像特征进行分类,实现整个脑机信息融合分类系统的应用目标。A brain-computer information fusion classification method for shared subspace learning, characterized in that the brain-computer information fusion classification method for shared subspace learning includes a training phase and a reasoning phase; wherein the training phase utilizes paired images and Brain response data, through the contrastive learning strategy of positive and negative sample sampling, optimizes the shared subspace model parameters of the image and brain response, and trains the image classifier; the inference stage extracts image features for classification, realizing the entire brain-computer information fusion classification system application goals.
  2. 如权利要求1所述共享子空间学习的脑机信息融合分类方法,其特征在于,所述共享子空间学习的脑机信息融合分类方法包括以下步骤:The brain-computer information fusion classification method of shared subspace learning according to claim 1, characterized in that the brain-computer information fusion classification method of shared subspace learning includes the following steps:
    步骤一,训练阶段:Step 1, training phase:
    (1)利用ResNet特征提取结构和全连接层分别构建图像和大脑响应的双流特征提取网络,作为共享子空间的特征提取模型;(1) Use the ResNet feature extraction structure and the fully connected layer to construct a dual-stream feature extraction network for image and brain response respectively, as a feature extraction model of shared subspace;
    (2)加载成对的刺激图像和大脑响应数据集,基于正负采样的对比学习方法优化共享子空间的双流网络模型参数,直至模型收敛;(2) Load paired stimulus images and brain response data sets, and optimize the parameters of the dual-stream network model of the shared subspace based on the contrastive learning method of positive and negative sampling until the model converges;
    (3)利用收敛的双流网络提取训练集刺激图像在共享子空间的图像特征集,并利用所述图像特征集训练SVM分类器;(3) Use the converged dual-stream network to extract the image feature set of the training set stimulation image in the shared subspace, and use the image feature set to train the SVM classifier;
    步骤二,推理阶段:Step 2, reasoning stage:
    (1)加载测试图像以及双流网络中的图像分支模型,提取测试图像在共享子空间中的图像特征;(1) Load the test image and the image branch model in the dual-stream network, and extract the image features of the test image in the shared subspace;
    (2)将图像特征送入SVM分类器,输出图像特征分类的概率类别。(2) Send the image features to the SVM classifier and output the probability category of the image feature classification.
  3. 如权利要求2所述共享子空间学习的脑机信息融合分类方法,其特征在于,所述步骤一中的构建共享子空间双流特征提取模型包括:The brain-computer information fusion classification method of shared subspace learning according to claim 2, wherein the construction of a shared subspace dual-stream feature extraction model in step one includes:
    1)利用PyTorch深度学习框架搭建ResNet34模型结构,去除全连接层,并添加全连接层,输入尺寸为512,输出尺寸为168维,设置模型参数“pretrained=True”,加载ImageNet预训练模型参数,作为双流网络的图像特征提取分支;1) Use the PyTorch deep learning framework to build the ResNet34 model structure, remove the fully connected layer, and add the fully connected layer. The input size is 512 and the output size is 168 dimensions. Set the model parameter "pretrained=True" and load the ImageNet pre-trained model parameters. As the image feature extraction branch of the dual-stream network;
    2)利用PyTorch深度学习框架构建三层全连接网络,输入输出尺寸均为168维,并赋随机初始化参数,作为双流网络的大脑响应特征提取分支;2) Use the PyTorch deep learning framework to build a three-layer fully connected network, with input and output sizes of 168 dimensions, and assign random initialization parameters as the brain response feature extraction branch of the dual-stream network;
    3)将图像和大脑响应特征提取模块类集成为双流网络的共用类模块。3) Integrate image and brain response feature extraction module classes into common class modules of the dual-stream network.
  4. 如权利要求2所述共享子空间学习的脑机信息融合分类方法,其特征在于,所述步骤一中的加载成对的刺激图像和大脑响应数据集包括:The brain-computer information fusion classification method of shared subspace learning according to claim 2, wherein the loading of paired stimulus images and brain response data sets in step one includes:
    1)图像数据加载的过程:1) Image data loading process:
    ①利用PyTorch的Dataset工具包加载刺激图像;①Use PyTorch’s Dataset toolkit to load stimulus images;
    ②利用torchvision的transforms工具包将图像尺寸变换为224*224,并进行随机左右翻转进行数据增强后,将读入的图像数据转换为tensor格式;②Use torchvision's transforms toolkit to transform the image size to 224*224, perform random left and right flipping for data enhancement, and then convert the read image data into tensor format;
    2)大脑响应数据的加载过程:2) Loading process of brain response data:
    ①加载大脑响应数据集,将同一刺激图像多次呈现时捕获的大脑响应求平均值;① Load the brain response data set and average the brain responses captured when the same stimulus image is presented multiple times;
    ②选择下颞叶区域放置的电极,提取出对应电极的大脑响应信号;②Select the electrodes placed in the inferior temporal lobe area and extract the brain response signals of the corresponding electrodes;
    ③在每一个电极的大脑响应信号上,沿时间维度求均值,去除时间维度的影响;③ On the brain response signal of each electrode, average the value along the time dimension to remove the influence of the time dimension;
    ④将处理后的大脑响应翻转为1*168维特征,并转换为tensor格式,作为刺激图像在IT区域每一个电极上的平均大脑响应特征;④ Flip the processed brain response into 1*168-dimensional features and convert it into tensor format as the average brain response feature of the stimulation image on each electrode in the IT area;
    3)成对图像-大脑响应数据对加载过程:3) Paired image-brain response data pair loading process:
    ①构建dataset公共类,索引到刺激图像名称信息,加载图像数据;根据图像名称索引到对应的大脑响应数据信息,加载大脑响应数据;① Construct the dataset public class, index to the stimulus image name information, and load the image data; index to the corresponding brain response data information according to the image name, and load the brain response data;
    ②返回成对的图像-大脑响应数据。②Return paired image-brain response data.
  5. 如权利要求2所述共享子空间学习的脑机信息融合分类方法,其特征在于,所述步骤一中的基于正负采样的对比学习方法优化双流网络模型参数包括:The brain-computer information fusion classification method of shared subspace learning according to claim 2, characterized in that the step 1 of optimizing the dual-stream network model parameters based on the contrastive learning method based on positive and negative sampling includes:
    1)利用PyTorch深度学习框架加载成对的图像和大脑响应数据,其中批次大小设置为256,每次加载256对数据;1) Use the PyTorch deep learning framework to load pairs of image and brain response data, with the batch size set to 256 and 256 pairs of data loaded each time;
    2)加载双流网络模型参数,前向推理,获取批次图像和大脑响应的特征集合,记为<f(v),f(b)>;2) Load the dual-stream network model parameters, perform forward inference, and obtain the feature set of batch images and brain responses, recorded as <f(v), f(b)>;
    3)对于批次中的任意图像特征f(v i),类别为c,批次中所有与其相同类别的大脑响应特征
    Figure PCTCN2022134523-appb-100001
    均为当前图像特征的正样本对,图像特征f(v i)的正样本对为
    Figure PCTCN2022134523-appb-100002
    将批次中所有与其不同类别的大脑响应特征
    Figure PCTCN2022134523-appb-100003
    不属于类别c,记为当前图像特征的负样本对,图像特征f(v i)的负样本对为
    Figure PCTCN2022134523-appb-100004
    进而获取每一个图像特征对应的正/负大脑响应特征集;
    3) For any image feature f( vi ) in the batch, the category is c, all brain response features of the same category in the batch
    Figure PCTCN2022134523-appb-100001
    are all positive sample pairs of the current image feature, and the positive sample pair of the image feature f(vi ) is
    Figure PCTCN2022134523-appb-100002
    Combine all brain response features in the batch that are different from it
    Figure PCTCN2022134523-appb-100003
    does not belong to category c, it is recorded as the negative sample pair of the current image feature, and the negative sample pair of the image feature f( vi ) is
    Figure PCTCN2022134523-appb-100004
    Then obtain the positive/negative brain response feature set corresponding to each image feature;
    4)利用InfoNCE损失函数计算批次中每一个图像特征f(v i)对应的对比损失L i4) Use the InfoNCE loss function to calculate the contrast loss Li corresponding to each image feature f(vi ) in the batch:
    Figure PCTCN2022134523-appb-100005
    Figure PCTCN2022134523-appb-100005
    其中,m和n分别表示当前图像特征f(v i)对应的大脑响应正样本和负样本数量,S(.)表 示两个特征的余弦相似度; Among them, m and n respectively represent the number of positive and negative samples of the brain response corresponding to the current image feature f(vi ) , and S(.) represents the cosine similarity of the two features;
    5)根据所述InfoNCE损失函数计算到的对比损失反向传播,优化双流网络的模型参数,直至对比损失稳定收敛。5) Back propagate the contrast loss calculated by the InfoNCE loss function and optimize the model parameters of the dual-stream network until the contrast loss converges stably.
  6. 如权利要求2所述共享子空间学习的脑机信息融合分类方法,其特征在于,所述步骤一中的采用双流网络提取图像特征训练SVM分类器包括:The brain-computer information fusion classification method of shared subspace learning according to claim 2, wherein the step one of using a dual-stream network to extract image features and train the SVM classifier includes:
    1)加载双流网络图像分支模型参数,加载训练集图像数据,进行前向推理,获取图像在共享子空间中的特征集;1) Load the dual-stream network image branch model parameters, load the training set image data, perform forward inference, and obtain the feature set of the image in the shared subspace;
    2)利用Python的sklearn工具包构建线性SVM分类器,利用提取到的图像特征训练分类器参数,并保存模型参数;2) Use Python's sklearn toolkit to build a linear SVM classifier, use the extracted image features to train the classifier parameters, and save the model parameters;
    所述步骤二中的推理阶段是脑机信息融合分类模型的应用推理过程,包括:The reasoning stage in step two is the application reasoning process of the brain-computer information fusion classification model, including:
    1)加载双流网络的图像分支模型参数,只需加载测试图像,经过图像分支模型前向推理,提取共享子空间中的图像特征;1) To load the image branch model parameters of the dual-stream network, you only need to load the test image, and extract the image features in the shared subspace through forward reasoning of the image branch model;
    2)加载SVM分类器的模型参数,将提取到的图像特征输入分类器,获取图像的分类结果。2) Load the model parameters of the SVM classifier, input the extracted image features into the classifier, and obtain the image classification results.
  7. 一种实施权利要求1~6任意一项所述共享子空间学习的脑机信息融合分类方法的脑机信息融合分类系统,其特征在于,所述脑机信息融合分类系统包括:A brain-computer information fusion classification system that implements the brain-computer information fusion classification method of shared subspace learning according to any one of claims 1 to 6, characterized in that the brain-computer information fusion classification system includes:
    数据加载装置,用于加载测试图像,并进行初步的尺寸变换,格式转换功能,以适用于输入模型;Data loading device, used to load test images and perform preliminary size transformation and format conversion functions to be suitable for the input model;
    特征提取装置,用于存储基于正负样本采样的对比学习方法训练成功的模型参数,加载输入图像数据并进行前向推理,获取共享子空间中的图像特征;Feature extraction device, used to store model parameters successfully trained by the contrastive learning method based on positive and negative sample sampling, load input image data and perform forward inference to obtain image features in the shared subspace;
    分类器装置,用于存储训练成功的SVM分类器参数,加载图像特征进行SVM分类,并输出分类结果。The classifier device is used to store the successfully trained SVM classifier parameters, load image features for SVM classification, and output the classification results.
  8. 一种计算机设备,其特征在于,所述计算机设备包括存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如下步骤:A computer device, characterized in that the computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, it causes the processor to perform the following steps:
    训练阶段利用双流网络分别将图像和大脑响应映射到同一子空间,利用成对的图像和大脑响应数据训练共享子空间的双流网络模型参数,在共享子空间提取当前批次的图像和大脑响应特征;基于类别信息的正负样本采样方法获取当前样本的正负特征集合,利用InfoNCE损失函数计算当前样本的损失值,进行优化后提取共享子空间的图像特征训练SVM分类器;推理阶段通过加载测试图像,提取共享子空间的图像特征输入SVM分类器进行分类。In the training phase, a dual-stream network is used to map images and brain responses to the same subspace respectively. Paired image and brain response data are used to train the dual-stream network model parameters of the shared subspace. The current batch of image and brain response features are extracted in the shared subspace. ; The positive and negative sample sampling method based on category information obtains the positive and negative feature set of the current sample, uses the InfoNCE loss function to calculate the loss value of the current sample, and extracts the image features of the shared subspace after optimization to train the SVM classifier; the inference phase is performed through load testing Image, extract the image features of the shared subspace and input them into the SVM classifier for classification.
  9. 一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行如下步骤:A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, it causes the processor to perform the following steps:
    训练阶段利用双流网络分别将图像和大脑响应映射到同一子空间,利用成对的图像和大脑响应数据训练共享子空间的双流网络模型参数,在共享子空间提取当前批次的图像和大脑响应特征;基于类别信息的正负样本采样方法获取当前样本的正负特征集合,利用InfoNCE损失函数计算当前样本的损失值,进行优化后提取共享子空间的图像特征训练SVM分类器;推理阶段通过加载测试图像,提取共享子空间的图像特征输入SVM分类器进行分类。In the training phase, a dual-stream network is used to map images and brain responses to the same subspace respectively. Paired image and brain response data are used to train the dual-stream network model parameters of the shared subspace. The current batch of image and brain response features are extracted in the shared subspace. ; The positive and negative sample sampling method based on category information obtains the positive and negative feature set of the current sample, uses the InfoNCE loss function to calculate the loss value of the current sample, and extracts the image features of the shared subspace after optimization to train the SVM classifier; the inference phase is performed through load testing Image, extract the image features of the shared subspace and input them into the SVM classifier for classification.
  10. 一种信息数据处理终端,其特征在于,所述信息数据处理终端用于实现如权利要求7所述脑机信息融合分类系统。An information data processing terminal, characterized in that the information data processing terminal is used to implement the brain-computer information fusion classification system as claimed in claim 7.
PCT/CN2022/134523 2022-03-16 2022-11-26 Brain-computer information fusion classification method and system for shared subspace learning WO2023173804A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210257094.5 2022-03-16
CN202210257094.5A CN114742092A (en) 2022-03-16 2022-03-16 Brain-computer information fusion classification method and system for shared subspace learning

Publications (1)

Publication Number Publication Date
WO2023173804A1 true WO2023173804A1 (en) 2023-09-21

Family

ID=82277191

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/134523 WO2023173804A1 (en) 2022-03-16 2022-11-26 Brain-computer information fusion classification method and system for shared subspace learning

Country Status (2)

Country Link
CN (1) CN114742092A (en)
WO (1) WO2023173804A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116994070A (en) * 2023-09-25 2023-11-03 四川大学 Tooth image processing method and device based on measurable subspace dynamic classifier

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114742092A (en) * 2022-03-16 2022-07-12 西安电子科技大学 Brain-computer information fusion classification method and system for shared subspace learning

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110080373A1 (en) * 2009-10-07 2011-04-07 Wintek Corporation Touch Panel and Display Device Using the Same
CN112668627A (en) * 2020-12-24 2021-04-16 四川大学 Large-scale image online clustering system and method based on contrast learning
CN113869369A (en) * 2021-08-31 2021-12-31 西安电子科技大学 Self-adaptive brain-computer information fusion classification method and system
CN113887559A (en) * 2021-08-31 2022-01-04 西安电子科技大学 Brain-computer information fusion classification method and system for brain off-loop application
CN114742092A (en) * 2022-03-16 2022-07-12 西安电子科技大学 Brain-computer information fusion classification method and system for shared subspace learning

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110080373A1 (en) * 2009-10-07 2011-04-07 Wintek Corporation Touch Panel and Display Device Using the Same
CN112668627A (en) * 2020-12-24 2021-04-16 四川大学 Large-scale image online clustering system and method based on contrast learning
CN113869369A (en) * 2021-08-31 2021-12-31 西安电子科技大学 Self-adaptive brain-computer information fusion classification method and system
CN113887559A (en) * 2021-08-31 2022-01-04 西安电子科技大学 Brain-computer information fusion classification method and system for brain off-loop application
CN114742092A (en) * 2022-03-16 2022-07-12 西安电子科技大学 Brain-computer information fusion classification method and system for shared subspace learning

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116994070A (en) * 2023-09-25 2023-11-03 四川大学 Tooth image processing method and device based on measurable subspace dynamic classifier
CN116994070B (en) * 2023-09-25 2023-12-01 四川大学 Tooth image processing method and device based on measurable subspace dynamic classifier

Also Published As

Publication number Publication date
CN114742092A (en) 2022-07-12

Similar Documents

Publication Publication Date Title
WO2023173804A1 (en) Brain-computer information fusion classification method and system for shared subspace learning
Liang et al. A survey of recent advances in transfer learning
CN111242288B (en) Multi-scale parallel deep neural network model construction method for lesion image segmentation
Shen et al. Assessing learning engagement based on facial expression recognition in MOOC’s scenario
CN112043260B (en) Electrocardiogram classification method based on local mode transformation
CN111178288B (en) Human body posture recognition method and device based on local error layer-by-layer training
Zhu et al. Big data image classification based on distributed deep representation learning model
Wu et al. Tomato Leaf Disease Identification and Detection Based on Deep Convolutional Neural Network.
Yu et al. A new image classification model based on brain parallel interaction mechanism
Zhao et al. Research and development of autism diagnosis information system based on deep convolution neural network and facial expression data
Liu et al. Facial emotion recognition based on cnn
CN113887559A (en) Brain-computer information fusion classification method and system for brain off-loop application
Huang Elderly Depression Recognition Based on Facial Micro-Expression Extraction.
CN113850012A (en) Data processing model generation method, device, medium and electronic equipment
Ge et al. Super-resolution reconstruction of biometric features recognition based on manifold learning and deep residual network
Nabijiang et al. BAM: Block attention mechanism for OCT image classification
Lv et al. Deep learning development review
Kousalya et al. Prediction of Best Optimizer for Facial Expression Detection using Convolutional Neural Network
Liu et al. Brain image recognition algorithm and high performance computing of internet of medical things based on convolutional neural network
Singh et al. Efficient representation learning for healthcare with cross-architectural self-supervision
Zhu et al. Emotion Recognition in Learning Scenes Supported by Smart Classroom and Its Application.
Geng et al. FEAIS: Facial Emotion Recognition Enabled Education Aids IoT System for Online Learning
Huang et al. Multi-feature aggregation network for salient object detection
Kamath et al. Early Detection of Alzheimer’s Disease using Convolutional Neural Network Architecture
Li et al. Application of CNN Deep Learning in Product Design Evaluation

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: 22931815

Country of ref document: EP

Kind code of ref document: A1