TWI769635B - Network training pedestrian re-identification method and storage medium - Google Patents

Network training pedestrian re-identification method and storage medium Download PDF

Info

Publication number
TWI769635B
TWI769635B TW109145593A TW109145593A TWI769635B TW I769635 B TWI769635 B TW I769635B TW 109145593 A TW109145593 A TW 109145593A TW 109145593 A TW109145593 A TW 109145593A TW I769635 B TWI769635 B TW I769635B
Authority
TW
Taiwan
Prior art keywords
network
pedestrian
identification
identification network
image data
Prior art date
Application number
TW109145593A
Other languages
Chinese (zh)
Other versions
TW202209151A (en
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 TW202209151A publication Critical patent/TW202209151A/en
Application granted granted Critical
Publication of TWI769635B publication Critical patent/TWI769635B/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes

Abstract

The embodiments of the present disclosure relate to a network training, a pedestrian re-identification method and a storage medium. The cloud server includes a first pedestrian re-identification network, and the method includes: sending to multiple side-end servers corresponding to the first pedestrian re-identification network The first network parameter; receiving the second network parameters returned by multiple side-end servers, the second network parameter is that each side-end server re-weights the second pedestrians included in itself according to the local image data set, the identity classification network and the first network parameter The recognition network is obtained by training; according to the second network parameters returned by multiple side-end servers, the first pedestrian re-recognition network is updated to obtain the updated first pedestrian re-recognition network.

Description

網路訓練、行人重識別方法、電子設備及電腦可讀存儲介質Network training, pedestrian re-identification method, electronic device and computer-readable storage medium

本發明關於電腦技術領域,尤其關於一種網路訓練、行人重識別方法、電子設備及電腦可讀儲存介質。The present invention relates to the field of computer technology, in particular to a network training, a pedestrian re-identification method, an electronic device and a computer-readable storage medium.

行人重識別(Person Re-identification),也稱為行人再識別,是利用電腦視覺技術判斷圖像或者視頻序列中是否存在特定行人的技術。目前,行人重識別技術已廣泛應用於多個領域和行業,如應用於智慧視頻檢測、智慧安保等。由於行人重識別技術在處理圖像或視頻幀序列的過程中,涉及了人臉、人體、個人身份等隱私資料,因此,亟需一種可以避免隱私資料洩露的行人重識別方法。Pedestrian re-identification, also known as pedestrian re-identification, is a technology that uses computer vision technology to determine whether there is a specific pedestrian in an image or video sequence. At present, pedestrian re-identification technology has been widely used in many fields and industries, such as smart video detection, smart security, etc. Since person re-identification technology involves private data such as face, human body, and personal identity in the process of processing images or video frame sequences, there is an urgent need for a pedestrian re-identification method that can avoid the leakage of private data.

本發明實施例提出了一種網路訓練、行人重識別方法、電子設備及以及電腦可讀儲存介質的技術方案。The embodiments of the present invention provide a network training, a pedestrian re-identification method, an electronic device, and a technical solution of a computer-readable storage medium.

根據本發明實施例的一方面,提供了一種網路訓練方法,所述方法應用於雲端伺服器,所述雲端伺服器中包括第一行人重識別網路,所述方法包括:向多個邊端伺服器發送所述第一行人重識別網路對應的第一網路參數;接收所述多個邊端伺服器返回的第二網路參數,其中,針對任一所述邊端伺服器,所述邊端伺服器中包括第二行人重識別網路、身份分類網路和本地圖像資料集,所述第二行人重識別網路和所述第一行人重識別網路具有相同的網路結構,所述第二網路參數是所述邊端伺服器根據所述本地圖像資料集、所述身份分類網路和所述第一網路參數對所述第二行人重識別網路進行訓練之後得到的;根據所述多個邊端伺服器返回的所述第二網路參數,對所述第一行人重識別網路進行更新,得到更新後的所述第一行人重識別網路。According to an aspect of the embodiments of the present invention, a network training method is provided, the method is applied to a cloud server, and the cloud server includes a first pedestrian re-identification network, and the method includes: sending to a plurality of The side server sends first network parameters corresponding to the first pedestrian re-identification network; receives second network parameters returned by the plurality of side servers, wherein for any of the side servers The edge server includes a second person re-identification network, an identity classification network and a local image data set, and the second person re-identification network and the first person re-identification network have The same network structure, the second network parameter is that the edge server re-weights the second pedestrian according to the local image data set, the identity classification network and the first network parameter. obtained after the identification network is trained; according to the second network parameters returned by the multiple edge servers, the first pedestrian re-identification network is updated to obtain the updated first pedestrian re-identification network. Pedestrian re-identification network.

在一種可能的實現方式中,所述根據所述多個邊端伺服器返回的所述第二網路參數,對所述第一行人重識別網路進行更新,得到更新後的所述第一行人重識別網路,包括:接收所述多個邊端伺服器返回的所述第二網路參數對應的權重,其中,針對任一所述邊端伺服器,所述第二網路參數對應的權重是所述邊端伺服器根據訓練前的所述第二行人重識別網路和訓練後的所述第二行人重識別網路確定得到的;根據所述多個邊端伺服器返回的所述第二網路參數對應的權重,對所述多個邊端伺服器返回的所述第二網路參數進行加權平均,得到更新後的所述第一網路參數;根據更新後的所述第一網路參數,對所述第一行人重識別網路進行更新,得到更新後的所述第一行人重識別網路。In a possible implementation manner, the first pedestrian re-identification network is updated according to the second network parameters returned by the plurality of edge servers to obtain the updated first pedestrian re-identification network. A pedestrian re-identification network includes: receiving weights corresponding to the second network parameters returned by the plurality of edge servers, wherein, for any of the edge servers, the second network The weights corresponding to the parameters are determined by the edge server according to the second pedestrian re-identification network before training and the second pedestrian re-identification network after training; according to the multiple edge servers The weights corresponding to the returned second network parameters are weighted and averaged on the second network parameters returned by the plurality of edge servers to obtain the updated first network parameters; according to the updated first network parameters; and updating the first pedestrian re-identification network to obtain the updated first pedestrian re-identification network.

在一種可能的實現方式中,所述方法還包括:向所述多個邊端伺服器發送共用圖像資料集;接收所述多個邊端伺服器返回的偽標籤,其中,針對任一所述邊端伺服器,所述偽標籤是所述邊端伺服器根據所述共用圖像資料集以及訓練後的所述第二行人重識別網路生成的;根據所述共用圖像資料集和所述多個邊端伺服器返回的偽標籤,對更新後的所述第一行人重識別網路進行訓練,得到訓練後的所述第一行人重識別網路。In a possible implementation manner, the method further includes: sending a common image data set to the multiple edge servers; receiving pseudo tags returned by the multiple edge servers, wherein for any of the edge servers the side server, the pseudo label is generated by the side server according to the shared image data set and the trained second person re-identification network; according to the shared image data set and The pseudo labels returned by the plurality of side servers are used to train the updated first pedestrian re-identification network to obtain the trained first pedestrian re-identification network.

在一種可能的實現方式中,所述根據所述共用圖像資料集和所述多個邊端伺服器返回的偽標籤,對更新後的所述第一行人重識別網路進行訓練,得到訓練後的所述第一行人重識別網路,包括:根據所述多個邊端伺服器返回的偽標籤,確定平均偽標籤;根據所述共用圖像資料集和所述平均偽標籤,對更新後的所述第一行人重識別網路進行訓練,得到訓練後的所述第一行人重識別網路。In a possible implementation manner, the updated first pedestrian re-identification network is trained according to the shared image data set and the pseudo labels returned by the plurality of side servers, to obtain The trained first pedestrian re-identification network includes: determining an average pseudo-label according to the pseudo-labels returned by the plurality of edge servers; according to the shared image data set and the average pseudo-label, The updated first pedestrian re-identification network is trained to obtain the trained first pedestrian re-identification network.

根據本發明實施例的一方面,提供了一種網路訓練方法,所述方法應用於邊端伺服器,所述邊端伺服器中包括第二行人重識別網路、身份分類網路和本地圖像資料集,所述方法包括:接收雲端伺服器發送的第一行人重識別網路對應的第一網路參數,其中,所述第一行人重識別網路和所述第二行人重識別網路具有相同的網路結構;根據所述本地圖像資料集、所述身份分類網路和所述第一網路參數,對所述第二行人重識別網路進行訓練,得到訓練後的所述第二行人重識別網路,其中,所述第二行人重識別網路對應第二網路參數;向所述雲端伺服器發送所述第二網路參數。According to an aspect of the embodiments of the present invention, a network training method is provided. The method is applied to an edge server, and the edge server includes a second pedestrian re-identification network, an identity classification network, and a local map. Like a data set, the method includes: receiving a first network parameter corresponding to a first pedestrian re-identification network sent by a cloud server, wherein the first pedestrian re-identification network and the second pedestrian re-identification network The recognition network has the same network structure; according to the local image data set, the identity classification network and the first network parameters, the second pedestrian re-identification network is trained, and the trained The second pedestrian re-identification network of , wherein the second pedestrian re-identification network corresponds to a second network parameter; the second network parameter is sent to the cloud server.

在一種可能的實現方式中,所述根據所述本地圖像資料集、所述身份分類網路和所述第一網路參數,對所述第二行人重識別網路進行訓練,得到訓練後的所述第二行人重識別網路,包括:根據所述本地圖像資料集和所述第一網路參數,對所述第二行人重識別網路和所述身份分類網路進行訓練,得到訓練後的所述第二行人重識別網路和訓練後的所述身份分類網路。In a possible implementation manner, the second pedestrian re-identification network is trained according to the local image data set, the identity classification network and the first network parameters, and the trained The second pedestrian re-identification network includes: training the second pedestrian re-identification network and the identity classification network according to the local image data set and the first network parameters, The trained second person re-identification network and the trained identity classification network are obtained.

在一種可能的實現方式中,所述方法還包括:將訓練後的所述身份分類網路儲存在所述邊端伺服器中。In a possible implementation manner, the method further includes: storing the trained identity classification network in the edge server.

在一種可能的實現方式中,所述本地圖像資料集中包括多個身份對應的圖像資料;所述身份分類網路的維度與所述多個身份的個數相關。In a possible implementation manner, the local image data set includes image data corresponding to multiple identities; the dimension of the identity classification network is related to the number of the multiple identities.

在一種可能的實現方式中,所述方法還包括:接收所述雲端伺服器發送的共用圖像資料集;根據所述共用圖像資料集和訓練後的所述第二行人重識別網路,生成偽標籤;向所述雲端伺服器發送所述偽標籤。In a possible implementation manner, the method further includes: receiving a shared image data set sent by the cloud server; according to the shared image data set and the trained second pedestrian re-identification network, Generate a pseudo-label; send the pseudo-label to the cloud server.

在一種可能的實現方式中,所述方法還包括:根據訓練前的所述第二行人重識別網路和所述本地圖像資料集確定第一特徵向量,以及根據訓練後的所述第二行人重識別網路和所述本地圖像資料集,確定第二特徵向量;確定所述第一特徵向量和所述第二特徵向量之間的餘弦距離;根據所述餘弦距離,確定所述第二網路參數對應的權重;向所述雲端伺服器發送所述第二網路參數對應的權重。In a possible implementation manner, the method further includes: determining a first feature vector according to the second person re-identification network before training and the local image data set, and determining a first feature vector according to the second person re-identification network after training and the local image data set; The pedestrian re-identification network and the local image data set determine the second feature vector; determine the cosine distance between the first feature vector and the second feature vector; determine the first feature vector according to the cosine distance. The weight corresponding to the second network parameter; sending the weight corresponding to the second network parameter to the cloud server.

在一種可能的實現方式中,所述邊端伺服器為圖像採集設備;所述本地圖像資料集是根據所述圖像採集設備採集得到的。In a possible implementation manner, the edge server is an image acquisition device; the local image data set is acquired according to the image acquisition device.

在一種可能的實現方式中,所述邊端伺服器與至少一個圖像採集設備連接,所述邊端伺服器和所述至少一個圖像採集設備位於相同地理區域範圍;所述本地圖像資料集是所述邊端伺服器從所述至少一個圖像採集設備中獲取得到的。In a possible implementation manner, the edge server is connected to at least one image acquisition device, and the edge server and the at least one image acquisition device are located in the same geographical area; the local image data The set is obtained by the edge server from the at least one image acquisition device.

根據本發明實施例的一方面,提供了一種行人重識別方法,包括:通過目標行人重識別網路對在目標地理區域範圍內獲取到的至少一幀待識別圖像進行行人重識別處理,確定行人重識別結果;其中,所述目標行人重識別網路採用如上所述的網路訓練方法訓練得到。According to an aspect of the embodiments of the present invention, there is provided a pedestrian re-identification method, comprising: performing pedestrian re-identification processing on at least one frame of an image to be identified obtained within a target geographical area through a target pedestrian re-identification network, and determining Pedestrian re-identification result; wherein, the target pedestrian re-identification network is obtained by training the above-mentioned network training method.

在一種可能的實現方式中,所述目標行人重識別網路為更新後的第一行人重識別網路或訓練後的第一行人重識別網路。In a possible implementation manner, the target pedestrian re-identification network is an updated first-person-re-identification network or a trained first-person-re-identification network.

在一種可能的實現方式中,在所述目標地理區域範圍內包括邊端伺服器,且所述邊端伺服器中包括訓練後的第二行人重識別網路的情況下,所述目標行人重識別網路為訓練後的第二行人重識別網路。In a possible implementation manner, in the case that an edge server is included in the target geographical area, and the edge server includes a trained second pedestrian re-identification network, the target pedestrian re-identification network The recognition network is the second person re-identification network after training.

根據本發明實施例的一方面,提供了一種網路訓練裝置,所述網路訓練裝置應用於雲端伺服器,所述雲端伺服器中包括第一行人重識別網路,所述裝置包括:發送部分,被配置為向多個邊端伺服器發送所述第一行人重識別網路對應的第一網路參數;接收部分,被配置為接收所述多個邊端伺服器返回的第二網路參數,其中,針對任一所述邊端伺服器,所述邊端伺服器中包括第二行人重識別網路、身份分類網路和本地圖像資料集,所述第二行人重識別網路和所述第一行人重識別網路具有相同的網路結構,所述第二網路參數是所述邊端伺服器根據所述本地圖像資料集、所述身份分類網路和所述第一網路參數對所述第二行人重識別網路進行訓練之後得到的;更新部分,被配置為根據所述多個邊端伺服器返回的所述第二網路參數,對所述第一行人重識別網路進行更新,得到更新後的所述第一行人重識別網路。According to an aspect of the embodiments of the present invention, a network training device is provided, the network training device is applied to a cloud server, the cloud server includes a first pedestrian re-identification network, and the device includes: The sending part is configured to send the first network parameters corresponding to the first pedestrian re-identification network to the plurality of side servers; the receiving part is configured to receive the first network parameters returned by the plurality of side servers. Two network parameters, wherein, for any of the edge servers, the edge server includes a second pedestrian re-identification network, an identity classification network and a local image data set, and the second pedestrian re-identification network The identification network and the first pedestrian re-identification network have the same network structure, and the second network parameter is that the edge server classifies the network according to the local image data set and the identity. obtained after training the second pedestrian re-identification network with the first network parameters; the update part is configured to, according to the second network parameters returned by the plurality of edge servers, The first pedestrian re-identification network is updated to obtain the updated first pedestrian re-identification network.

根據本發明實施例的一方面,提供了一種網路訓練裝置,所述裝置應用於邊端伺服器,所述邊端伺服器中包括第二行人重識別網路、身份分類網路和本地圖像資料集,所述裝置包括:接收部分,被配置為接收雲端伺服器發送的第一行人重識別網路對應的第一網路參數,其中,所述第一行人重識別網路和所述第二行人重識別網路具有相同的網路結構;網路訓練部分,被配置為根據所述本地圖像資料集、所述身份分類網路和所述第一網路參數,對所述第二行人重識別網路進行訓練,得到訓練後的所述第二行人重識別網路,其中,所述第二行人重識別網路對應第二網路參數;發送部分,被配置為向所述雲端伺服器發送所述第二網路參數。According to an aspect of the embodiments of the present invention, a network training apparatus is provided, the apparatus is applied to a side server, and the side server includes a second pedestrian re-identification network, an identity classification network and a local map Like a data set, the device includes: a receiving part configured to receive a first network parameter corresponding to the first pedestrian re-identification network sent by the cloud server, wherein the first pedestrian-re-identification network and The second pedestrian re-identification network has the same network structure; the network training part is configured to, according to the local image data set, the identity classification network and the first network parameters, perform a The second pedestrian re-identification network is trained, and the trained second pedestrian re-identification network is obtained, wherein the second pedestrian re-identification network corresponds to the second network parameter; the sending part is configured to send The cloud server sends the second network parameter.

根據本發明實施例的一方面,提供了一種行人重識別裝置,包括:行人重識別部分,被配置為通過目標行人重識別網路對在目標地理區域範圍內獲取到的至少一幀待識別圖像進行行人重識別處理,確定行人重識別結果;其中,所述目標行人重識別網路採用如上所述的網路訓練方法訓練得到。According to an aspect of the embodiments of the present invention, there is provided a pedestrian re-identification device, comprising: a pedestrian re-identification part configured to perform at least one frame of a to-be-identified image acquired within a target geographic area through a target pedestrian re-identification network. For example, the pedestrian re-identification process is performed, and the pedestrian re-identification result is determined; wherein, the target pedestrian re-identification network is trained by the above-mentioned network training method.

根據本發明實施例的一方面,提供了一種電子設備,包括:處理器;被配置為儲存處理器可執行指令的記憶體;其中,所述處理器被配置為調用所述記憶體儲存的指令,以執行上述方法。According to an aspect of the embodiments of the present invention, an electronic device is provided, including: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory , to perform the above method.

根據本發明實施例的一方面,提供了一種電腦可讀儲存介質,其上儲存有電腦程式指令,所述電腦程式指令被處理器執行時實現上述方法。According to an aspect of the embodiments of the present invention, there is provided a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above method is implemented.

根據本發明實施例的一方面,提供了一種電腦程式,包括電腦可讀代碼,當所述電腦可讀代碼在電子設備中運行時,所述電子設備中的處理器執行時實現上述方法。According to an aspect of the embodiments of the present invention, a computer program is provided, including computer-readable code, when the computer-readable code is executed in an electronic device, the processor in the electronic device implements the above method when executed.

在本發明實施例中,在包括第一行人重識別網路的雲端伺服器中,通過向多個邊端伺服器發送第一行人重識別網路對應的第一網路參數,以及接收多個邊端伺服器返回的第二網路參數,其中,針對任一邊端伺服器,邊端伺服器中包括和第一行人重識別網路具有相同的網路結構的第二行人重識別網路、身份分類網路和本地圖像資料集,第二網路參數是邊端伺服器根據本地圖像資料集、身份分類網路和第一網路參數對第二行人重識別網路進行訓練之後得到的,進而根據多個邊端伺服器返回的第二網路參數,對第一行人重識別網路進行更新,得到更新後的第一行人重識別網路。雲端伺服器聯合多個邊端伺服器對行人重識別網路進行訓練,訓練過程中圖像資料集仍然保存在邊端伺服器中,無需上傳至雲端伺服器,從而可以在有效訓練行人重識別網路的同時保護了資料隱私性。In the embodiment of the present invention, in the cloud server including the first person re-identification network, the first network parameters corresponding to the first person re-identification network are sent to a plurality of side servers, and the The second network parameters returned by the plurality of edge servers, wherein, for any edge server, the edge server includes a second pedestrian re-identification network having the same network structure as the first pedestrian re-identification network The network, the identity classification network and the local image data set, the second network parameter is that the edge server performs the second pedestrian re-identification network according to the local image data set, the identity classification network and the first network parameters. After the training, the first pedestrian re-identification network is updated according to the second network parameters returned by the multiple side servers, and the updated first pedestrian re-identification network is obtained. The cloud server cooperates with multiple side servers to train the pedestrian re-identification network. During the training process, the image data set is still stored in the side server and does not need to be uploaded to the cloud server, so that pedestrian re-identification can be effectively trained. The network also protects data privacy.

應當理解的是,以上的一般描述和後文的細節描述僅是示例性和解釋性的,而非限制本發明實施例。根據下面參考附圖對示例性實施例的詳細說明,本發明實施例的其它特徵及方面將變得清楚。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not limiting of embodiments of the present invention. Other features and aspects of embodiments of the present invention will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.

以下將參考附圖詳細說明本發明的各種示例性實施例、特徵和方面。附圖中相同的附圖標記表示功能相同或相似的組件。儘管在附圖中示出了實施例的各種方面,但是除非特別指出,不必按比例繪製附圖。Various exemplary embodiments, features and aspects of the present invention will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures denote components that have the same or similar functions. While various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.

在這裡專用的詞“示例性”意為“用作例子、實施例或說明性”。這裡作為“示例性”所說明的任何實施例不必解釋為優於或好於其它實施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.

本文中術語“和/或”,僅僅是一種描述關聯物件的關聯關係,表示可以存在三種關係,例如,A和/或B,可以表示:單獨存在A,同時存在A和B,單獨存在B這三種情況。另外,本文中術語“至少一種”表示多種中的任意一種或多種中的至少兩種的任意組合,例如,包括A、B、C中的至少一種,可以表示包括從A、B和C構成的集合中選擇的任意一個或多個元素。The term "and/or" in this article is only a relationship to describe related objects, which means that there can be three relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. three conditions. In addition, the term "at least one" herein refers to any combination of any one of a plurality or at least two of a plurality, for example, including at least one of A, B, and C, and may mean including those composed of A, B, and C. Any one or more elements selected in the collection.

另外,為了更好地說明本發明實施例,在下文的具體實施方式中給出了眾多的具體細節。本領域技術人員應當理解,沒有某些具體細節,本發明實施例同樣可以實施。在一些實例中,對於本領域技術人員熟知的方法、手段、組件和電路未作詳細描述,以便於凸顯本發明實施例的主旨。In addition, in order to better illustrate the embodiments of the present invention, numerous specific details are given in the following detailed description. It should be understood by those skilled in the art that the embodiments of the present invention can also be implemented without certain specific details. In some instances, methods, means, components and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the subject matter of the embodiments of the present invention.

圖1示出根據本發明實施例的一種網路訓練方法的流程圖。該網路訓練方法可以由雲端伺服器執行,雲端伺服器中包括第一行人重識別網路。在一些可能的實現方式中,該網路訓練方法可以通過雲端伺服器調用記憶體中儲存的電腦可讀指令的方式來實現。如圖1所示,該方法可以包括: 在步驟S11中,向多個邊端伺服器發送第一行人重識別網路對應的第一網路參數。 在步驟S12中,接收多個邊端伺服器返回的第二網路參數,其中,針對任一邊端伺服器,邊端伺服器中包括第二行人重識別網路、身份分類網路和本地圖像資料集,第二行人重識別網路和第一行人重識別網路具有相同的網路結構,第二網路參數是邊端伺服器根據本地圖像資料集、身份分類網路和第一網路參數對第二行人重識別網路進行訓練之後得到的。 在步驟S13中,根據多個邊端伺服器返回的第二網路參數,對第一行人重識別網路進行更新,得到更新後的第一行人重識別網路。FIG. 1 shows a flowchart of a network training method according to an embodiment of the present invention. The network training method can be executed by a cloud server, and the cloud server includes a first person re-identification network. In some possible implementations, the network training method can be implemented by the cloud server calling computer-readable instructions stored in the memory. As shown in Figure 1, the method may include: In step S11, a first network parameter corresponding to the first pedestrian re-identification network is sent to a plurality of edge servers. In step S12, the second network parameters returned by the plurality of edge servers are received, wherein, for any edge server, the edge server includes a second pedestrian re-identification network, an identity classification network and a local map Like the dataset, the second person re-identification network and the first person re-identification network have the same network structure. A network parameter obtained after training the second person re-identification network. In step S13, the first pedestrian re-identification network is updated according to the second network parameters returned by the plurality of edge servers to obtain the updated first pedestrian re-identification network.

雲端伺服器聯合多個邊端伺服器對行人重識別網路進行訓練,訓練過程中圖像資料集仍然保存在邊端伺服器中,無需上傳至雲端伺服器,從而可以在有效訓練行人重識別網路的同時保護了資料隱私性。此外,由於無需將圖像資料集上傳至雲端伺服器,可以有效節約通信頻寬。The cloud server cooperates with multiple side servers to train the pedestrian re-identification network. During the training process, the image data set is still stored in the side server and does not need to be uploaded to the cloud server, so that pedestrian re-identification can be effectively trained. The network also protects data privacy. In addition, since there is no need to upload the image data set to the cloud server, communication bandwidth can be effectively saved.

雲端伺服器聯合多個邊端伺服器對行人重識別網路進行訓練時,雲端伺服器可以基於聯邦學習演算法聯合多個邊端伺服器進行網路訓練。例如,多個社區聯合訓練一個行人重識別網路,每個社區都設置一個邊端伺服器,通過聯邦學習演算法,圖像資料集(設置在社區內部或附近的圖像採集設備採集得到的圖像資料集)仍然儲存在社區內(本地邊端伺服器),無需上傳至其它社區(其它邊端伺服器),從而保護了資料隱私性。When the cloud server cooperates with multiple side servers to train the pedestrian re-identification network, the cloud server can combine multiple side servers to perform network training based on the federated learning algorithm. For example, multiple communities jointly train a pedestrian re-recognition network, each community is set up with a side server, through the federated learning algorithm, the image data set (set in the community or nearby the image acquisition equipment collected Image datasets) are still stored in the community (local side server) and do not need to be uploaded to other communities (other side servers), thus protecting data privacy.

實際應用中,由於不同邊端伺服器中的本地圖像資料集的資料量不相同,使得不同邊端伺服器之間的資料具有異構性。傳統的聯邦學習演算法在利用多個邊端伺服器進行網路訓練時,根據不同邊端伺服器中的資料量來設置邊端伺服器中網路訓練得到的第二網路參數的權重。但是,由於資料量的多少並不能直接反映網路訓練的訓練效果,因此,雲端伺服器利用邊端伺服器中基於這種權重確定方法得到的第二網路參數的權重對第一行人重識別網路進行更新,會導致更新後的第一行人重識別網路的精度較低。In practical applications, since the data amounts of the local image data sets in different edge servers are different, the data between different edge servers is heterogeneous. When the traditional federated learning algorithm uses multiple side servers for network training, the weights of the second network parameters obtained by network training in the side servers are set according to the amount of data in different side servers. However, since the amount of data cannot directly reflect the training effect of network training, the cloud server uses the weight of the second network parameter obtained based on this weight determination method in the side server to give weight to the first pedestrian. Updating the identification network will result in a lower accuracy of the updated first pedestrian re-identification network.

在一種可能的實現方式中,根據多個邊端伺服器返回的第二網路參數,對第一行人重識別網路進行更新,得到更新後的第一行人重識別網路,包括:接收多個邊端伺服器返回的第二網路參數對應的權重,其中,針對任一邊端伺服器,第二網路參數對應的權重是邊端伺服器根據訓練前的第二行人重識別網路和訓練後的第二行人重識別網路確定得到的;根據多個邊端伺服器返回的第二網路參數對應的權重,對多個邊端伺服器返回的第二網路參數進行加權平均,得到更新後的第一網路參數;根據更新後的第一網路參數,對第一行人重識別網路進行更新,得到更新後的第一行人重識別網路。In a possible implementation manner, the first pedestrian re-identification network is updated according to the second network parameters returned by multiple side servers, and the updated first pedestrian re-identification network is obtained, including: Receive weights corresponding to the second network parameters returned by multiple side servers, wherein, for any side server, the weights corresponding to the second network parameters are the weights corresponding to the side servers based on the second pedestrian re-identification network before training. It is determined by the road and the trained second pedestrian re-identification network; according to the weights corresponding to the second network parameters returned by the multiple side servers, the second network parameters returned by the multiple side servers are weighted After averaging, the updated first network parameters are obtained; according to the updated first network parameters, the first pedestrian re-identification network is updated to obtain the updated first pedestrian re-identification network.

由於邊端伺服器發送的第二網路參數的權重是邊端伺服器根據訓練前的第二行人重識別網路和訓練後的第二行人重識別網路確定得到的,也就是說,第二網路參數的權重是根據邊端伺服器的訓練效果確定的,使得雲端伺服器根據各邊端伺服器返回的第二網路參數對應的權重,對多個邊端伺服器返回的第二網路參數進行加權平均後得到精度較高的更新後的第一網路參數,進而根據更新後的第一網路參數,對第一行人重識別網路進行更新之後,有效提高了更新後的第一行人重識別網路的精度。Since the weight of the second network parameter sent by the side server is determined by the side server according to the second pedestrian re-identification network before training and the second pedestrian re-identification network after training, that is to say, the first The weights of the second network parameters are determined according to the training effect of the side servers, so that the cloud server can use the weights corresponding to the second network parameters returned by each side server to the second network parameters returned by the multiple side servers. After the network parameters are weighted and averaged, the updated first network parameters with higher accuracy are obtained, and then the first pedestrian re-identification network is updated according to the updated first network parameters, which effectively improves the post-update. The accuracy of the first pedestrian re-identification network.

實際應用中,由於不同邊端伺服器中的本地圖像資料集是在不同場景(光照、角度)下採集得到的,使得不同邊端伺服器之間的資料具有異構性,進而導致各邊端伺服器根據本地圖像資料集、身份分類網路和第一網路參數訓練得到的訓練後的第二行人重識別網路的性能,優於雲端伺服器聯合多個邊端伺服器訓練得到的更新後的第一行人重識別網路。因此,可以基於知識蒸餾演算法,將各邊端伺服器中訓練後的第二行人重識別網路作為教師網路,將雲端伺服器中更新後的第一行人重識別網路作為學生網路,利用教師網路對學生網路進行訓練(利用更新後的第二行人重識別網路對更新後的第一行人重識別網路進行訓練),以提高第一行人重識別網路訓練過程的穩定性和收斂性。In practical applications, since the local image data sets in different side servers are collected under different scenes (lighting, angles), the data between different side servers is heterogeneous, which leads to The performance of the second pedestrian re-identification network trained by the end server based on the local image data set, the identity classification network and the first network parameters is better than that obtained by the cloud server combined with multiple end servers. The updated first pedestrian re-identification network. Therefore, based on the knowledge distillation algorithm, the second pedestrian re-identification network after training in each side server can be used as the teacher network, and the updated first pedestrian re-identification network in the cloud server can be used as the student network. Road, use the teacher network to train the student network (use the updated second person re-identification network to train the updated first-person re-identification network) to improve the first-person re-identification network Stability and convergence of the training process.

在一種可能的實現方式中,該方法還包括:向多個邊端伺服器發送共用圖像資料集;接收多個邊端伺服器返回的偽標籤,其中,針對任一邊端伺服器,偽標籤是邊端伺服器根據共用圖像資料集以及訓練後的第二行人重識別網路生成的;根據共用圖像資料集和多個邊端伺服器返回的偽標籤,對更新後的第一行人重識別網路進行訓練,得到訓練後的第一行人重識別網路。In a possible implementation manner, the method further includes: sending a common image data set to multiple edge servers; receiving pseudo tags returned by multiple edge servers, wherein, for any edge server, the pseudo tag It is generated by the side server according to the shared image data set and the trained second pedestrian re-identification network; according to the shared image data set and the pseudo labels returned by multiple side servers, the updated first line The person re-identification network is trained, and the first person re-identification network after training is obtained.

雲端伺服器接收各邊端伺服器返回的偽標籤,由於該偽標籤是邊端伺服器根據共用圖像資料集以及訓練後的第二行人重識別網路生成的,該偽標籤可以用於表示訓練後的第二行人重識別網路的網路特性,因此,根據共用圖像資料集和多個邊端伺服器返回的偽標籤,對更新後的第一行人重識別網路進行訓練,相當於綜合各邊端伺服器的網路特性對更新後的第一行人重識別網路進行訓練,從而可以有效提高第一行人重識別網路訓練過程的穩定性和收斂性。其中,共用圖像資料集指的是雲端伺服器和各邊端伺服器均可用於進行網路訓練的圖像資料集。The cloud server receives the pseudo-label returned by each side server. Since the pseudo-label is generated by the side-end server according to the shared image data set and the trained second person re-identification network, the pseudo-label can be used to represent The network characteristics of the trained second person re-identification network. Therefore, the updated first person re-identification network is trained according to the shared image data set and the pseudo-labels returned by multiple side servers. It is equivalent to synthesizing the network characteristics of each side server to train the updated first person re-identification network, which can effectively improve the stability and convergence of the first person re-identification network training process. Among them, the shared image data set refers to the image data set that both the cloud server and each side server can use for network training.

圖2示出根據本發明實施例提供的示例性的一種網路訓練的結構圖。如圖2所示,多個邊端伺服器中訓練後的第二行人重識別網路構成教師網路1、教師網路2、……、教師網路

Figure 02_image001
,其中,
Figure 02_image003
為多個邊端伺服器的個數,
Figure 02_image004
。雲端伺服器中更新後的第一行人重識別網路構成學生網路。教師網路1利用共用圖像資料集生成偽標籤
Figure 02_image006
,以及將偽標籤
Figure 02_image006
發送至雲端伺服器;將教師網路2利用共用圖像資料集生成偽標籤
Figure 02_image008
,以及將偽標籤
Figure 02_image010
發送至雲端伺服器;……;教師網路
Figure 02_image011
利用共用圖像資料集生成偽標籤
Figure 02_image012
,以及將偽標籤
Figure 02_image012
發送至雲端伺服器。雲端伺服器根據偽標籤
Figure 02_image014
、偽標籤
Figure 02_image016
、……、偽標籤
Figure 02_image012
、以及共用圖像資料集,對學生網路(更新後的第一行人重識別網路)進行訓練,得到訓練後的第一行人重識別網路。FIG. 2 shows a structural diagram of an exemplary network training provided according to an embodiment of the present invention. As shown in Figure 2, the second pedestrian re-identification network after training in multiple side servers constitutes teacher network 1, teacher network 2, ..., teacher network
Figure 02_image001
,in,
Figure 02_image003
is the number of multiple edge servers,
Figure 02_image004
. The updated first pedestrian re-identification network in the cloud server constitutes the student network. Teacher Network 1 Generates Pseudo-Labels Using Shared Image Datasets
Figure 02_image006
, and the pseudo-label
Figure 02_image006
Send to cloud server; use teacher network 2 to generate pseudo-labels using shared image data set
Figure 02_image008
, and the pseudo-label
Figure 02_image010
Send to cloud server;...;Teacher network
Figure 02_image011
Generating pseudo-labels from a shared image dataset
Figure 02_image012
, and the pseudo-label
Figure 02_image012
Sent to the cloud server. Cloud server based on pseudo tag
Figure 02_image014
, pseudo tags
Figure 02_image016
, ... , Pseudo tags
Figure 02_image012
, and the shared image data set, train the student network (the updated first person re-identification network), and obtain the first-person re-identification network after training.

在一種可能的實現方式中,根據共用圖像資料集和多個邊端伺服器返回的偽標籤,對更新後的第一行人重識別網路進行訓練,得到訓練後的第一行人重識別網路,包括:根據多個邊端伺服器返回的偽標籤,確定平均偽標籤;根據共用圖像資料集和平均偽標籤,對更新後的第一行人重識別網路進行訓練,得到訓練後的第一行人重識別網路。In a possible implementation, the updated first pedestrian re-identification network is trained according to the shared image data set and the pseudo-labels returned by multiple side servers, and the trained first pedestrian re-identification network is obtained. Identifying the network includes: determining the average pseudo-label according to the pseudo-labels returned by multiple side servers; training the updated first pedestrian re-identification network according to the shared image data set and the average pseudo-label, and obtaining The first person re-identification network after training.

例如,雲端伺服器聯合N(N>1)個邊端伺服器對第一行人重識別網路進行訓練,雲端伺服器接收第

Figure 02_image017
個邊端伺服器返回的偽標籤
Figure 02_image019
,其中,偽標籤
Figure 02_image019
是第
Figure 02_image021
個邊端伺服器根據共用圖像資料集以及第
Figure 02_image021
個邊端伺服器中訓練後的第二行人重識別網路生成的。雲伺服器根據
Figure 02_image011
個邊端伺服器返回的偽標籤,通過下述公式(1)確定平均偽標籤
Figure 02_image023
Figure 02_image025
Figure 02_image027
(1), 進而雲端伺服器根據共用圖像資料集和平均偽標籤
Figure 02_image029
,對更新後的第一行人重識別網路進行訓練,得到訓練後的第一行人重識別網路。For example, the cloud server cooperates with N (N>1) edge servers to train the first person re-identification network, and the cloud server receives the first pedestrian re-identification network.
Figure 02_image017
Pseudo tags returned by a side server
Figure 02_image019
, where the pseudo-label
Figure 02_image019
is the first
Figure 02_image021
each side server based on the shared image data set and the
Figure 02_image021
It is generated by the second person re-identification network after training in the end server. cloud server according to
Figure 02_image011
For the pseudo-tags returned by each edge server, the average pseudo-tags are determined by the following formula (1)
Figure 02_image023
:
Figure 02_image025
Figure 02_image027
(1), and then the cloud server based on the shared image data set and the average pseudo-label
Figure 02_image029
, train the updated first pedestrian re-identification network to obtain the trained first pedestrian re-identification network.

在本發明實施例中,在包括第一行人重識別網路的雲端伺服器中,通過向多個邊端伺服器發送第一行人重識別網路對應的第一網路參數,以及接收多個邊端伺服器返回的第二網路參數,其中,針對任一邊端伺服器,邊端伺服器中包括和第一行人重識別網路具有相同的網路結構的第二行人重識別網路、身份分類網路和本地圖像資料集,第二網路參數是邊端伺服器根據本地圖像資料集、身份分類網路和第一網路參數對第二行人重識別網路進行訓練之後得到的,進而根據多個邊端伺服器返回的第二網路參數,對第一行人重識別網路進行更新,得到更新後的第一行人重識別網路。雲端伺服器聯合多個邊端伺服器對行人重識別網路進行訓練,訓練過程中圖像資料集仍然保存在邊端伺服器中,無需上傳至雲端伺服器,從而可以在有效訓練行人重識別網路的同時保護了資料隱私性。In the embodiment of the present invention, in the cloud server including the first person re-identification network, the first network parameters corresponding to the first person re-identification network are sent to a plurality of side servers, and the The second network parameters returned by the plurality of edge servers, wherein, for any edge server, the edge server includes a second pedestrian re-identification network having the same network structure as the first pedestrian re-identification network The network, the identity classification network and the local image data set, the second network parameter is that the edge server performs the second pedestrian re-identification network according to the local image data set, the identity classification network and the first network parameters. After the training, the first pedestrian re-identification network is updated according to the second network parameters returned by the multiple side servers, and the updated first pedestrian re-identification network is obtained. The cloud server cooperates with multiple side servers to train the pedestrian re-identification network. During the training process, the image data set is still stored in the side server and does not need to be uploaded to the cloud server, so that pedestrian re-identification can be effectively trained. The network also protects data privacy.

圖3示出根據本發明實施例的一種網路訓練方法的流程圖。該網路訓練方法可以由邊端伺服器執行,邊端伺服器中包括第二行人重識別網路、身份分類網路和本地圖像資料集。在一些可能的實現方式中,該網路訓練方法可以通過邊端伺服器調用記憶體中儲存的電腦可讀指令的方式來實現。如圖3所示,該方法可以包括: 在步驟S31中,接收雲端伺服器發送的第一行人重識別網路對應的第一網路參數,其中,第一行人重識別網路和第二行人重識別網路具有相同的網路結構。 在步驟S32中,根據本地圖像資料集、身份分類網路和第一網路參數,對第二行人重識別網路進行訓練,得到訓練後的第二行人重識別網路,其中,第二行人重識別網路對應第二網路參數。 在步驟S33中,向雲端伺服器發送第二網路參數。FIG. 3 shows a flowchart of a network training method according to an embodiment of the present invention. The network training method can be executed by a side server, and the side server includes a second pedestrian re-identification network, an identity classification network and a local image data set. In some possible implementations, the network training method can be implemented by the side server calling computer-readable instructions stored in the memory. As shown in Figure 3, the method may include: In step S31, a first network parameter corresponding to the first pedestrian re-identification network sent by the cloud server is received, wherein the first pedestrian-re-identification network and the second pedestrian-re-identification network have the same network structure. In step S32, according to the local image data set, the identity classification network and the first network parameters, the second pedestrian re-identification network is trained to obtain a trained second pedestrian re-identification network, wherein the second pedestrian re-identification network is obtained. The pedestrian re-identification network corresponds to the second network parameter. In step S33, the second network parameter is sent to the cloud server.

邊端伺服器聯合雲端伺服器對行人重識別網路進行訓練,訓練過程中圖像資料集仍然保存在邊端伺服器中,無需上傳至雲端伺服器,從而可以在有效訓練行人重識別網路的同時保護了資料隱私性。The side server and the cloud server are used to train the pedestrian re-identification network. During the training process, the image data set is still stored in the side server and does not need to be uploaded to the cloud server, so that the pedestrian re-identification network can be effectively trained. while protecting data privacy.

在一種可能的實現方式中,邊端伺服器為圖像採集設備;本地圖像資料集是根據圖像採集設備採集得到的。In a possible implementation manner, the side server is an image acquisition device; the local image data set is acquired according to the image acquisition device.

在邊端伺服器為直接與雲端伺服器進行通信的圖像採集設備(例如,智慧攝影頭)的情況下,圖像採集設備需要具備一定的算力、儲存能力和通信能力。圖像採集設備採集圖像得到本地圖像資料集,並定時刪除清理本地圖像資料集中的失效圖像資料(例如,緩存時長超過預設閾值的圖像資料),以減少儲存壓力。圖像採集設備接收雲端伺服器發送的第一行人重識別網路對應的第一網路參數,根據本地圖像資料集和第一網路參數,對第二行人重識別網路進行訓練,得到對應第二網路參數的訓練後的第二行人重識別網路,進而向雲端伺服器發送第二網路參數。In the case where the side server is an image capture device (for example, a smart camera) that communicates directly with the cloud server, the image capture device needs to have certain computing power, storage capability, and communication capability. The image acquisition device collects images to obtain a local image data set, and periodically deletes and clears invalid image data in the local image data set (for example, image data whose cache duration exceeds a preset threshold) to reduce storage pressure. The image acquisition device receives the first network parameters corresponding to the first pedestrian re-identification network sent by the cloud server, and trains the second pedestrian re-identification network according to the local image data set and the first network parameters. The trained second pedestrian re-identification network corresponding to the second network parameter is obtained, and the second network parameter is sent to the cloud server.

在一種可能的實現方式中,邊端伺服器與至少一個圖像採集設備連接,邊端伺服器和至少一個圖像採集設備位於相同地理區域範圍;本地圖像資料集是邊端伺服器從至少一個圖像採集設備中獲取得到的。In a possible implementation manner, the edge server is connected to at least one image acquisition device, and the edge server and the at least one image acquisition device are located in the same geographical area; the local image data set is the edge server from at least one image acquisition device. obtained from an image acquisition device.

在相同地理區域範圍內設置有至少一個圖像採集設備的情況下,可以在該地理區域範圍內設置一個邊端伺服器,此時,無需該至少一個圖像採集設備具備儲存能力和算力。邊端伺服器與各圖像採集設備連接,進而從各圖像採集設備獲取圖像以構建本地圖像資料集。邊端伺服器接收雲端伺服器發送的第一行人重識別網路對應的第一網路參數,根據本地圖像資料集和第一網路參數,對第二行人重識別網路進行訓練,得到對應第二網路參數的訓練後的第二行人重識別網路,進而向雲端伺服器發送第二網路參數。In the case where at least one image acquisition device is provided within the same geographical area, an edge server may be provided within the geographical area, and in this case, the at least one image acquisition device does not need to have storage capability and computing power. The side server is connected with each image acquisition device, and further acquires images from each image acquisition device to construct a local image data set. The side server receives the first network parameters corresponding to the first pedestrian re-identification network sent by the cloud server, and trains the second pedestrian re-identification network according to the local image data set and the first network parameters. The trained second pedestrian re-identification network corresponding to the second network parameter is obtained, and the second network parameter is sent to the cloud server.

在一種可能的實現方式中,根據本地圖像資料集、身份分類網路和第一網路參數,對第二行人重識別網路進行訓練,得到訓練後的第二行人重識別網路,包括:根據本地圖像資料集和第一網路參數,對第二行人重識別網路和身份分類網路進行訓練,得到訓練後的第二行人重識別網路和訓練後的身份分類網路。In a possible implementation manner, the second person re-identification network is trained according to the local image data set, the identity classification network and the first network parameters, and the trained second person re-identification network is obtained, including : According to the local image data set and the first network parameters, the second pedestrian re-identification network and the identity classification network are trained, and the trained second pedestrian re-identification network and the trained identity classification network are obtained.

在一種可能的實現方式中,本地圖像資料集中包括多個身份對應的圖像資料;身份分類網路的維度與多個身份的個數相關。In a possible implementation manner, the local image data set includes image data corresponding to multiple identities; the dimension of the identity classification network is related to the number of multiple identities.

由於訓練後的行人重識別網路是對圖像進行身份識別的網路,因此,在對行人重識別網路進行訓練的過程中,需要用到包括多個身份對應的圖像資料的本地圖像資料集,以及身份分類網路,身份分類網路的維度與本地圖像資料集中包括的多個身份的個數相關。例如,本地圖像資料集中包括100個身份對應的圖像資料,則身份分類網路的維度為100。也就是說,身份分類網路中包括100個不同身份類別。Since the trained pedestrian re-identification network is a network for identifying images, in the process of training the pedestrian re-identification network, it is necessary to use a local map including image data corresponding to multiple identities Like datasets, and identity classification networks, the dimensions of identity classification networks are related to the number of multiple identities included in the local image dataset. For example, if the local image data set includes image data corresponding to 100 identities, the dimension of the identity classification network is 100. That is, the identity classification network includes 100 different identity classes.

邊端伺服器將本地的第二行人重識別網路和身份分類網路構建為組合網路,並利用從雲端伺服器接收到的第一網路參數和本地圖像資料集對組合網路進行訓練,進而得到訓練後的組合網路,其中,訓練後的組合網路中包括訓練後的第二行人重識別網路和訓練後的身份分類網路,訓練後的第二行人重識別網路對應第二網路參數。進而邊端伺服器將第二網路參數發送至雲端伺服器。由於第一行人重識別網路和第二行人重識別網路具有相同的網路結構,因此,可以利用第二網路參數對第一行人重識別網路進行更新。The edge server constructs the local second person re-identification network and the identity classification network as a combined network, and uses the first network parameters received from the cloud server and the local image data set to perform the combined network. After training, the combined network after training is obtained, wherein the combined network after training includes the second pedestrian re-identification network after training and the identity classification network after training, and the second pedestrian re-identification network after training. Corresponding to the second network parameter. Then, the edge server sends the second network parameter to the cloud server. Since the first person re-identification network and the second person-re-identification network have the same network structure, the first person-re-identification network can be updated by using the second network parameters.

在一種可能的實現方式中,該方法還包括:將訓練後的身份分類網路儲存在邊端伺服器中。In a possible implementation manner, the method further includes: storing the trained identity classification network in the edge server.

由於雲端伺服器中訓練得到的第一行人重識別網路在實際進行行人重識別處理過程中,無需用到分類器網路,因此,為了節約通信頻寬,以及確保基於聯邦學習演算法進行聯合訓練過程中雲端伺服器和邊端伺服器中網路結構的一致性,邊端伺服器僅將訓練後的第二行人重識別網路對應的第二網路參數發送至雲端伺服器,而將訓練後的身份分類網路儲存在邊端伺服器本地。Since the first pedestrian re-identification network trained in the cloud server does not need to use the classifier network in the actual pedestrian re-identification process, in order to save the communication bandwidth and ensure the performance based on the federated learning algorithm During the joint training process, the network structure in the cloud server and the side server is consistent. The side server only sends the second network parameters corresponding to the trained second person re-identification network to the cloud server, while Store the trained identity classification network locally on the edge server.

在一種可能的實現方式中,該方法還包括:接收雲端伺服器發送的共用圖像資料集;根據共用圖像資料集和訓練後的第二行人重識別網路,生成偽標籤;向雲端伺服器發送偽標籤。In a possible implementation manner, the method further includes: receiving a shared image data set sent by the cloud server; generating a pseudo-label according to the shared image data set and the trained second pedestrian re-identification network; The device sends a pseudo tag.

仍以上述圖2為例,如圖2所示,邊端伺服器接收雲端伺服器發送的共用圖像資料集,以及利用共用圖像資料集和本地訓練後的第二行人重識別網路生成偽標籤,進而邊端伺服器向雲端伺服器發送偽標籤,由於該偽標籤可以用於表示訓練後的第二行人重識別網路的網路特性,以使得雲端伺服器根據該偽標籤對雲端伺服器中更新後的第一行人重識別網路進行網路訓練後得到的訓練後的第一行人重識別網路,使得訓練後的第一行人重識別網路的網路性能與邊端伺服器中訓練後的第二行人重識別網路更接近,從而有效提高第一行人重識別網路訓練過程的穩定性和收斂性。Still taking the above Figure 2 as an example, as shown in Figure 2, the edge server receives the shared image data set sent by the cloud server, and uses the shared image data set and the locally trained second person re-identification network to generate pseudo-tag, and then the side server sends the pseudo-tag to the cloud server, because the pseudo-tag can be used to represent the network characteristics of the second pedestrian re-identification network after training, so that the cloud server can identify the cloud based on the pseudo-tag. The updated first person re-identification network in the server is the trained first person re-identification network obtained after network training, so that the network performance of the trained first-person re-identification network is the same as that of the first person re-identification network. The second person re-identification network after training in the side server is closer, thereby effectively improving the stability and convergence of the training process of the first person re-identification network.

在一種可能的實現方式中,該方法還包括:根據訓練前的第二行人重識別網路和本地圖像資料集確定第一特徵向量,以及根據訓練後的第二行人重識別網路和本地圖像資料集,確定第二特徵向量;確定第一特徵向量和第二特徵向量之間的餘弦距離;根據餘弦距離,確定第二網路參數對應的權重;向雲端伺服器發送第二網路參數對應的權重。In a possible implementation manner, the method further includes: determining the first feature vector according to the second person re-identification network before training and the local image data set, and determining the first feature vector according to the second person re-identification network and local image data set after training Image data set, determine the second feature vector; determine the cosine distance between the first feature vector and the second feature vector; determine the weight corresponding to the second network parameter according to the cosine distance; send the second network parameter to the cloud server The weights corresponding to the parameters.

圖4示出根據本發明實施例提供的示例性的一種確定第二網路參數的權重的示意圖。如圖4所示,邊端伺服器根據訓練前的第二行人重識別網路和本地圖像資料集生成第一特徵向量

Figure 02_image031
。邊端伺服器根據從雲端伺服器接收到的第一網路參數進行網路訓練得到訓練後的第二行人重識別網路。邊端伺服器根據訓練後的第二行人重識別網路和本地圖像資料集生成第二特徵向量
Figure 02_image033
。邊端伺服器確定第一特徵向量
Figure 02_image031
和第二特徵向量
Figure 02_image033
之間的餘弦距離
Figure 02_image035
。邊端伺服器根據餘弦距離
Figure 02_image035
確定訓練後的第二行人重識別網路對應的第二網路參數的權重。餘弦距離
Figure 02_image035
越大,表示本次網路訓練產生的變化越大,訓練效果較好,則分配較大的權重;餘弦距離
Figure 02_image035
越小,表示本次網路訓練產生的變化越小,訓練效果較差,則分配較小的權重。進而邊端伺服器將確定好的第二網路參數對應的權重發送至雲端伺服器,由於第二網路參數的權重是根據邊端伺服器中的網路訓練效果確定的,使得雲端伺服器基於該權重更新第一行人重識別網路後,可以有效提高更新後的第一行人重識別網路的精度。FIG. 4 shows an exemplary schematic diagram of determining a weight of a second network parameter according to an embodiment of the present invention. As shown in Figure 4, the edge server generates the first feature vector according to the second pedestrian re-identification network before training and the local image data set
Figure 02_image031
. The side server performs network training according to the first network parameters received from the cloud server to obtain a trained second pedestrian re-identification network. The side server generates the second feature vector according to the trained second person re-identification network and the local image data set
Figure 02_image033
. The edge server determines the first eigenvector
Figure 02_image031
and the second eigenvector
Figure 02_image033
cosine distance between
Figure 02_image035
. Edge server based on cosine distance
Figure 02_image035
Determine the weight of the second network parameter corresponding to the trained second pedestrian re-identification network. cosine distance
Figure 02_image035
The larger the value, the greater the change of the network training, the better the training effect, and the larger the weight is assigned; the cosine distance
Figure 02_image035
The smaller the value, the smaller the change produced by this network training and the poorer the training effect, the smaller the weight will be assigned. Furthermore, the side server sends the determined weight corresponding to the second network parameter to the cloud server. Since the weight of the second network parameter is determined according to the network training effect in the side server, the cloud server After updating the first person re-identification network based on the weight, the accuracy of the updated first person re-identification network can be effectively improved.

在一種可能的實現方式中,用於確定第一特徵向量

Figure 02_image031
和第二特徵向量
Figure 02_image033
的可以為本地圖像資料集的全部,也可以為本地圖像資料集的部分,本發明對此不做具體限定。In a possible implementation, for determining the first feature vector
Figure 02_image031
and the second eigenvector
Figure 02_image033
It can be the whole of the local image data set, or it can be a part of the local image data set, which is not specifically limited in the present invention.

本發明實施例中,在包括第二行人重識別網路、身份分類網路和本地圖像資料集的邊端伺服器中,通過接收雲端伺服器發送的第一行人重識別網路對應的第一網路參數,其中,第一行人重識別網路和第二行人重識別網路具有相同的網路結構,以及根據本地圖像資料集、身份分類網路和第一網路參數,對第二行人重識別網路進行訓練,得到對應第二網路參數的訓練後的第二行人重識別網路後,向雲端伺服器發送第二網路參數。邊端伺服器聯合雲端伺服器對行人重識別網路進行訓練,訓練過程中圖像資料集仍然保存在邊端伺服器中,無需上傳至雲端伺服器,從而可以在有效訓練行人重識別網路的同時保護了資料隱私性。In the embodiment of the present invention, in the edge server including the second person re-identification network, the identity classification network and the local image data set, the corresponding the first network parameters, wherein the first pedestrian re-identification network and the second pedestrian re-identification network have the same network structure, and the network and the first network parameters are classified according to the local image data set, the identity, The second pedestrian re-identification network is trained, and after the trained second pedestrian re-identification network corresponding to the second network parameters is obtained, the second network parameters are sent to the cloud server. The side server and the cloud server are used to train the pedestrian re-identification network. During the training process, the image data set is still stored in the side server and does not need to be uploaded to the cloud server, so that the pedestrian re-identification network can be effectively trained. while protecting data privacy.

在一種可能的實現方式中,雲端伺服器聯合多個邊端伺服器對行人重識別網路進行訓練時,多個邊端伺服器可以全部是直接與雲端伺服器進行通信的圖像採集設備(例如,智慧攝影頭)。圖5示出根據本發明實施例提供的示例性的一種雲端伺服器-邊端伺服器的網路結構圖。如圖5所示,與雲端伺服器連接的5個邊端伺服器均為圖像採集設備(圖像採集設備1、圖像採集設備2、圖像採集設備3、圖像採集設備4和圖像採集設備5)。在這種網路結構下,各圖像採集設備需要具備一定的算力、儲存能力和通信能力。各圖像採集設備採集圖像得到本地圖像資料集,並定時刪除清理本地圖像資料集中的失效圖像資料(例如,緩存時長超過預設閾值的圖像資料),以減少儲存壓力。雲端伺服器聯合5個作為邊端伺服器的圖像採集設備對行人重識別網路進行訓練,訓練過程中圖像資料集仍然保存在各圖像採集設備本地,無需上傳至雲端伺服器,從而可以在有效訓練行人重識別網路的同時保護了資料隱私性。In a possible implementation, when the cloud server cooperates with multiple side servers to train the pedestrian re-identification network, the multiple side servers may all be image acquisition devices that communicate directly with the cloud server ( e.g. Smart Camera). FIG. 5 shows a network structure diagram of an exemplary cloud server-edge server provided according to an embodiment of the present invention. As shown in Figure 5, the five side servers connected to the cloud server are all image capture devices (image capture device 1, image capture device 2, image capture device 3, image capture device 4 and Fig. like acquisition device 5). Under this network structure, each image acquisition device needs to have certain computing power, storage capacity and communication capacity. Each image acquisition device collects images to obtain a local image data set, and periodically deletes and clears invalid image data in the local image data set (for example, image data whose cache duration exceeds a preset threshold) to reduce storage pressure. The cloud server cooperates with 5 image acquisition devices serving as side servers to train the pedestrian re-identification network. During the training process, the image data set is still saved locally on each image acquisition device, and does not need to be uploaded to the cloud server. The data privacy can be protected while effectively training the pedestrian re-identification network.

在一種可能的實現方式中,雲端伺服器聯合多個邊端伺服器對行人重識別網路進行訓練時,多個邊端伺服器可以全部是與至少一個圖像採集設備連接的邊端伺服器,各邊端伺服器與其連接的至少一個圖像採集設備位於相同地理區域範圍。圖6示出根據本發明實施例提供的示例性的一種雲端伺服器-邊端伺服器-終端設備的網路結構圖。如圖6所示,雲端伺服器與邊端伺服器A和邊端伺服器B直接進行通信。邊端伺服器A與終端設備1和終端設備2連接,終端設備1和終端設備2為圖像採集設備(圖像採集設備1和圖像採集設備2,例如,圖像採集設備為攝影頭),邊端伺服器A、圖像採集設備1和圖像採集設備2設置在相同地理區域範圍(例如,同一社區,或同一公司),邊端伺服器A分別從圖像採集設備1和圖像採集設備2獲取圖像以構建本地圖像資料集。邊端伺服器B與終端設備3、終端設備4和終端設備5連接,終端設備3、終端設備4和終端設備5為圖像採集設備(圖像採集設備3、圖像採集設備4和圖像採集設備5,例如,圖像採集設備為攝影頭),邊端伺服器B、圖像採集設備3、圖像採集設備4和圖像採集設備5設置在相同地理區域範圍(例如,同一社區,或同一公司),邊端伺服器B分別從圖像採集設備3、圖像採集設備4和圖像採集設備5獲取圖像以構建本地圖像資料集。雲端伺服器聯合2個邊端伺服器(邊端伺服器A和邊端伺服器B)對行人重識別網路進行訓練,訓練過程中圖像資料集仍然保存在各邊端伺服器本地,無需上傳至雲端伺服器,從而可以在有效訓練行人重識別網路的同時保護了資料隱私性。In a possible implementation manner, when the cloud server cooperates with multiple side servers to train the pedestrian re-identification network, the multiple side servers may all be side servers connected to at least one image acquisition device. , each side server is located in the same geographic area with at least one image acquisition device connected to it. FIG. 6 shows an exemplary network structure diagram of a cloud server-edge server-terminal device according to an embodiment of the present invention. As shown in Figure 6, the cloud server communicates directly with the side server A and the side server B. The side server A is connected to the terminal device 1 and the terminal device 2, and the terminal device 1 and the terminal device 2 are image capture devices (image capture device 1 and image capture device 2, for example, the image capture device is a camera) , edge server A, image acquisition device 1, and image acquisition device 2 are set in the same geographic area (for example, the same community, or the same company), and edge server A collects images from image acquisition device 1 and image acquisition device 2 respectively. The acquisition device 2 acquires images to construct a local image dataset. The side server B is connected to terminal equipment 3, terminal equipment 4 and terminal equipment 5, and terminal equipment 3, terminal equipment 4 and terminal equipment 5 are image acquisition equipment (image acquisition equipment 3, image acquisition equipment 4 and image acquisition equipment The acquisition device 5, for example, the image acquisition device is a camera), the edge server B, the image acquisition device 3, the image acquisition device 4 and the image acquisition device 5 are set in the same geographical area (for example, the same community, or the same company), the side server B obtains images from the image capture device 3, the image capture device 4, and the image capture device 5 respectively to construct a local image data set. The cloud server cooperates with 2 side servers (side server A and side server B) to train the pedestrian re-identification network. During the training process, the image data set is still saved locally on each side server, without the need for Uploaded to the cloud server, which can effectively train the pedestrian re-identification network while protecting data privacy.

根據上述論述可知,本發明提出了兩種聯邦學習和行人重識別結合的訓練架構:雲邊架構和端邊雲架構。According to the above discussion, the present invention proposes two training architectures combining federated learning and person re-identification: cloud-edge architecture and device-edge-cloud architecture.

雲邊架構:雲端伺服器直接和智慧攝影頭進行通信,雲端協調多個智慧攝影頭同時進行訓練。智慧攝影頭將圖片緩存在邊端,並定時刪除清理以減少邊端伺服器的儲存壓力。且這種架構要求智慧攝影頭有一定的算力、儲存和通信能力。Cloud-side architecture: The cloud server communicates directly with the smart camera, and the cloud coordinates multiple smart cameras to train at the same time. The smart camera caches pictures on the edge, and deletes and cleans them regularly to reduce the storage pressure on the edge server. And this architecture requires the smart camera to have certain computing power, storage and communication capabilities.

雲邊端架構:邊緣閘道(即上述的邊端伺服器)連接多個智能攝影頭,雲端伺服器連接多個邊緣閘道,行人重識別訓練圖片從智慧攝影頭傳入邊緣閘道,並緩存在邊緣閘道,邊緣閘道與雲端伺服器進行聯邦學習的訓練。在這個過程中,資料仍然保留在邊緣閘道,資料隱私仍然能得到保護。其中,典型的應用場景,如多個社區聯合訓練一個行人重識別模型,每個社區都有一台邊緣閘道連接多個智慧攝影頭,通過聯邦學習的方式,資料仍然保留在社區內,不傳輸到其他社區或者雲端伺服器,以此保護了資料隱私。Cloud-side-end architecture: The edge gateway (that is, the above-mentioned side-end server) is connected to multiple smart cameras, the cloud server is connected to multiple edge gateways, and the pedestrian re-identification training image is transmitted from the smart camera to the edge gateway, and Cached in the edge gateway, the edge gateway and the cloud server are trained for federated learning. During this process, the data remains in the edge gateway, and data privacy can still be protected. Among them, typical application scenarios, such as multiple communities jointly training a pedestrian re-identification model, each community has an edge gateway connected to multiple smart cameras, through federated learning, the data is still retained in the community, not transmitted to other communities or cloud servers to protect data privacy.

在一種可能的實現方式中,雲端伺服器聯合多個邊端伺服器對行人重識別網路進行訓練時,多個邊端伺服器還可以部分是直接與雲端伺服器進行通信的圖像採集設備(例如,智慧攝影頭),部分是與至少一個圖像採集設備連接的邊端伺服器,本發明實施例對此不做具體限定。In a possible implementation manner, when the cloud server cooperates with multiple side servers to train the pedestrian re-identification network, the multiple side servers may also be partly image acquisition devices that communicate directly with the cloud server. (For example, a smart camera), part of which is an edge server connected to at least one image capture device, which is not specifically limited in this embodiment of the present invention.

圖7示出根據本發明實施例提供的示例性的一種網路訓練的結構圖。如圖7所示,雲端伺服器可以和多個邊端伺服器(邊端伺服器1、邊端伺服器2,……,邊端伺服器N)進行通信,且雲端伺服器中包括的第一行人重識別網路和邊端伺服器中包括的第二行人重識別網路具有相同的網路結構。各邊端伺服器中還包括本地圖像資料集以及身份分類網路。雲端伺服器向多個邊端伺服器發送第一行人重識別網路對應的第一網路參數,各邊端伺服器接收到第一網路參數後,利用本地圖像資料集和身份分類網路對第二行人重識別網路進行訓練,得到對應第二網路參數的訓練後的第二行人重識別網路,以及訓練後的身份分類網路。為了確保雲端伺服器和各邊端伺服器聯合訓練的網路結構一致,各邊端伺服器僅將訓練後的第二行人重識別網路對應的第二網路參數發送至雲端伺服器。雲端伺服器根據接收到的多個邊端伺服器返回的第二網路參數,對第一行人重識別網路進行更新,得到更新後的第一行人重識別網路。進而將更新後的第一行人重識別網路對應的第一網路參數發送至多個邊端伺服器進行迴圈訓練,直至雲端伺服器中更新後的第一行人重識別網路的識別精度達到閾值,或者迴圈訓練的次數達到預設次數,結束訓練。FIG. 7 shows a structural diagram of an exemplary network training provided according to an embodiment of the present invention. As shown in Fig. 7, the cloud server can communicate with multiple side servers (side server 1, side server 2, ..., side server N), and the first server included in the cloud server The person re-identification network and the second person re-identification network included in the side server have the same network structure. Each edge server also includes a local image data set and an identity classification network. The cloud server sends the first network parameters corresponding to the first pedestrian re-identification network to the multiple side servers. After receiving the first network parameters, each side server uses the local image data set and identity classification The network trains the second person re-identification network to obtain a trained second person re-identification network corresponding to the parameters of the second network, and a trained identity classification network. In order to ensure that the network structure jointly trained by the cloud server and each side server is consistent, each side server only sends the second network parameters corresponding to the trained second person re-identification network to the cloud server. The cloud server updates the first pedestrian re-identification network according to the received second network parameters returned by the plurality of side servers, and obtains the updated first pedestrian re-identification network. Then, the first network parameters corresponding to the updated first pedestrian re-identification network are sent to multiple side servers for loop training until the updated first pedestrian re-identification network is identified in the cloud server. When the accuracy reaches the threshold, or the number of loop training reaches the preset number of times, the training ends.

通用的聯邦學習演算法(Federated Averaging,FedAvg)要求進行同步的多方的模型(行人重識別深度學習模型,即上述的行人重識別網路)必須是完全一樣的。行人重識別深度學習模型的分類器層(即上述的身份分類網路)取決於每一方的資料包含多少個不同的行人,所以參與訓練的多方模型的分類器層可能會不同,導致參與聯邦學習的多方的模型可能會有區別,因此聯邦學習演算法FedAvg在上述的應用場景場景下不適用。根據上述內容可知,由於本發明中改進了聯邦學習演算法,即允許參與聯邦學習的多方的模型有部分不同,所以使聯邦學習能更好的應用在行人重識別的訓練上。The general federated learning algorithm (Federated Averaging, FedAvg) requires that the multi-party models that are synchronized (the deep learning model for person re-identification, that is, the above-mentioned person re-identification network) must be exactly the same. The classifier layer of the deep learning model for person re-identification (that is, the above-mentioned identity classification network) depends on how many different pedestrians each party's data contains, so the classifier layers of the multi-party models participating in training may be different, resulting in participation in federated learning. The multi-party models may be different, so the federated learning algorithm FedAvg is not applicable in the above application scenarios. According to the above content, because the federated learning algorithm is improved in the present invention, that is, the models of multiple parties participating in the federated learning are partially different, so the federated learning can be better applied to the training of person re-identification.

由於不同邊端伺服器中的本地圖像資料集的資料量不相同,使得不同邊端伺服器之間的資料具有異構性。在聯合多個邊端伺服器對第一行人重識別網路進行訓練時,為了降低資料異構性對更新後的第一行人重識別網路的精度的影響,在各邊端伺服器中可以採用基於訓練效果的權重確定方法來確定訓練後的第二行人重識別網路對應的第二網路參數的權重,從而使得雲端伺服器聯合各邊端伺服器返回的第二網路參數對第一行人重識別網路進行更新後,得到精度較高的更新後的第一行人重識別網路。基於訓練效果的權重確定方法的具體步驟如上述實施例相關部分所述,在此不再贅述。Since the data amount of the local image data sets in different edge servers is different, the data between different edge servers is heterogeneous. When combining multiple side servers to train the first person re-identification network, in order to reduce the influence of data heterogeneity on the accuracy of the updated first person re-identification network, each side server The weight determination method based on the training effect can be used to determine the weight of the second network parameter corresponding to the trained second pedestrian re-identification network, so that the second network parameter returned by the cloud server in conjunction with each side server After updating the first pedestrian re-identification network, an updated first-person re-identification network with higher accuracy is obtained. The specific steps of the weight determination method based on the training effect are as described in the relevant parts of the foregoing embodiments, and are not repeated here.

由於不同邊端伺服器中的本地圖像資料集是在不同場景(光照、角度)下採集得到的,使得不同邊端伺服器之間的資料具有異構性,進而導致各邊端伺服器根據本地圖像資料集和第一網路參數訓練得到的訓練後的第二行人重識別網路的性能,優於雲端伺服器聯合多個邊端伺服器訓練得到的更新後的第一行人重識別網路。為了提高第一行人重識別網路訓練過程的穩定性和收斂性,可以採用知識蒸餾演算法,基於各邊端伺服器中更新後的第二行人重識別網路、共用圖像資料集,對雲端伺服器中更新後的第一行人重識別網路進行訓練,從而有效提高了第一行人重識別網路訓練過程的穩定性和收斂性。基於知識蒸餾演算法的具體訓練過程如上述實施例相關部分所述,在此不再贅述。Since the local image data sets in different side servers are collected under different scenes (lighting, angles), the data between different side servers is heterogeneous, which leads to The performance of the trained second person re-identification network obtained by training the local image data set and the first network parameters is better than the updated first person re-identification network trained by the cloud server combined with multiple side servers. Identify the network. In order to improve the stability and convergence of the first person re-identification network training process, a knowledge distillation algorithm can be used, based on the updated second person re-identification network and shared image data set in each side server, The updated first person re-identification network in the cloud server is trained, thereby effectively improving the stability and convergence of the training process of the first person re-identification network. The specific training process based on the knowledge distillation algorithm is described in the relevant part of the above-mentioned embodiment, which is not repeated here.

基於上述內容可知,本發明提出使用知識蒸餾的方法,將參與聯邦學習的多方的本地模型當成教師模型,雲端伺服器的模型作為學生模型,用知識蒸餾的方法更好的將教師模型的知識傳遞到學生模型,以此提高了模型訓練的穩定性和收斂性。Based on the above content, it can be seen that the present invention proposes a method of using knowledge distillation. The local model of multiple parties participating in federated learning is regarded as the teacher model, and the model of the cloud server is regarded as the student model. The knowledge distillation method is used to better transfer the knowledge of the teacher model. to the student model, thereby improving the stability and convergence of model training.

在基於圖7所示的網路結構對行人重識別網路進行訓練的過程中,基於訓練效果的權重確定方法和基於知識蒸餾演算法的網路訓練可以分別單獨使用,也可以綜合使用,本發明實施例對此不做具體限定。In the process of training the pedestrian re-identification network based on the network structure shown in Figure 7, the weight determination method based on the training effect and the network training based on the knowledge distillation algorithm can be used separately or in combination. This embodiment of the invention does not specifically limit this.

在一種應用場景中,例如,在多個公司或者機構要聯合進行行人重識別網路的訓練,以提高訓練後的行人重識別網路的魯棒性的情況下,為了避免將多方資料匯總到同一個伺服器上產生的資料隱私洩露的問題,可以基於圖7所示的網路結構來對行人重識別網路進行聯合訓練,其中,多個公司或者機構作為邊端伺服器,多個公司或者機構與同一個雲端伺服器進行直接通信,訓練過程中資料仍然保存在本地,無需上傳至雲端伺服器,從而可以在雲端伺服器中通過有效訓練得到行人重識別網路的同時,保護了多個公司或者機構的資料隱私性。In an application scenario, for example, when multiple companies or institutions want to jointly train the pedestrian re-identification network to improve the robustness of the trained pedestrian re-identification network, in order to avoid aggregating data from multiple parties into For the problem of data privacy leakage on the same server, the pedestrian re-identification network can be jointly trained based on the network structure shown in Figure 7. Or the organization communicates directly with the same cloud server, and the data is still stored locally during the training process, and there is no need to upload it to the cloud server, so that the pedestrian re-identification network can be obtained through effective training in the cloud server. Data privacy of a company or organization.

在一種應用場景中,例如,公司A為公司B提供行人重識別網路的訓練服務,如果將公司B的各圖像採集設備(例如,智慧攝影頭)的圖像資料都上傳至公司A,將會產生資料隱私權洩露問題。此時,公司A可以基於圖7所示的網路結構來對行人重識別網路進行聯合訓練,公司A可以作為雲端伺服器,公司B中的各圖像採集設備可以作為多個邊端伺服器,訓練過程中資料仍然保存在公司B本地,無需上傳至公司A,從而可以在公司B中通過有效訓練得到行人重識別網路的同時保護了公司A的資料隱私性。In an application scenario, for example, company A provides company B with a pedestrian re-identification network training service. If the image data of each image acquisition device (for example, a smart camera) of company B is uploaded to company A, There will be data privacy issues. At this time, company A can jointly train the pedestrian re-identification network based on the network structure shown in Figure 7, company A can be used as a cloud server, and each image acquisition device in company B can be used as multiple side servers During the training process, the data is still stored locally in company B and does not need to be uploaded to company A, so that the pedestrian re-identification network can be obtained through effective training in company B while protecting the privacy of company A’s data.

本發明實施例還提供一種行人重識別方法。該行人重識別方法可以由終端設備或其它處理設備執行,其中,終端設備可以為圖像採集設備(例如,智慧攝影頭)、使用者設備(User Equipment,UE)、移動設備、使用者終端、終端、蜂窩電話、無線電話、個人數位助理(Personal Digital Assistant,PDA)、手持設備、計算設備、車載設備、可穿戴設備等。其它處理設備可為伺服器或雲端伺服器等。在一些可能的實現方式中,該行人重識別方法可以通過處理器調用記憶體中儲存的電腦可讀指令的方式來實現。該方法可以包括: 通過目標行人重識別網路對在目標地理區域範圍內獲取到的至少一幀待識別圖像進行行人重識別處理,確定行人重識別結果;其中,目標行人重識別網路採用前述實施例的網路訓練方法訓練得到。The embodiment of the present invention also provides a pedestrian re-identification method. The pedestrian re-identification method can be executed by a terminal device or other processing device, wherein the terminal device can be an image acquisition device (for example, a smart camera), a user equipment (User Equipment, UE), a mobile device, a user terminal, Terminals, cellular phones, wireless phones, Personal Digital Assistants (PDAs), handheld devices, computing devices, in-vehicle devices, wearable devices, etc. Other processing devices may be servers, cloud servers, or the like. In some possible implementations, the pedestrian re-identification method may be implemented by the processor calling computer-readable instructions stored in the memory. The method can include: The target pedestrian re-identification network is used to perform pedestrian re-identification processing on at least one frame of the image to be recognized obtained within the target geographical area, and the pedestrian re-identification result is determined; wherein, the target pedestrian re-identification network adopts the network of the foregoing embodiment. The road training method is trained.

目標行人重識別網路可以對目標地理區域範圍內的至少一幀待識別圖像進行行人重識別處理,確定該至少一幀待識別圖像中是否存在特性行人。The target pedestrian re-identification network can perform pedestrian re-identification processing on at least one frame of the to-be-identified image within the target geographic area, and determine whether there is a characteristic pedestrian in the at least one frame of the to-be-identified image.

在一種可能的實現方式中,目標行人重識別網路為更新後的第一行人重識別網路或訓練後的第一行人重識別網路。In a possible implementation manner, the target person re-identification network is an updated first person re-identification network or a trained first-person re-identification network.

由於雲端伺服器中更新後的第一行人重識別網路或訓練後的第一行人重識別網路具有普適性,即可以應用於任意應用場景,因此,可以利用雲端伺服器中更新後的第一行人重識別網路或訓練後的第一行人重識別網路,實現對在目標地理區域範圍內獲取到的至少一幀待識別圖像的行人重識別處理,以得到行人重識別結果。Since the updated first person re-identification network or the trained first person re-identification network in the cloud server is universal, that is, it can be applied to any application scenario, therefore, the updated first person re-identification network in the cloud server can be used. The first pedestrian re-identification network or the trained first pedestrian re-identification network can realize the pedestrian re-recognition processing of at least one frame of the image to be recognized obtained within the target geographic area, so as to obtain the pedestrian re-identification process. Identify the results.

在一種可能的實現方式中,在目標地理區域範圍內包括邊端伺服器,且邊端伺服器中包括訓練後的第二行人重識別網路的情況下,目標行人重識別網路為訓練後的第二行人重識別網路。In a possible implementation manner, in the case that a side server is included within the target geographical area, and the side server includes a trained second pedestrian re-identification network, the target pedestrian re-recognition network is the post-training network. The second pedestrian re-identification network.

結合上述雲端伺服器和邊端伺服器的網路訓練方法實施例可知,由於不同邊端伺服器中的本地圖像資料集是在不同場景(光照、角度)下採集得到的,使得不同邊端伺服器之間的資料具有異構性,不同邊端伺服器根據本地圖像資料集訓練得到的訓練後的第二行人重識別網路具有個性化,更適應本地場景,進而導致各邊端伺服器中訓練後的第二行人重識別網路的性能,優於雲端伺服器聯合多個邊端伺服器訓練得到的更新後的第一行人重識別網路。因此,在目標地理區域範圍內包括邊端伺服器,且邊端伺服器中包括訓練後的第二行人重識別網路的情況下,可以利用更適應目標地理區域範圍的本地場景的訓練後的第二行人重識別網路,對至少一幀待識別圖像進行行人重識別處理,以提高處理結果的準確性。Combining the above-mentioned embodiments of the network training method of the cloud server and the side server, it can be seen that since the local image data sets in different side servers are collected under different scenes (lighting, angles), different side servers are obtained. The data between the servers is heterogeneous. The trained second person re-identification network obtained by different side servers based on the local image data set is personalized and more suitable for the local scene, which leads to each side server The performance of the second person re-identification network trained in the server is better than that of the updated first person re-identification network trained by the cloud server combined with multiple side servers. Therefore, in the case where the end server is included in the target geographical area, and the second pedestrian re-recognition network after training is included in the end server, the trained re-identification network of the local scene that is more suitable for the target geographical area can be used. The second pedestrian re-identification network performs pedestrian re-identification processing on at least one frame of the image to be identified, so as to improve the accuracy of the processing result.

本發明中,在進行一次部署之後,能根據邊端伺服器產生的資料進行進一步訓練反覆運算,可以達到低成本的模型持續更新反覆運算。In the present invention, after one deployment, further training and repeated operations can be performed according to the data generated by the side server, so that a low-cost model can be continuously updated and repeated operations can be achieved.

可以理解,本發明實施例提及的上述各個方法實施例,在不違背原理邏輯的情況下,均可以彼此相互結合形成結合後的實施例,限於篇幅,本發明實施例不再贅述。本領域技術人員可以理解,在具體實施方式的上述方法中,各步驟的具體執行順序應當以其功能和可能的內在邏輯確定。It can be understood that the foregoing method embodiments mentioned in the embodiments of the present invention can be combined with each other to form a combined embodiment without violating the principle and logic. Those skilled in the art can understand that, in the above method of the specific embodiment, the specific execution order of each step should be determined by its function and possible internal logic.

此外,本發明實施例還提供了網路訓練/行人重識別裝置、電子設備、電腦可讀儲存介質、程式,上述均可用來實現本發明實施例提供的任一種網路訓練/行人重識別方法,相應技術方案和描述和參見方法部分的相應記載,不再贅述。In addition, the embodiments of the present invention also provide network training/pedestrian re-identification devices, electronic devices, computer-readable storage media, and programs, all of which can be used to implement any of the network training/pedestrian re-identification methods provided by the embodiments of the present invention , the corresponding technical solutions and descriptions, and refer to the corresponding records in the method section, which will not be repeated.

圖8示出根據本發明實施例的一種網路訓練裝置的方塊圖。該網路訓練裝置應用於雲端伺服器,雲端伺服器中包括第一行人重識別網路。如圖8所示,裝置80包括: 發送部分81,被配置為向多個邊端伺服器發送第一行人重識別網路對應的第一網路參數; 接收部分82,被配置為接收多個邊端伺服器返回的第二網路參數,其中,針對任一邊端伺服器,邊端伺服器中包括第二行人重識別網路、身份分類網路和本地圖像資料集,第二行人重識別網路和第一行人重識別網路具有相同的網路結構,第二網路參數是邊端伺服器根據本地圖像資料集、身份分類網路和第一網路參數對第二行人重識別網路進行訓練之後得到的; 更新部分83,被配置為根據多個邊端伺服器返回的第二網路參數,對第一行人重識別網路進行更新,得到更新後的第一行人重識別網路。FIG. 8 shows a block diagram of a network training apparatus according to an embodiment of the present invention. The network training device is applied to a cloud server, and the cloud server includes a first pedestrian re-identification network. As shown in FIG. 8, the apparatus 80 includes: The sending part 81 is configured to send the first network parameters corresponding to the first pedestrian re-identification network to the plurality of side servers; The receiving part 82 is configured to receive the second network parameters returned by the plurality of edge servers, wherein, for any edge server, the edge server includes the second pedestrian re-identification network, the identity classification network and the Local image data set, the second pedestrian re-identification network and the first pedestrian re-identification network have the same network structure, and the second network parameter is that the edge server classifies the network according to the local image data set and identity. obtained after training the second pedestrian re-identification network with the first network parameters; The updating part 83 is configured to update the first pedestrian re-identification network according to the second network parameters returned by the plurality of edge servers, so as to obtain the updated first pedestrian-re-identification network.

在一種可能的實現方式中,更新部分83,包括: 接收子部分,被配置為接收多個邊端伺服器返回的第二網路參數對應的權重,其中,針對任一邊端伺服器,第二網路參數對應的權重是邊端伺服器根據訓練前的第二行人重識別網路和訓練後的第二行人重識別網路確定得到的; 第一更新子部分,被配置為根據多個邊端伺服器返回的第二網路參數對應的權重,對多個邊端伺服器返回的第二網路參數進行加權平均,得到更新後的第一網路參數; 第二更新子部分,被配置為根據更新後的第一網路參數,對第一行人重識別網路進行更新,得到更新後的第一行人重識別網路。In one possible implementation, the update section 83 includes: The receiving subsection is configured to receive the weights corresponding to the second network parameters returned by the plurality of side servers, wherein, for any side server, the weights corresponding to the second network parameters are the weights corresponding to the side servers according to the pre-training Determined by the second person re-identification network and the trained second person re-identification network; The first update subsection is configured to perform a weighted average on the second network parameters returned by the multiple edge servers according to the weights corresponding to the second network parameters returned by the multiple edge servers to obtain the updated No. a network parameter; The second update subsection is configured to update the first pedestrian re-identification network according to the updated first network parameters to obtain the updated first pedestrian re-identification network.

在一種可能的實現方式中,發送部分81,還被配置為向多個邊端伺服器發送共用圖像資料集; 接收部分82,還被配置為接收多個邊端伺服器返回的偽標籤,其中,針對任一邊端伺服器,偽標籤是邊端伺服器根據共用圖像資料集以及訓練後的第二行人重識別網路生成的; 裝置80,還包括: 網路訓練部分,被配置為根據共用圖像資料集和多個邊端伺服器返回的偽標籤,對更新後的第一行人重識別網路進行訓練,得到訓練後的第一行人重識別網路。In a possible implementation manner, the sending part 81 is further configured to send a common image data set to a plurality of edge servers; The receiving part 82 is further configured to receive pseudo labels returned by a plurality of edge servers, wherein, for any edge server, the pseudo labels are the second pedestrian weights after training according to the shared image data set and the edge server. Identify network generated; Device 80, further comprising: The network training part is configured to train the updated first pedestrian re-identification network according to the shared image data set and the pseudo-labels returned by multiple side servers, and obtain the first pedestrian re-identification network after training. Identify the network.

在一種可能的實現方式中,網路訓練部分,還被配置為: 根據多個邊端伺服器返回的偽標籤,確定平均偽標籤; 根據共用圖像資料集和平均偽標籤,對更新後的第一行人重識別網路進行訓練,得到訓練後的第一行人重識別網路。In a possible implementation, the network training part is also configured as: Determine the average pseudo-tag according to the pseudo-tags returned by multiple edge servers; According to the shared image dataset and the average pseudo-label, the updated first person re-identification network is trained to obtain the trained first person re-identification network.

圖9示出根據本發明實施例的一種網路訓練裝置的方塊圖。該網路訓練裝置應用於邊端伺服器,邊端伺服器中包括第二行人重識別網路、身份分類網路和本地圖像資料集。如圖9所示,裝置90包括: 接收部分91,被配置為接收雲端伺服器發送的第一行人重識別網路對應的第一網路參數,其中,第一行人重識別網路和第二行人重識別網路具有相同的網路結構; 網路訓練部分92,被配置為根據本地圖像資料集、身份分類網路和第一網路參數,對第二行人重識別網路進行訓練,得到訓練後的第二行人重識別網路,其中,第二行人重識別網路對應第二網路參數; 發送部分93,被配置為向雲端伺服器發送第二網路參數。FIG. 9 shows a block diagram of a network training apparatus according to an embodiment of the present invention. The network training device is applied to a side server, and the side server includes a second pedestrian re-identification network, an identity classification network and a local image data set. As shown in FIG. 9, the apparatus 90 includes: The receiving part 91 is configured to receive the first network parameter corresponding to the first pedestrian re-identification network sent by the cloud server, wherein the first pedestrian-re-identification network and the second pedestrian-re-identification network have the same parameters. network structure; The network training part 92 is configured to train the second pedestrian re-identification network according to the local image data set, the identity classification network and the first network parameters to obtain the trained second pedestrian re-identification network, Wherein, the second pedestrian re-identification network corresponds to the second network parameter; The sending part 93 is configured to send the second network parameter to the cloud server.

在一種可能的實現方式中,網路訓練部分92,還被配置為: 根據本地圖像資料集和第一網路參數,對第二行人重識別網路和身份分類網路進行訓練,得到訓練後的第二行人重識別網路和訓練後的身份分類網路。In a possible implementation, the network training part 92 is further configured to: According to the local image data set and the first network parameters, the second person re-identification network and the identity classification network are trained, and the trained second person re-identification network and the trained identity classification network are obtained.

在一種可能的方式中,裝置90,還包括: 儲存部分,被配置為將訓練後的身份分類網路儲存在邊端伺服器中。In a possible manner, the device 90 further includes: The storage part is configured to store the trained identity classification network in the edge server.

在一種可能的方式中,本地圖像資料集中包括多個身份對應的圖像資料;身份分類網路的維度與多個身份的個數相關。In a possible manner, the local image data set includes image data corresponding to multiple identities; the dimension of the identity classification network is related to the number of multiple identities.

在一種可能的方式中: 接收部分91,還被配置為接收雲端伺服器發送的共用圖像資料集; 裝置90,還包括: 偽標籤生成部分,被配置為根據共用圖像資料集和訓練後的第二行人重識別網路,生成偽標籤; 發送部分93,還被配置為向雲端伺服器發送所述偽標籤。In one possible way: The receiving part 91 is further configured to receive the common image data set sent by the cloud server; Device 90, further comprising: The pseudo-label generation part is configured to generate pseudo-labels according to the shared image data set and the trained second pedestrian re-identification network; The sending part 93 is further configured to send the pseudo tag to the cloud server.

在一種可能的方式中,裝置90,還包括: 第一確定部分,被配置為根據訓練前的第二行人重識別網路和本地圖像資料集確定第一特徵向量,以及根據訓練後的第二行人重識別網路和本地圖像資料集,確定第二特徵向量; 第二確定部分,被配置為確定第一特徵向量和第二特徵向量之間的餘弦距離; 第三確定部分,被配置為根據餘弦距離,確定第二網路參數對應的權重; 發送部分93,還被配置為向雲端伺服器發送第二網路參數對應的權重。In a possible manner, the device 90 further includes: The first determining part is configured to determine the first feature vector according to the second pedestrian re-identification network and the local image data set before training, and to determine the first feature vector according to the second pedestrian re-identification network and the local image data set after training, determine the second eigenvector; a second determining part configured to determine a cosine distance between the first feature vector and the second feature vector; The third determination part is configured to determine the weight corresponding to the second network parameter according to the cosine distance; The sending part 93 is further configured to send the weight corresponding to the second network parameter to the cloud server.

在一種可能的方式中,邊端伺服器為圖像採集設備;本地圖像資料集是根據圖像採集設備採集得到的。In a possible manner, the side server is an image acquisition device; the local image data set is acquired according to the image acquisition device.

在一種可能的方式中,邊端伺服器與至少一個圖像採集設備連接,邊端伺服器和至少一個圖像採集設備位於相同地理區域範圍;本地圖像資料集是邊端伺服器從至少一個圖像採集設備中獲取得到的。In a possible manner, the edge server is connected with at least one image acquisition device, and the edge server and the at least one image acquisition device are located in the same geographical area; the local image data set is the edge server from at least one image acquisition device. obtained from the image acquisition device.

本發明實施例還提供一種行人重識別裝置,包括:行人重識別部分,被配置為通過目標行人重識別網路對在目標地理區域範圍內獲取到的至少一幀待識別圖像進行行人重識別處理,確定行人重識別結果;其中,目標行人重識別網路採用上述網路訓練方法訓練得到。An embodiment of the present invention further provides a pedestrian re-identification device, comprising: a pedestrian re-identification part configured to perform pedestrian re-identification on at least one frame of an image to be identified obtained within a target geographical area through a target pedestrian re-identification network process, and determine the pedestrian re-identification result; wherein, the target pedestrian re-identification network is trained by the above-mentioned network training method.

在一種可能的實現方式中,目標行人重識別網路為更新後的第一行人重識別網路或訓練後的第一行人重識別網路。In a possible implementation manner, the target person re-identification network is an updated first person re-identification network or a trained first-person re-identification network.

在一種可能的實現方式中,在目標地理區域範圍內包括邊端伺服器,且邊端伺服器中包括訓練後的第二行人重識別網路的情況下,目標行人重識別網路為訓練後的第二行人重識別網路。In a possible implementation manner, in the case that a side server is included within the target geographical area, and the side server includes a trained second pedestrian re-identification network, the target pedestrian re-recognition network is the post-training network. The second pedestrian re-identification network.

在一些實施例中,本發明實施例提供的網路訓練/行人重識別裝置具有的功能或包含的部分可以被配置為執行上文方法實施例描述的方法,其具體實現可以參照上文方法實施例的描述,為了簡潔,這裡不再贅述。In some embodiments, the functions or included parts of the network training/person re-identification apparatus provided in the embodiments of the present invention may be configured to execute the methods described in the above method embodiments, and the specific implementation may be implemented with reference to the above methods For the sake of brevity, the description of the example will not be repeated here.

在本發明實施例以及其他的實施例中,“部分”可以是部分電路、部分處理器、部分程式或軟體等等,當然也可以是單元,還可以是模組也可以是非模組化的。In the embodiments of the present invention and other embodiments, a "part" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course, a unit, a module or a non-modular form.

本發明實施例還提出一種電腦可讀儲存介質,其上儲存有電腦程式指令,所述電腦程式指令被處理器執行時實現上述方法。電腦可讀儲存介質可以是非易失性電腦可讀儲存介質。An embodiment of the present invention further provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above-mentioned method is implemented. The computer-readable storage medium may be a non-volatile computer-readable storage medium.

本發明實施例還提出一種電子設備,包括:處理器;被配置為儲存處理器可執行指令的記憶體;其中,所述處理器被配置為調用所述記憶體儲存的指令,以執行上述方法。An embodiment of the present invention further provides an electronic device, including: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to execute the above method .

本發明實施例還提供了一種電腦程式產品,包括電腦可讀代碼,在電腦可讀代碼在設備上運行的情況下,設備中的處理器執行用於實現如上任一實施例提供的網路訓練/行人重識別方法的指令。Embodiments of the present invention also provide a computer program product, including computer-readable codes. When the computer-readable codes are run on a device, a processor in the device executes the network training for implementing the network training provided in any of the above embodiments. /Directive for pedestrian re-identification methods.

本發明實施例還提供了另一種電腦程式產品,被配置為儲存電腦可讀指令,指令被執行時使得電腦執行上述任一實施例提供的網路訓練/行人重識別方法的操作。Embodiments of the present invention also provide another computer program product configured to store computer-readable instructions, which, when executed, cause the computer to execute the operations of the network training/pedestrian re-identification method provided by any of the above embodiments.

電子設備可以被提供為終端、伺服器或其它形態的設備。The electronic device may be provided as a terminal, server or other form of device.

圖10示出根據本發明實施例的一種電子設備的方塊圖。如圖10所示,電子設備800可以是圖像採集設備(例如,智慧攝影頭)、行動電話,電腦,數位廣播終端,消息收發設備,遊戲控制台,平板設備,醫療設備,健身設備,個人數位助理等終端。FIG. 10 shows a block diagram of an electronic device according to an embodiment of the present invention. As shown in FIG. 10, the electronic device 800 may be an image capture device (eg, a smart camera), a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal Terminals such as digital assistants.

參照圖10,電子設備800可以包括以下一個或多個組件:處理組件802,記憶體804,電源組件806,多媒體組件808,音頻組件810,輸入/輸出(I/ O)的介面812,感測器組件814,以及通信組件816。10, an electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensing server component 814, and communication component 816.

處理組件802通常控制電子設備800的整體操作,諸如與顯示,電話呼叫,資料通信,相機操作和記錄操作相關聯的操作。處理組件802可以包括一個或多個處理器820來執行指令,以完成上述的方法的全部或部分步驟。此外,處理組件802可以包括一個或多個模組,便於處理組件802和其他組件之間的交互。例如,處理組件802可以包括多媒體模組,以方便多媒體組件808和處理組件802之間的交互。The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 can include one or more processors 820 to execute instructions to perform all or some of the steps of the methods described above. Additionally, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.

記憶體804被配置為儲存各種類型的資料以支援在電子設備800的操作。這些資料的示例包括用於在電子設備800上操作的任何應用程式或方法的指令,連絡人資料,電話簿資料,消息,圖片,視頻等。記憶體804可以由任何類型的易失性或非易失性存放裝置或者它們的組合實現,如靜態隨機存取記憶體(SRAM),電可擦除可程式設計唯讀記憶體(EEPROM),可擦除可程式設計唯讀記憶體(EPROM),可程式設計唯讀記憶體(PROM),唯讀記憶體(ROM),磁記憶體,快閃記憶體,磁片或光碟。The memory 804 is configured to store various types of data to support the operation of the electronic device 800 . Examples of such data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like. Memory 804 may be implemented by any type of volatile or non-volatile storage device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Disk or CD.

電源組件806為電子設備800的各種組件提供電力。電源組件806可以包括電源管理系統,一個或多個電源,及其他與為電子設備800生成、管理和分配電力相關聯的組件。Power supply assembly 806 provides power to various components of electronic device 800 . Power supply components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800 .

多媒體組件808包括在所述電子設備800和使用者之間的提供一個輸出介面的螢幕。在一些實施例中,螢幕可以包括液晶顯示器(LCD)和觸摸面板(TP)。如果螢幕包括觸摸面板,螢幕可以被實現為觸控式螢幕,以接收來自使用者的輸入信號。觸摸面板包括一個或多個觸摸感測器以感測觸摸、滑動和觸摸面板上的手勢。所述觸摸感測器可以不僅感測觸摸或滑動動作的邊界,而且還檢測與所述觸摸或滑動操作相關的持續時間和壓力。在一些實施例中,多媒體組件808包括一個前置攝影頭和/或後置攝影頭。當電子設備800處於操作模式,如拍攝模式或視訊模式時,前置攝影頭和/或後置攝影頭可以接收外部的多媒體資料。每個前置攝影頭和後置攝影頭可以是一個固定的光學透鏡系統或具有焦距和光學變焦能力。Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 808 includes a front-facing camera and/or a rear-facing camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.

音頻組件810被配置為輸出和/或輸入音頻信號。例如,音頻組件810包括一個麥克風(MIC),當電子設備800處於操作模式,如呼叫模式、記錄模式和語音辨識模式時,麥克風被配置為接收外部音頻信號。所接收的音頻信號可以被進一步儲存在記憶體804或經由通信組件816發送。在一些實施例中,音頻組件810還包括一個揚聲器,用於輸出音頻信號。Audio component 810 is configured to output and/or input audio signals. For example, audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when electronic device 800 is in operating modes, such as call mode, recording mode, and voice recognition mode. The received audio signal may be further stored in memory 804 or transmitted via communication component 816 . In some embodiments, audio component 810 also includes a speaker for outputting audio signals.

I/ O介面812為處理組件802和週邊介面模組之間提供介面,上述週邊介面模組可以是鍵盤,點擊輪,按鈕等。這些按鈕可包括但不限於:主頁按鈕、音量按鈕、啟動按鈕和鎖定按鈕。The I/O interface 812 provides an interface between the processing element 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, and the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.

感測器組件814包括一個或多個感測器,用於為電子設備800提供各個方面的狀態評估。例如,感測器組件814可以檢測到電子設備800的打開/關閉狀態,組件的相對定位,例如所述組件為電子設備800的顯示器和小鍵盤,感測器組件814還可以檢測電子設備800或電子設備800一個組件的位置改變,使用者與電子設備800接觸的存在或不存在,電子設備800方位或加速/減速和電子設備800的溫度變化。感測器組件814可以包括接近感測器,被配置用來在沒有任何的物理接觸時檢測附近物體的存在。感測器組件814還可以包括光感測器,如互補金屬氧化物半導體(CMOS)或電荷耦合裝置(CCD)圖像感測器,用於在成像應用中使用。在一些實施例中,該感測器組件814還可以包括加速度感測器,陀螺儀感測器,磁感測器,壓力感測器或溫度感測器。Sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for electronic device 800 . For example, the sensor assembly 814 can detect the open/closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, the sensor assembly 814 can also detect the electronic device 800 or Changes in the position of a component of the electronic device 800 , presence or absence of user contact with the electronic device 800 , orientation or acceleration/deceleration of the electronic device 800 and changes in the temperature of the electronic device 800 . Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 814 may also include a light sensor, such as a complementary metal oxide semiconductor (CMOS) or charge coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

通信組件816被配置為便於電子設備800和其他設備之間有線或無線方式的通信。電子設備800可以接入基於通信標準的無線網路,如無線網路(WiFi),第二代移動通信技術(2G)或第三代移動通信技術(3G),或它們的組合。在一個示例性實施例中,通信組件816經由廣播通道接收來自外部廣播管理系統的廣播信號或廣播相關資訊。在一個示例性實施例中,所述通信組件816還包括近場通信(NFC)模組,以促進短程通信。例如,在NFC模組可基於射頻識別(RFID)技術,紅外資料協會(IrDA)技術,超寬頻(UWB)技術,藍牙(BT)技術和其他技術來實現。Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as wireless network (WiFi), second generation mobile communication technology (2G) or third generation mobile communication technology (3G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

在示例性實施例中,電子設備800可以被一個或多個應用專用積體電路(ASIC)、數位信號處理器(DSP)、數位信號處理設備(DSPD)、可程式設計邏輯器件(PLD)、現場可程式設計閘陣列(FPGA)、控制器、微控制器、微處理器或其他電子組件實現,用於執行上述方法。In an exemplary embodiment, electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the above method.

在示例性實施例中,還提供了一種非易失性電腦可讀儲存介質,例如包括電腦程式指令的記憶體804,上述電腦程式指令可由電子設備800的處理器820執行以完成上述方法。In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 including computer program instructions executable by the processor 820 of the electronic device 800 to accomplish the above method.

圖11示出根據本發明實施例的一種電子設備的方塊圖。如圖11所示,電子設備1900可以被提供為一伺服器。參照圖11,電子設備1900包括處理組件1922,其進一步包括一個或多個處理器,以及由記憶體1932所代表的記憶體資源,用於儲存可由處理組件1922的執行的指令,例如應用程式。記憶體1932中儲存的應用程式可以包括一個或一個以上的每一個對應於一組指令的模組。此外,處理組件1922被配置為執行指令,以執行上述方法。FIG. 11 shows a block diagram of an electronic device according to an embodiment of the present invention. As shown in FIG. 11, the electronic device 1900 may be provided as a server. 11, the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions executable by the processing component 1922, such as applications. An application program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Additionally, the processing component 1922 is configured to execute instructions to perform the above-described methods.

電子設備1900還可以包括一個電源組件1926被配置為執行電子設備1900的電源管理,一個有線或無線網路介面1950被配置為將電子設備1900連接到網路,和一個輸入輸出(I/O)介面1958。電子設備1900可以操作基於儲存在記憶體1932的作業系統,例如微軟伺服器作業系統(Windows ServerTM ),蘋果公司推出的基於圖形化使用者介面作業系統(Mac OS XTM ),多使用者多進程的電腦作業系統(UnixTM ),自由和開放原代碼的類Unix作業系統(LinuxTM ),開放原代碼的類Unix作業系統(FreeBSDTM )或類似。The electronic device 1900 may also include a power supply assembly 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input output (I/O) Interface 1958. The electronic device 1900 can operate an operating system based on the memory 1932, such as Microsoft Server Operating System (Windows Server TM ), a graphical user interface based operating system (Mac OS X TM ) introduced by Apple Inc. Process Computer Operating System (Unix ), Free and Open Source Unix-like Operating System (Linux ), Open Source Unix-like Operating System (FreeBSD ) or the like.

在示例性實施例中,還提供了一種非易失性電腦可讀儲存介質,例如包括電腦程式指令的記憶體1932,上述電腦程式指令可由電子設備1900的處理組件1922執行以完成上述方法。In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions executable by the processing component 1922 of the electronic device 1900 to accomplish the above method.

本發明實施例可以是系統、方法和/或電腦程式產品。電腦程式產品可以包括電腦可讀儲存介質,其上載有用於使處理器實現本發明實施例的各個方面的電腦可讀程式指令。Embodiments of the present invention may be systems, methods and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the embodiments of the present invention.

電腦可讀儲存介質可以是可以保持和儲存由指令執行設備使用的指令的有形設備。電腦可讀儲存介質例如可以是(但不限於)電存放裝置、磁存放裝置、光存放裝置、電磁存放裝置、半導體存放裝置或者上述的任意合適的組合。電腦可讀儲存介質的更具體的例子(非窮舉的列表)包括:可擕式電腦盤、硬碟、隨機存取記憶體(RAM)、唯讀記憶體(ROM)、可擦式可程式設計唯讀記憶體(EPROM或快閃記憶體)、靜態隨機存取記憶體(SRAM)、可擕式壓縮磁碟唯讀記憶體(CD-ROM)、數位多功能盤(DVD)、記憶棒、軟碟、機械編碼設備、例如其上儲存有指令的打孔卡或凹槽內凸起結構、以及上述的任意合適的組合。這裡所使用的電腦可讀儲存介質不被解釋為暫態信號本身,諸如無線電波或者其他自由傳播的電磁波、通過波導或其他傳輸媒介傳播的電磁波(例如,通過光纖電纜的光脈衝)、或者通過電線傳輸的電信號。A computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable Design read only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory stick , a floppy disk, a mechanically encoded device, such as a punched card or a raised structure in a groove with instructions stored thereon, and any suitable combination of the foregoing. As used herein, computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or Electrical signals carried by wires.

這裡所描述的電腦可讀程式指令可以從電腦可讀儲存介質下載到各個計算/處理設備,或者通過網路、例如網際網路、局域網、廣域網路和/或無線網下載到外部電腦或外部存放裝置。網路可以包括銅傳輸電纜、光纖傳輸、無線傳輸、路由器、防火牆、交換機、閘道電腦和/或邊緣伺服器。每個計算/處理設備中的網路介面卡或者網路介面從網路接收電腦可讀程式指令,並轉發該電腦可讀程式指令,以供儲存在各個計算/處理設備中的電腦可讀儲存介質中。The computer-readable program instructions described herein may be downloaded from computer-readable storage media to various computing/processing devices, or downloaded to external computers or external storage over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network device. Networks may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers and/or edge servers. A network interface card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for computer-readable storage stored in each computing/processing device in the medium.

用於執行本發明實施例操作的電腦程式指令可以是彙編指令、指令集架構(ISA)指令、機器指令、機器相關指令、微代碼、固件指令、狀態設置資料、或者以一種或多種程式設計語言的任意組合編寫的原始程式碼或目標代碼,所述程式設計語言包括物件導向的程式設計語言—諸如Smalltalk、C++等,以及常規的過程式程式設計語言—諸如“C”語言或類似的程式設計語言。電腦可讀程式指令可以完全地在使用者電腦上執行、部分地在使用者電腦上執行、作為一個獨立的套裝軟體執行、部分在使用者電腦上部分在遠端電腦上執行、或者完全在遠端電腦或伺服器上執行。在涉及遠端電腦的情形中,遠端電腦可以通過任意種類的網路—包括局域網(LAN)或廣域網路(WAN)—連接到使用者電腦,或者,可以連接到外部電腦(例如利用網際網路服務提供者來通過網際網路連接)。在一些實施例中,通過利用電腦可讀程式指令的狀態資訊來個性化定制電子電路,例如可程式設計邏輯電路、現場可程式設計閘陣列(FPGA)或可程式設計邏輯陣列(PLA),該電子電路可以執行電腦可讀程式指令,從而實現本發明實施例的各個方面。Computer program instructions for carrying out the operations of embodiments of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state setting data, or in one or more programming languages Source or object code written in any combination of programming languages including object-oriented programming languages - such as Smalltalk, C++, etc., and conventional procedural programming languages - such as the "C" language or similar programming language. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely remotely. run on a client computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network—including a local area network (LAN) or a wide area network (WAN)—or, can be connected to an external computer (for example, using the Internet road service provider to connect via the Internet). In some embodiments, electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing state information of computer readable program instructions. Electronic circuits may execute computer-readable program instructions to implement various aspects of the embodiments of the present invention.

這裡參照根據本發明實施例的方法、裝置(系統)和電腦程式產品的流程圖和/或方塊圖描述了本發明實施例的各個方面。應當理解,流程圖和/或方塊圖的每個方塊以及流程圖和/或方塊圖中各方塊的組合,都可以由電腦可讀程式指令實現。Aspects of embodiments of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.

這些電腦可讀程式指令可以提供給通用電腦、專用電腦或其它可程式設計資料處理裝置的處理器,從而生產出一種機器,使得這些指令在通過電腦或其它可程式設計資料處理裝置的處理器執行時,產生了實現流程圖和/或方塊圖中的一個或多個方塊中規定的功能/動作的裝置。也可以把這些電腦可讀程式指令儲存在電腦可讀儲存介質中,這些指令使得電腦、可程式設計資料處理裝置和/或其他設備以特定方式工作,從而,儲存有指令的電腦可讀介質則包括一個製造品,其包括實現流程圖和/或方塊圖中的一個或多個方塊中規定的功能/動作的各個方面的指令。These computer readable program instructions may be provided to the processor of a general purpose computer, special purpose computer or other programmable data processing device to produce a machine for execution of the instructions by the processor of the computer or other programmable data processing device When, means are created that implement the functions/acts specified in one or more of the blocks in the flowchart and/or block diagrams. These computer readable program instructions may also be stored on a computer readable storage medium, the instructions causing the computer, programmable data processing device and/or other equipment to operate in a particular manner, so that the computer readable medium storing the instructions Included is an article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.

也可以把電腦可讀程式指令載入到電腦、其它可程式設計資料處理裝置、或其它設備上,使得在電腦、其它可程式設計資料處理裝置或其它設備上執行一系列操作步驟,以產生電腦實現的過程,從而使得在電腦、其它可程式設計資料處理裝置、或其它設備上執行的指令實現流程圖和/或方塊圖中的一個或多個方塊中規定的功能/動作。Computer readable program instructions can also be loaded into a computer, other programmable data processing device, or other equipment, so that a series of operational steps are performed on the computer, other programmable data processing device, or other equipment to generate a computer Processes of implementation such that instructions executing on a computer, other programmable data processing apparatus, or other device implement the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.

附圖中的流程圖和方塊圖顯示了根據本發明實施例的多個實施例的系統、方法和電腦程式產品的可能實現的體系架構、功能和操作。在這點上,流程圖或方塊圖中的每個方塊可以代表一個模組、程式段或指令的一部分,所述模組、程式段或指令的一部分包含一個或多個用於實現規定的邏輯功能的可執行指令。在有些作為替換的實現中,方塊中所標注的功能也可以以不同於附圖中所標注的順序發生。例如,兩個連續的方塊實際上可以基本並行地執行,它們有時也可以按相反的循序執行,這依所涉及的功能而定。也要注意的是,方塊圖和/或流程圖中的每個方塊、以及方塊圖和/或流程圖中的方塊的組合,可以用執行規定的功能或動作的專用的基於硬體的系統來實現,或者可以用專用硬體與電腦指令的組合來實現。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions that contains one or more logic for implementing the specified logic Executable instructions for the function. In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by dedicated hardware-based systems that perform the specified functions or actions. implementation, or may be implemented in a combination of special purpose hardware and computer instructions.

該電腦程式產品可以具體通過硬體、軟體或其結合的方式實現。在一個可選實施例中,所述電腦程式產品具體體現為電腦儲存介質,在另一個可選實施例中,電腦程式產品具體體現為軟體產品,例如軟體發展包(Software Development Kit,SDK)等等。The computer program product can be implemented by hardware, software or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), etc. Wait.

以上已經描述了本發明的各實施例,上述說明是示例性的,並非窮盡性的,並且也不限於所披露的各實施例。在不偏離所說明的各實施例的範圍和精神的情況下,對於本技術領域的普通技術人員來說許多修改和變更都是顯而易見的。本文中所用術語的選擇,旨在最好地解釋各實施例的原理、實際應用或對市場中的技術的改進,或者使本技術領域的其它普通技術人員能理解本文披露的各實施例。Various embodiments of the present invention have been described above, and the foregoing descriptions are exemplary, not exhaustive, and not limiting of the disclosed embodiments. Numerous modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or improvement over the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

工業實用性 本發明實施例涉及一種網路訓練、行人重識別方法及裝置、儲存介質、電腦程式,雲端伺服器中包括第一行人重識別網路,所述方法包括:向多個邊端伺服器發送第一行人重識別網路對應的第一網路參數;接收多個邊端伺服器返回的第二網路參數,其中,針對任一邊端伺服器,邊端伺服器中包括第二行人重識別網路、身份分類網路和本地圖像資料集,第二行人重識別網路和第一行人重識別網路具有相同的網路結構,第二網路參數是邊端伺服器根據本地圖像資料集、身份分類網路和第一網路參數對第二行人重識別網路進行訓練之後得到的;根據多個邊端伺服器返回的第二網路參數,對第一行人重識別網路進行更新,得到更新後的第一行人重識別網路。由於雲端伺服器聯合多個邊端伺服器對行人重識別網路進行訓練,訓練過程中圖像資料集仍然保存在邊端伺服器中,無需上傳至雲端伺服器,從而可以在有效訓練行人重識別網路的同時保護資料隱私性。Industrial Applicability Embodiments of the present invention relate to a network training, pedestrian re-identification method and device, storage medium, and computer program. The cloud server includes a first pedestrian re-identification network, and the method includes: sending a message to a plurality of side servers. The first pedestrian re-identifies the first network parameters corresponding to the network; and receives the second network parameters returned by multiple side servers, wherein, for any side server, the side server includes the second pedestrian weight. Identification network, identity classification network and local image data set, the second pedestrian re-identification network and the first pedestrian re-identification network have the same network structure, and the second network parameter is the edge server according to the local The image data set, the identity classification network and the first network parameters are obtained after training the second pedestrian re-identification network; The identification network is updated, and the updated first pedestrian re-identification network is obtained. Since the cloud server cooperates with multiple side servers to train the pedestrian re-identification network, the image data set is still stored in the side server during the training process, and does not need to be uploaded to the cloud server, so that the pedestrian re-identification network can be effectively trained. Identify networks while protecting data privacy.

80:網路訓練裝置 81:發送部分 82:接收部分 83:更新部分 90:網路訓練裝置 91:接收部分 92:網路訓練部分 93:發送部分 800:電子設備 802:處理組件 804:記憶體 806:電源組件 808:多媒體組件 810:音頻組件 812:輸入/輸出介面 814:感測器組件 816:通信組件 820:處理器 1900:電子設備 1922:電子設備 1926:電源組件 1932:記憶體 1950:網路介面 1958:輸入輸出介面 S11~S13:步驟 S31~S33:步驟80: Network training device 81: Send part 82: Receive part 83: Update section 90: Network training device 91: Receive part 92: Network training part 93: Send part 800: Electronics 802: Process component 804: memory 806: Power Components 808: Multimedia Components 810: Audio Components 812: Input/Output Interface 814: Sensor Assembly 816: Communication Components 820: Processor 1900: Electronic equipment 1922: Electronic Devices 1926: Power Components 1932: Memory 1950: Web Interface 1958: Input and output interface S11~S13: Steps S31~S33: Steps

此處的附圖被併入說明書中並構成本說明書的一部分,這些附圖示出了符合本發明的實施例,並與說明書一起用於說明本發明實施例的技術方案。 圖1示出根據本發明實施例的一種網路訓練方法的流程圖; 圖2示出根據本發明實施例提供的示例性的一種網路訓練的結構圖; 圖3示出根據本發明實施例的一種網路訓練方法的流程圖; 圖4示出根據本發明實施例提供的示例性的一種確定第二網路參數的權重的示意圖; 圖5示出根據本發明實施例提供的示例性的一種雲端伺服器-邊端伺服器的網路結構圖; 圖6示出根據本發明實施例提供的示例性的一種雲端伺服器-邊端伺服器-終端設備的網路結構圖; 圖7示出根據本發明實施例提供的示例性的一種網路訓練的結構圖; 圖8示出根據本發明實施例的一種網路訓練裝置的方塊圖; 圖9示出根據本發明實施例的一種網路訓練裝置的方塊圖; 圖10示出根據本發明實施例的一種電子設備的方塊圖; 圖11示出根據本發明實施例的一種電子設備的方塊圖。The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, and these drawings illustrate embodiments consistent with the present invention, and together with the description, serve to explain the technical solutions of the embodiments of the present invention. 1 shows a flowchart of a network training method according to an embodiment of the present invention; FIG. 2 shows a structural diagram of an exemplary network training provided according to an embodiment of the present invention; 3 shows a flowchart of a network training method according to an embodiment of the present invention; FIG. 4 shows an exemplary schematic diagram of determining a weight of a second network parameter according to an embodiment of the present invention; FIG. 5 shows a network structure diagram of an exemplary cloud server-side server provided according to an embodiment of the present invention; 6 shows an exemplary network structure diagram of a cloud server-side server-terminal device according to an embodiment of the present invention; FIG. 7 shows a structural diagram of an exemplary network training provided according to an embodiment of the present invention; 8 shows a block diagram of a network training apparatus according to an embodiment of the present invention; FIG. 9 shows a block diagram of a network training apparatus according to an embodiment of the present invention; 10 shows a block diagram of an electronic device according to an embodiment of the present invention; FIG. 11 shows a block diagram of an electronic device according to an embodiment of the present invention.

S11~S13:步驟S11~S13: Steps

Claims (17)

一種網路訓練方法,所述方法應用於雲端伺服器,所述雲端伺服器中包括第一行人重識別網路,所述方法包括:向多個邊端伺服器發送所述第一行人重識別網路對應的第一網路參數;接收所述多個邊端伺服器返回的第二網路參數,其中,針對任一所述邊端伺服器,所述邊端伺服器中包括第二行人重識別網路、身份分類網路和本地圖像資料集,所述第二行人重識別網路和所述第一行人重識別網路具有相同的網路結構,所述第二網路參數是所述邊端伺服器根據所述本地圖像資料集、所述身份分類網路和所述第一網路參數對所述第二行人重識別網路進行訓練之後得到的;接收所述多個邊端伺服器返回的所述第二網路參數對應的權重;根據所述多個邊端伺服器返回的所述第二網路參數對應的權重,對所述多個邊端伺服器返回的所述第二網路參數進行加權平均,得到更新後的所述第一網路參數;根據更新後的所述第一網路參數,對所述第一行人重識別網路進行更新,得到更新後的所述第一行人重識別網路。 A network training method, the method is applied to a cloud server, the cloud server includes a first pedestrian re-identification network, the method includes: sending the first pedestrian to a plurality of side servers Re-identifying the first network parameters corresponding to the network; receiving the second network parameters returned by the plurality of edge servers, wherein, for any of the edge servers, the edge server includes the first network parameter. Two person re-identification network, identity classification network and local image data set, the second person re-identification network and the first person re-identification network have the same network structure, the second network The road parameters are obtained by the side server after training the second pedestrian re-identification network according to the local image data set, the identity classification network and the first network parameters; weights corresponding to the second network parameters returned by the plurality of side servers; according to the weights corresponding to the second network parameters returned by the plurality of side servers; weighted average of the second network parameters returned by the controller to obtain the updated first network parameters; according to the updated first network parameters, perform the first pedestrian re-identification network update to obtain the updated first pedestrian re-identification network. 根據請求項1所述的方法,其中,針對任一所述邊端伺服器,所述第二網路參數對應的權重是所述邊端伺服器根據訓練前的所述第二行人重識別網路和訓練後 的所述第二行人重識別網路確定得到的。 The method according to claim 1, wherein, for any of the side servers, the weight corresponding to the second network parameter is the weight of the side server based on the second pedestrian re-identification network before training. road and after training The second pedestrian re-identification network is determined to be obtained. 根據請求項1或2所述的方法,還包括:向所述多個邊端伺服器發送共用圖像資料集;接收所述多個邊端伺服器返回的偽標籤,其中,針對任一所述邊端伺服器,所述偽標籤是所述邊端伺服器根據所述共用圖像資料集以及訓練後的所述第二行人重識別網路生成的;根據所述共用圖像資料集和所述多個邊端伺服器返回的偽標籤,對更新後的所述第一行人重識別網路進行訓練,得到訓練後的所述第一行人重識別網路。 The method according to claim 1 or 2, further comprising: sending a common image data set to the multiple edge servers; receiving pseudo tags returned by the multiple edge servers, wherein for any one the side server, the pseudo label is generated by the side server according to the shared image data set and the trained second person re-identification network; according to the shared image data set and The pseudo labels returned by the plurality of side servers are used to train the updated first pedestrian re-identification network to obtain the trained first pedestrian re-identification network. 根據請求項3所述的方法,其中,所述根據所述共用圖像資料集和所述多個邊端伺服器返回的偽標籤,對更新後的所述第一行人重識別網路進行訓練,得到訓練後的所述第一行人重識別網路,包括:根據所述多個邊端伺服器返回的偽標籤,確定平均偽標籤;根據所述共用圖像資料集和所述平均偽標籤,對更新後的所述第一行人重識別網路進行訓練,得到訓練後的所述第一行人重識別網路。 The method according to claim 3, wherein the updated first pedestrian re-identification network is performed according to the shared image data set and the pseudo tags returned by the plurality of edge servers. training to obtain the trained first pedestrian re-identification network, including: determining an average pseudo-label according to the pseudo-labels returned by the multiple side servers; according to the shared image data set and the average Pseudo label, the updated first pedestrian re-identification network is trained to obtain the trained first pedestrian re-identification network. 一種網路訓練方法,其中,所述方法應用於邊端伺服器,所述邊端伺服器中包括第二行人重識別網路、身份分類網路和本地圖像資料集,所述方法包括:接收雲端伺服器發送的第一行人重識別網路對應的第一網路參數,其中,所述第一行人重識別網路和所述第二行 人重識別網路具有相同的網路結構;根據所述本地圖像資料集、所述身份分類網路和所述第一網路參數,對所述第二行人重識別網路進行訓練,得到訓練後的所述第二行人重識別網路,其中,所述第二行人重識別網路對應第二網路參數;向所述雲端伺服器發送所述第二網路參數;向所述雲端伺服器發送所述第二網路參數對應的權重;所述第二網路參數對應的權重用於對第二網路參數進行加權平均得到更新後的所述第一網路參數;所述更新後的所述第一網路參數用於更新所述第一行人重識別網路得到更新後的所述第一行人重識別網路。 A network training method, wherein the method is applied to an edge server, and the edge server includes a second pedestrian re-identification network, an identity classification network and a local image data set, and the method includes: Receive the first network parameter corresponding to the first pedestrian re-identification network sent by the cloud server, wherein the first pedestrian re-identification network and the second line The person re-identification network has the same network structure; according to the local image data set, the identity classification network and the first network parameters, the second pedestrian re-identification network is trained to obtain The trained second pedestrian re-identification network, wherein the second pedestrian re-identification network corresponds to a second network parameter; sending the second network parameter to the cloud server; sending the second network parameter to the cloud The server sends the weight corresponding to the second network parameter; the weight corresponding to the second network parameter is used to perform a weighted average on the second network parameter to obtain the updated first network parameter; the updated The latter first network parameter is used to update the first pedestrian re-identification network to obtain the updated first pedestrian re-identification network. 根據請求項5所述的方法,其中,所述根據所述本地圖像資料集、所述身份分類網路和所述第一網路參數,對所述第二行人重識別網路進行訓練,得到訓練後的所述第二行人重識別網路,包括:根據所述本地圖像資料集和所述第一網路參數,對所述第二行人重識別網路和所述身份分類網路進行訓練,得到訓練後的所述第二行人重識別網路和訓練後的所述身份分類網路。 The method according to claim 5, wherein the second pedestrian re-identification network is trained according to the local image data set, the identity classification network and the first network parameters, Obtaining the trained second pedestrian re-identification network includes: re-identifying the second pedestrian and the identity classification network according to the local image data set and the first network parameters Perform training to obtain the trained second pedestrian re-identification network and the trained identity classification network. 根據請求項6所述的方法,還包括:將訓練後的所述身份分類網路儲存在所述邊端伺服器中。 The method according to claim 6, further comprising: storing the trained identity classification network in the edge server. 根據請求項6或7所述的方法,其中,所述本地圖像資料集中包括多個身份對應的圖像資料;所述身 份分類網路的維度與所述多個身份的個數相關。 The method according to claim 6 or 7, wherein the local image data set includes image data corresponding to multiple identities; The dimension of the share classification network is related to the number of the plurality of identities. 根據請求項5至7中任一項所述的方法,還包括:接收所述雲端伺服器發送的共用圖像資料集;根據所述共用圖像資料集和訓練後的所述第二行人重識別網路,生成偽標籤;向所述雲端伺服器發送所述偽標籤。 The method according to any one of claim 5 to 7, further comprising: receiving a shared image data set sent by the cloud server; Identify the network, generate a pseudo-label; send the pseudo-label to the cloud server. 根據請求項5至7任一項所述的方法,所述向所述雲端伺服器發送所述第二網路參數對應的權重,包括:根據訓練前的所述第二行人重識別網路和所述本地圖像資料集確定第一特徵向量,以及根據訓練後的所述第二行人重識別網路和所述本地圖像資料集,確定第二特徵向量;確定所述第一特徵向量和所述第二特徵向量之間的餘弦距離;根據所述餘弦距離,確定所述第二網路參數對應的權重;向所述雲端伺服器發送所述第二網路參數對應的權重。 According to the method according to any one of request items 5 to 7, the sending the weight corresponding to the second network parameter to the cloud server includes: re-identifying the network and the network according to the second pedestrian before training. The local image data set determines a first feature vector, and determines a second feature vector according to the trained second pedestrian re-identification network and the local image data set; determines the first feature vector and the cosine distance between the second feature vectors; determine the weight corresponding to the second network parameter according to the cosine distance; send the weight corresponding to the second network parameter to the cloud server. 根據請求項5至7中任一項所述的方法,其中,所述邊端伺服器為圖像採集設備;所述本地圖像資料集是根據所述圖像採集設備採集得到的。 The method according to any one of claims 5 to 7, wherein the edge server is an image acquisition device; and the local image data set is acquired according to the image acquisition device. 根據請求項5至7中任一項所述的方法,其中,所述邊端伺服器與至少一個圖像採集設備連接,所述 邊端伺服器和所述至少一個圖像採集設備位於相同地理區域範圍;所述本地圖像資料集是所述邊端伺服器從所述至少一個圖像採集設備中獲取得到的。 The method according to any one of claims 5 to 7, wherein the side server is connected to at least one image acquisition device, the The edge server and the at least one image acquisition device are located in the same geographical area; the local image data set is obtained by the edge server from the at least one image acquisition device. 一種行人重識別方法,包括:通過目標行人重識別網路對在目標地理區域範圍內獲取到的至少一幀待識別圖像進行行人重識別處理,確定行人重識別結果;其中,所述目標行人重識別網路採用請求項1至12中任一項所述的網路訓練方法訓練得到。 A pedestrian re-identification method, comprising: performing pedestrian re-identification processing on at least one frame of an image to be identified obtained within a target geographical area through a target pedestrian re-identification network, and determining a pedestrian re-identification result; wherein the target pedestrian The re-identification network is trained by using the network training method described in any one of request items 1 to 12. 根據請求項13所述的方法,其中,所述目標行人重識別網路為更新後的第一行人重識別網路或訓練後的第一行人重識別網路。 The method according to claim 13, wherein the target pedestrian re-identification network is an updated first-person-re-identification network or a trained first-person-re-identification network. 根據請求項13所述的方法,其中,在所述目標地理區域範圍內包括邊端伺服器,且所述邊端伺服器中包括訓練後的第二行人重識別網路的情況下,所述目標行人重識別網路為訓練後的第二行人重識別網路。 The method according to claim 13, wherein, in the case that an edge server is included within the target geographic area, and the edge server includes a trained second pedestrian re-identification network, the The target person re-identification network is the second person re-identification network after training. 一種電子設備,包括:處理器;被配置為儲存處理器可執行指令的記憶體;其中,所述處理器被配置為調用所述記憶體儲存的指令,以執行請求項1至15中任意一項所述的方法。 An electronic device, comprising: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute any one of request items 1 to 15 method described in item. 一種電腦可讀儲存介質,其上儲存有電腦程式指令,所述電腦程式指令被處理器執行時實現請求項1至15中任意一項所述的方法。 A computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, implement the method described in any one of claim 1 to 15.
TW109145593A 2020-08-25 2020-12-22 Network training pedestrian re-identification method and storage medium TWI769635B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010864291.4 2020-08-25
CN202010864291.4A CN112001321A (en) 2020-08-25 2020-08-25 Network training method, pedestrian re-identification method, network training device, pedestrian re-identification device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
TW202209151A TW202209151A (en) 2022-03-01
TWI769635B true TWI769635B (en) 2022-07-01

Family

ID=73471079

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109145593A TWI769635B (en) 2020-08-25 2020-12-22 Network training pedestrian re-identification method and storage medium

Country Status (3)

Country Link
CN (1) CN112001321A (en)
TW (1) TWI769635B (en)
WO (1) WO2022043741A1 (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112507893A (en) * 2020-12-14 2021-03-16 华南理工大学 Distributed unsupervised pedestrian re-identification method based on edge calculation
CN112906857B (en) * 2021-01-21 2024-03-19 商汤国际私人有限公司 Network training method and device, electronic equipment and storage medium
CN112861695B (en) * 2021-02-02 2023-10-24 北京大学 Pedestrian identity re-identification method and device, electronic equipment and storage medium
CN112906677B (en) * 2021-05-06 2021-08-03 南京信息工程大学 Pedestrian target detection and re-identification method based on improved SSD (solid State disk) network
CN113205863B (en) * 2021-06-04 2022-03-25 广西师范大学 Training method of individualized model based on distillation semi-supervised federal learning
CN113326938A (en) * 2021-06-21 2021-08-31 商汤国际私人有限公司 Network training method, pedestrian re-identification method, network training device, pedestrian re-identification device, electronic equipment and storage medium
CN113326939A (en) * 2021-06-21 2021-08-31 商汤国际私人有限公司 Network training method, pedestrian re-identification method, network training device, pedestrian re-identification device, electronic equipment and storage medium
CN113792606B (en) * 2021-08-18 2024-04-26 清华大学 Low-cost self-supervision pedestrian re-identification model construction method based on multi-target tracking
CN113807369A (en) * 2021-09-26 2021-12-17 北京市商汤科技开发有限公司 Target re-identification method and device, electronic equipment and storage medium
CN115022316B (en) * 2022-05-20 2023-08-11 阿里巴巴(中国)有限公司 End cloud collaborative data processing system, method, equipment and computer storage medium
CN115310130B (en) * 2022-08-15 2023-11-17 南京航空航天大学 Multi-site medical data analysis method and system based on federal learning
CN115601791B (en) * 2022-11-10 2023-05-02 江南大学 Unsupervised pedestrian re-identification method based on multi-former and outlier sample re-distribution
CN117851838A (en) * 2024-03-07 2024-04-09 广州大学 Identification method of heterogeneous data sources in collaborative learning process

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200921415A (en) * 2007-10-24 2009-05-16 Yahoo Inc Method and system for rendering simplified point finding maps
CN107563327A (en) * 2017-08-31 2018-01-09 武汉大学 It is a kind of that the pedestrian fed back recognition methods and system again are walked based on oneself
US20190012257A1 (en) * 2015-08-05 2019-01-10 Equifax, Inc. Model integration tool
CN110825900A (en) * 2019-11-07 2020-02-21 重庆紫光华山智安科技有限公司 Training method of feature reconstruction layer, reconstruction method of image features and related device
CN111291611A (en) * 2019-12-20 2020-06-16 长沙千视通智能科技有限公司 Pedestrian re-identification method and device based on Bayesian query expansion

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10878320B2 (en) * 2015-07-22 2020-12-29 Qualcomm Incorporated Transfer learning in neural networks
CN110349156B (en) * 2017-11-30 2023-05-30 腾讯科技(深圳)有限公司 Method and device for identifying lesion characteristics in fundus picture and storage medium
CN109993300B (en) * 2017-12-29 2021-01-29 华为技术有限公司 Training method and device of neural network model
EP3528179A1 (en) * 2018-02-15 2019-08-21 Koninklijke Philips N.V. Training a neural network
CN111126108A (en) * 2018-10-31 2020-05-08 北京市商汤科技开发有限公司 Training method and device of image detection model and image detection method and device
CN110490058B (en) * 2019-07-09 2022-07-26 北京迈格威科技有限公司 Training method, device and system of pedestrian detection model and computer readable medium
CN110795477A (en) * 2019-09-20 2020-02-14 平安科技(深圳)有限公司 Data training method, device and system
CN110956202B (en) * 2019-11-13 2023-08-01 重庆大学 Image training method, system, medium and intelligent device based on distributed learning
CN111107094B (en) * 2019-12-25 2022-05-20 青岛大学 Lightweight ground-oriented medical Internet of things big data sharing system
CN111241580B (en) * 2020-01-09 2022-08-09 广州大学 Trusted execution environment-based federated learning method
CN111401281B (en) * 2020-03-23 2022-06-21 山东师范大学 Unsupervised pedestrian re-identification method and system based on deep clustering and sample learning

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200921415A (en) * 2007-10-24 2009-05-16 Yahoo Inc Method and system for rendering simplified point finding maps
US20190012257A1 (en) * 2015-08-05 2019-01-10 Equifax, Inc. Model integration tool
CN107563327A (en) * 2017-08-31 2018-01-09 武汉大学 It is a kind of that the pedestrian fed back recognition methods and system again are walked based on oneself
CN110825900A (en) * 2019-11-07 2020-02-21 重庆紫光华山智安科技有限公司 Training method of feature reconstruction layer, reconstruction method of image features and related device
CN111291611A (en) * 2019-12-20 2020-06-16 长沙千视通智能科技有限公司 Pedestrian re-identification method and device based on Bayesian query expansion

Also Published As

Publication number Publication date
TW202209151A (en) 2022-03-01
WO2022043741A1 (en) 2022-03-03
CN112001321A (en) 2020-11-27

Similar Documents

Publication Publication Date Title
TWI769635B (en) Network training pedestrian re-identification method and storage medium
TWI772668B (en) Method, device and electronic apparatus for target object processing and storage medium thereof
WO2021196401A1 (en) Image reconstruction method and apparatus, electronic device and storage medium
US11120078B2 (en) Method and device for video processing, electronic device, and storage medium
WO2020135127A1 (en) Pedestrian recognition method and device
TWI773945B (en) Method, apparatus and electronic device for anchor point determining and storage medium thereof
TWI782480B (en) Image processing method, electronic device and computer readable storage medium
US11288531B2 (en) Image processing method and apparatus, electronic device, and storage medium
TWI778313B (en) Method and electronic equipment for image processing and storage medium thereof
TWI767596B (en) Scene depth and camera motion prediction method, electronic equipment and computer readable storage medium
WO2021036382A1 (en) Image processing method and apparatus, electronic device and storage medium
WO2016192325A1 (en) Method and device for processing logo on video file
TW202201273A (en) Attitude detection and video processing method, electronic equipment and computer-readable storage medium
TWI767217B (en) Coordinate system alignment method and apparatus, electronic device and computer-readable storage medium
CN105959587A (en) Shutter speed acquisition method and device
TW202205127A (en) Target detection method, electronic equipment and computer-readable storage medium
WO2022134475A1 (en) Point cloud map construction method and apparatus, electronic device, storage medium and program
US20220383517A1 (en) Method and device for target tracking, and storage medium
CN111242303A (en) Network training method and device, and image processing method and device
TW202145064A (en) Object counting method electronic equipment computer readable storage medium
TWI770531B (en) Face recognition method, electronic device and storage medium thereof
TWI751593B (en) Network training method and device, image processing method and device, electronic equipment, computer readable storage medium and computer program
CN111523599B (en) Target detection method and device, electronic equipment and storage medium
TWI738349B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN113283343A (en) Crowd positioning method and device, electronic equipment and storage medium