TWI739675B - Image recognition method and apparatus - Google Patents
Image recognition method and apparatus Download PDFInfo
- Publication number
- TWI739675B TWI739675B TW109141300A TW109141300A TWI739675B TW I739675 B TWI739675 B TW I739675B TW 109141300 A TW109141300 A TW 109141300A TW 109141300 A TW109141300 A TW 109141300A TW I739675 B TWI739675 B TW I739675B
- Authority
- TW
- Taiwan
- Prior art keywords
- score
- sight
- line
- behavior
- level
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/59—Context or environment of the image inside of a vehicle, e.g. relating to seat occupancy, driver state or inner lighting conditions
- G06V20/597—Recognising the driver's state or behaviour, e.g. attention or drowsiness
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
- G06V20/41—Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/20—Movements or behaviour, e.g. gesture recognition
-
- G—PHYSICS
- G08—SIGNALLING
- G08B—SIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
- G08B21/00—Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
- G08B21/18—Status alarms
- G08B21/182—Level alarms, e.g. alarms responsive to variables exceeding a threshold
-
- G—PHYSICS
- G08—SIGNALLING
- G08B—SIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
- G08B7/00—Signalling systems according to more than one of groups G08B3/00 - G08B6/00; Personal calling systems according to more than one of groups G08B3/00 - G08B6/00
- G08B7/06—Signalling systems according to more than one of groups G08B3/00 - G08B6/00; Personal calling systems according to more than one of groups G08B3/00 - G08B6/00 using electric transmission, e.g. involving audible and visible signalling through the use of sound and light sources
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Psychiatry (AREA)
- Human Computer Interaction (AREA)
- Social Psychology (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Business, Economics & Management (AREA)
- Emergency Management (AREA)
- Image Analysis (AREA)
Abstract
Description
本發明是有關於一種影像處理方法及裝置,且特別是有關於一種影像辨識方法及裝置。The present invention relates to an image processing method and device, and more particularly to an image recognition method and device.
隨著交通運輸的發達,如何提高安全性是所有車廠不斷努力與精進的方向。而在智慧車用的技術應用上,安全考量成為第一要素。為了有效提升行車安全,進一步預防事故發生,因此智慧車用的應用與技術,越來越被關注。據此,如何透過智慧車用的輔助來有效且即時地監控駕駛行為,藉此降低由人為疏失所造成的行車事故,則為目前需考量的重點。With the development of transportation, how to improve safety is the direction of all car manufacturers' continuous efforts and diligence. In the technical application of smart cars, safety considerations become the first element. In order to effectively improve driving safety and further prevent accidents, the application and technology of smart cars are getting more and more attention. Accordingly, how to effectively and instantly monitor driving behavior through the assistance of smart cars, thereby reducing driving accidents caused by human negligence, is the focus of current consideration.
本發明提供一種影像辨識方法及裝置,可提高辨識準確率。The invention provides an image recognition method and device, which can improve the recognition accuracy.
本發明的影像辨識方法,包括:獲得影像序列;利用行為辨識模型分析影像序列,以獲得使用者的行為姿態;計算行為姿態對應的第一分數;利用視線辨識模型分析影像序列,以獲得該使用者的視線特徵;計算視線特徵對應的第二分數;基於第一分數與第二分數來計算危險分數;以及根據危險分數來發出對應的警示訊號。The image recognition method of the present invention includes: obtaining an image sequence; analyzing the image sequence using a behavior recognition model to obtain the user's behavior posture; calculating the first score corresponding to the behavior posture; using the sight recognition model to analyze the image sequence to obtain the use Calculate the second score corresponding to the sight feature; calculate the risk score based on the first score and the second score; and issue a corresponding warning signal based on the risk score.
在本發明的一實施例中,在獲得使用者的行為姿態之後,更包括:在判定行為姿態為分心行為的情況下,計算行為姿態對應的第一分數,包括:將第一分數設定為分心行為所對應的主分數;以及在持續判定行為姿態為分心行為的過程中,每經過第一判斷時間,將第一分數加上對應於主分數的輔助分數。In an embodiment of the present invention, after obtaining the behavior posture of the user, it further includes: in the case of determining that the behavior posture is a distracting behavior, calculating the first score corresponding to the behavior posture includes: setting the first score to The main score corresponding to the distracted behavior; and in the process of continuously determining that the behavior posture is the distracted behavior, each time the first judgment time passes, the first score is added to the auxiliary score corresponding to the main score.
在本發明的一實施例中,在獲得使用者的行為姿態之後,更包括:在判定行為姿態為疲勞行為的情況下,設定第一分數為對應至疲勞等級為1的第一預設分數;在疲勞等級為1的情況下經過第一預設時間之後,判定行為姿態仍然為疲勞行為的情況下,將第一分數設定為對應至疲勞等級為2的第二預設分數,其中第二預設分數大於第一預設分數;以及在疲勞等級為2的情況下經過第二預設時間之後,判定行為姿態仍然為疲勞行為的情況下,將第一分數設定為對應至疲勞等級為3的第三預設分數,其中第三預設分數大於第二預設分數。In an embodiment of the present invention, after obtaining the behavior posture of the user, it further includes: in the case of determining that the behavior posture is a fatigue behavior, setting the first score as the first preset score corresponding to the fatigue level of 1; In the case where the fatigue level is 1, after the first preset time has elapsed, and in the case where it is determined that the behavior posture is still a fatigue behavior, the first score is set as the second preset score corresponding to the fatigue level 2, wherein the second prediction Set the score to be greater than the first preset score; and in the case of a fatigue level of 2, after the second preset time has elapsed, and in the case that the behavior posture is still a fatigue behavior, set the first score to correspond to the fatigue level of 3. The third preset score, where the third preset score is greater than the second preset score.
在本發明的一實施例中,在獲得使用者的視線特徵之後,更包括:基於視線特徵判斷使用者是否未面向指定方向;以及在判定使用者未面向指定方向時,計算第二分數。計算第二分數的步驟包括:每經過第二判斷時間,將第二分數加上指定分數。In an embodiment of the present invention, after obtaining the user's line of sight feature, it further includes: judging whether the user is not facing the designated direction based on the line of sight feature; and calculating the second score when it is determined that the user is not facing the designated direction. The step of calculating the second score includes: adding a designated score to the second score every time the second judgment time has elapsed.
在本發明的一實施例中,在獲得使用者的視線特徵之後,更包括:基於視線特徵判斷是否符合視線疲勞特徵;在判定視線特徵符合視線疲勞特徵時,設定第二分數為對應至疲勞等級為1的第一預設分數;在疲勞等級為1的情況下經過第一預設時間之後,判定視線特徵仍然符合視線疲勞特徵時,將第二分數設定為對應至疲勞等級為2的第二預設分數,其中第二預設分數大於第一預設分數;以及在疲勞等級為2的情況下經過第二預設時間之後,判定視線特徵仍然符合視線疲勞特徵時,將第二分數設定為對應至疲勞等級為3的第三預設分數,其中第三預設分數大於第二預設分數。In an embodiment of the present invention, after obtaining the user's line of sight feature, it further includes: judging whether the line of sight feature meets the line of sight fatigue feature based on the line of sight feature; when determining that the line of sight feature meets the line of sight fatigue feature, setting the second score to correspond to the fatigue level The first preset score is 1; after the first preset time has elapsed when the fatigue level is 1, when it is determined that the line of sight feature still meets the line of sight fatigue feature, the second score is set to correspond to the second score of fatigue level 2. A preset score, where the second preset score is greater than the first preset score; and when the second preset time has elapsed when the fatigue level is 2, when it is determined that the line of sight feature still meets the line of sight fatigue feature, the second score is set to Corresponds to a third preset score with a fatigue level of 3, where the third preset score is greater than the second preset score.
在本發明的一實施例中,上述影像辨識方法更包括:在偵測到行為姿態回復至正常狀態時,將第一分數歸零;以及在偵測到視線方向回到指定方向時,將第二分數歸零。In an embodiment of the present invention, the above-mentioned image recognition method further includes: resetting the first score to zero when the behavior posture is detected to return to a normal state; Two points are returned to zero.
在本發明的一實施例中,在根據危險分數來發出對應的警示訊號之後,更包括:持續發出警示訊號,直到偵測到行為姿態回復至正常狀態以及偵測到視線方向回到指定方向。In an embodiment of the present invention, after the corresponding warning signal is issued according to the risk score, it further includes: continuously issuing the warning signal until the detected behavior posture returns to the normal state and the detected line of sight direction returns to the specified direction.
在本發明的一實施例中,上述根據危險分數來發出對應的警示訊號的步驟,包括:基於危險分數判斷目前危險等級為第一警示等級、第二警示等級、第三警市等級或第四警示等級;在判定目前危險等級為第一警示等級,發出閃燈訊號以及提示短音;在判定目前危險等級為第二警示等級,發出閃燈訊號以及持續發出第一提示長音;在判定目前危險等級為第三警示等級,發出閃燈訊號以及持續發出第二提示長音;以及在判定目前危險等級為第四警示等級,發送通知訊號至遠端管制中心。In an embodiment of the present invention, the step of issuing the corresponding warning signal according to the risk score includes: judging based on the risk score that the current risk level is the first warning level, the second warning level, the third warning level, or the fourth warning level. Warning level; when the current danger level is determined to be the first warning level, a flashing light signal and short sound are issued; when the current danger level is determined to be the second warning level, a flashing light signal is issued and the first long sound is continuously emitted; when the current danger level is determined The level is the third warning level, which emits a flashing signal and the second long beeping sound continuously; and when the current danger level is determined to be the fourth warning level, a notification signal is sent to the remote control center.
在本發明的一實施例中,透過行為辨識模型來標記影像序列中的使用者的深度特徵,透過視線辨識模型來找出影像序列中的使用者的多個特徵點。In an embodiment of the present invention, the behavior recognition model is used to mark the depth characteristics of the user in the image sequence, and the gaze recognition model is used to find multiple characteristic points of the user in the image sequence.
本發明的影像辨識裝置,包括:影像擷取裝置,擷取影像序列;儲存裝置,包括行為辨識模型、視線辨識模型以及危險判定模型;以及處理器,耦接至影像擷取裝置儲存裝置。處理器經配置以:自影像擷取裝置獲得影像序列;利用行為辨識模型分析影像序列,以獲得使用者的行為姿態;利用視線辨識模型分析影像序列,以獲得使用者的視線特徵;利用危險判定模型計算行為姿態對應的第一分數,並且計算視線特徵對應的第二分數,之後基於第一分數與第二分數來計算危險分數,並根據危險分數來發出對應的警示訊號。The image recognition device of the present invention includes: an image capture device that captures an image sequence; a storage device including a behavior recognition model, a line of sight recognition model, and a hazard determination model; and a processor coupled to the image capture device storage device. The processor is configured to: obtain the image sequence from the image capture device; analyze the image sequence using the behavior recognition model to obtain the user's behavior posture; use the line of sight recognition model to analyze the image sequence to obtain the user's line of sight characteristics; use the risk determination The model calculates the first score corresponding to the behavior and posture, and calculates the second score corresponding to the line of sight feature, and then calculates the risk score based on the first score and the second score, and issues corresponding warning signals based on the risk score.
基於上述,本發明採用行為辨識模型與視線辨識模型行來同時識別行為姿態與視線方向,來獲得更準確的辨識結果,並且基於危險分數來發出對應的警示訊號,藉此可提醒駕駛與後方來車。Based on the above, the present invention uses the behavior recognition model and the line of sight recognition model line to simultaneously recognize the behavior posture and the line of sight direction to obtain a more accurate recognition result, and issue corresponding warning signals based on the hazard score, thereby reminding the driver and the rear vehicle.
圖1是依照本發明一實施例的影像辨識裝置的方塊圖。請參照圖1,影像辨識裝置100包括處理器110、儲存裝置120以及影像擷取裝置130。處理器110耦接至儲存裝置120以及影像擷取裝置130。在一實施例中,影像辨識裝置100可以設置在車輛中,與車輛的中控台連線。在另一實施例中,影像辨識裝置100可以整合在車輛的中控台內。FIG. 1 is a block diagram of an image recognition device according to an embodiment of the invention. Please refer to FIG. 1, the
處理器110例如為中央處理單元(Central Processing Unit,CPU)、物理處理單元(Physics Processing Unit,PPU)、可程式化之微處理器(Microprocessor)、嵌入式控制晶片、數位訊號處理器(Digital Signal Processor,DSP)、特殊應用積體電路(Application Specific Integrated Circuits,ASIC)或其他類似裝置。The
儲存裝置120包括行為辨識模型121、視線辨識模型123以及危險判定模型125。行為辨識模型121、視線辨識模型123以及危險判定模型125分別由一或多個程式碼片段所組成,透過處理器110來執行,以達成其對應的功能。The
影像擷取裝置130例如是採用電荷耦合元件(Charge coupled device,CCD)鏡頭、互補式金氧半電晶體(Complementary metal oxide semiconductor transistors,CMOS)鏡頭的攝影機、照相機等,用以獲得影像序列。在此,影像序列可以是動態影像或靜態影像。The image capturing
行為辨識模型121主要處理人物行為,包含分心、疲勞、異常駕駛等人物身體特徵與動作。而在行為辨識模型121的訓練階段,可針對多種行為姿態的特徵來進行模型訓練。這些行為姿態還可分為分心行為與疲勞行為兩大類別。分心行為包括車輛行駛中飲食、車輛行駛中操作車內中控台、車輛行駛中使用智慧型行動裝置、在車輛行駛中手離開方向盤。疲勞行為包括車輛行駛中打哈欠、車輛行駛中打瞌睡等。The
在一實施例中,使用DensePose模型來建立行為辨識模型121。DensePose模型使用人物三維特徵來建置模型,比起傳統的二維影像還增加了深度特徵,故,可透過行為辨識模型121對影像序列中使用者的每個人體部件進行深度特徵的標記,促使類神經網路能依照二維影像中現有人體部件來推測出剩餘被遮蔽的人物特徵與動作,藉以大幅提高傳統行為辨識的辨識種類與準確度。同時,此架構可使用一般影像擷取裝置130來取得二維影像,再透過DensePose模型來建置三維特徵,除了可提高辨識準確度外,亦可兼具降低成本、易普及採用的優勢。採用了DensePose模型的行為辨識模型121中,針對未被遮蔽影像的辨識率可高達90%,針對部分被遮敝影像的辨識率亦可達到70%~80%。此外,採用了DensePose模型的行為辨識模型121可以從單張圖框(frame)來識別出行為,因而加速了辨識時間。In one embodiment, the DensePose model is used to build the
視線辨識模型123主要處理人物臉部的視線方向,並且進一步處理動態面板移動、分心、疲勞辨識等特徵動作。在一實施例中,使用OpenPose模型來建立視線辨識模型123。OpenPose模型透過向量(Vector)來辨識視線。例如,透過OpenPose模型找出臉部的三點特徵,並主動輸出人物特徵座標軸以利後續模型訓練。之後,在基於先後順序所擷取的時間上相鄰的至少兩張圖框中,透過辨識三點共面三角形的變形比例,來判斷人物的視線方向。The
圖2是依照本發明一實施例的基於OpenPose模型所識別出的特徵點的示意圖。在圖2中,繪示出透過OpenPose模型所識別出使用者身上的特徵點(N0~N17)。所述特徵點N0~N17為構成人體骨架的關鍵點(keypoint)。本實施例是利用OpenPose模型所識別出使用者的臉上的特徵點N0、N14、N15來作為視線特徵。基於連續多張圖框中的特徵點N0、N14、N15所形成的共面三角形的變形比例、以及特徵點N0、N14、N15在不同圖框中的位置,來判斷使用者的視線方向。Fig. 2 is a schematic diagram of feature points identified based on the OpenPose model according to an embodiment of the present invention. In Figure 2, the feature points (N0~N17) on the user identified through the OpenPose model are drawn. The feature points N0 to N17 are key points that constitute the skeleton of the human body. In this embodiment, the feature points N0, N14, and N15 on the face of the user identified by the OpenPose model are used as the line of sight features. Based on the deformation ratio of the coplanar triangle formed by the feature points N0, N14, and N15 in consecutive multiple frames, and the positions of the feature points N0, N14, and N15 in different frames, the user's line of sight direction is determined.
採用了OpenPose模型的視線辨識模型123中,透過標註人物臉部的特徵點N0、N14、N15(作為視線特徵),能夠判斷使用者的視線方向是否偏移,進一步來判斷使用者是否分心、是否查看左右來車、是否察看後照鏡、是否使用車用電子裝置、是否疲勞駕駛等。並且,處理器110還可根據視線特徵來切換主控台的顯示面板的畫面或者驅動主控台的特定操作。例如,當透過視線辨識模型123偵測到使用者看向車內A柱的方向,處理器110切換顯示面板的畫面以顯示A柱車外影像。或者,處理器110利用視線特徵來控制音樂大小、導航開關等特定操作。In the
一般而言,進行眼動辨識需要設置眼動儀或是必須將影像擷取裝置130面向使用者進行拍攝,否則無法進行。而使用OpenPose模型的視線辨識模型123可以直接透過臉部方向來判斷視線方向,大幅增加機構設置的自由度,也能減少眼球偏移時造成的誤差。採用了OpenPose模型的線辨識模型123中,不管影像擷取裝置130為正面面向使用者進行設置或是未正面面向使用者進行設置,其視線特徵的辨識率皆可高達90%。Generally speaking, to perform eye movement recognition, an eye tracker must be installed or the image capturing
圖3是依照本發明一實施例的影像辨識方法流程圖。請同時參照圖1及圖3,在步驟S305中,透過影像擷取裝置130來獲得影像序列。在獲得影像序列之後,可以同時驅使行為辨識模型121與視線辨識模型123來分別執行步驟S310與步驟S315。然,在此並不限定行為辨識模型121與視線辨識模型123的執行順序。FIG. 3 is a flowchart of an image recognition method according to an embodiment of the invention. Referring to FIG. 1 and FIG. 3 at the same time, in step S305, an image sequence is obtained through the
在步驟S310中,利用行為辨識模型121分析影像序列,以獲得使用者的行為姿態。接著,在步驟S320中,利用危險判定模型125來計算行為姿態對應的第一分數。具體而言,行為辨識模型121透過類神經網路演算法來識別出影像序列中是否存在使用者,並在存有使用者的情況下判斷其行為姿態是否符合分心行為或疲勞行為。倘若行為姿態符合分心行為或疲勞行為,才透過危險判定模型125對其計算第一分數。In step S310, the
具體而言,在行為辨識模型121判定行為姿態為分心行為的情況下,透過危險判定模型125計算行為姿態對應的第一分數的方式如下:將第一分數設定為分心行為所對應的主分數,並且在持續判定行為姿態為分心行為的過程中,每經過第一判斷時間,將第一分數加上對應於主分數的輔助分數,直到行為辨識模型121偵測到行為姿態回復至正常狀態。在一實施例中,於行為辨識模型121的訓練中設定多個分心行為,並針對不同的分心行為設定不同的主分數與輔助分數,如表1所示。Specifically, when the
表1
在表1中,以分心行為的危險程度來設定主分數及輔助分數的高低。例如,在判定行為姿態為車輛行駛中手離開方向盤的情況下,將第一分數設定為60分,在動作持續時間中每經過1秒便將第一分數再累加20分。即,在判定車輛行駛中手離開方向盤且持續5秒所對應的第一分數為:60(主分數)+5(持續時間)×20(輔助分數)。並且,在偵測到行為姿態回復至正常狀態時,將第一分數歸零。In Table 1, the main score and auxiliary score are set based on the degree of risk of distracted behavior. For example, in the case where it is determined that the behavior posture is that the hand leaves the steering wheel while the vehicle is running, the first score is set to 60 minutes, and the first score is added to 20 points every 1 second in the action duration. That is, when it is determined that the hand leaves the steering wheel for 5 seconds while the vehicle is running, the first score corresponding to: 60 (main score) + 5 (duration)×20 (auxiliary score). And, when it is detected that the behavior posture returns to a normal state, the first score is reset to zero.
所述行為辨識模型121還可在偵測到多個分心行為的狀況下,加總第一分數。例如,參照表1,倘若偵測到駕駛在車輛行駛中飲食5秒(10+5×5),同時偵測到駕駛在車輛行駛中操作車內中控台1秒(30+10×1),此時,第一分數為35+40分。The
另一方面,在行為辨識模型121判定行為姿態為疲勞行為的情況下,透過危險判定模型125計算行為姿態對應的第一分數的方式如下:在判定為疲勞行為的情況下,設定第一分數為對應至疲勞等級為1的預設分數A1;在疲勞等級為1的情況下經過預設時間B1之後,判定行為姿態仍然為疲勞行為的情況下,將第一分數設定為對應至疲勞等級為2的預設分數A2(A2>A1);在疲勞等級為2的情況下經過預設時間B2之後,判定行為姿態仍然為疲勞行為的情況下,將第一分數設定為對應至疲勞等級為3的預設分數A3(A3>A2)。而在偵測到行為姿態回復至正常狀態時,將第一分數歸零。On the other hand, in the case where the
具體而言,於行為辨識模型121的訓練中進一步設定疲勞行為的特徵態樣,包括車輛行駛中打哈欠、車輛行駛中打瞌睡等。並且,進一步設定多個疲勞等級,並針對不同的疲勞等級設定不同的預設分數。例如,由疲勞程度輕至疲勞程度重來設定疲勞等級1~3,並且疲勞等級越高,對應的預設分數越高。Specifically, during the training of the
假設疲勞等級1對應的預設分數B1為60分,疲勞等級2對應的預設分數B2為80分,疲勞等級3對應的預設分數B3為100分,並且假設預設時間B1為5秒,預設時間B2為3秒。在初始判定行為姿態為車輛行駛中打哈欠、車輛行駛中打瞌睡等疲勞行為的情況下,視為疲勞等級1,故,設定第一分數為60分。而在疲勞等級為1的情況下經過5秒仍未回復正常狀態的情況下,視為疲勞程度加重至疲勞等級2,此時將第一分數設定為80分。而在疲勞等級為2的情況下經過3秒仍未回復正常狀態的情況下,將第一分數設定為100分。在此,疲勞等級設定3個等級僅為舉例說明,並不以此為限。Assuming that the preset score B1 corresponding to fatigue level 1 is 60 points, the preset score B2 corresponding to fatigue level 2 is 80 points, the preset score B3 corresponding to fatigue level 3 is 100 points, and the preset time B1 is 5 seconds. The preset time B2 is 3 seconds. When the initial determination behavior is fatigue behavior such as yawning while the vehicle is running, dozing off while the vehicle is running, it is regarded as a fatigue level 1, so the first score is set to 60 points. In the case where the fatigue level is 1 and the normal state is not restored after 5 seconds, it is considered that the fatigue level has increased to the fatigue level 2, and the first score is set to 80 points at this time. In the case where the fatigue level is 2 and the normal state is not restored after 3 seconds, the first score is set to 100 points. Here, the setting of 3 levels of fatigue level is only an example, and it is not limited to this.
另外,在步驟S315中,利用視線辨識模型123分析影像序列,以獲得使用者的視線特徵。接著,在步驟S325中,利用危險判定模型125來計算視線特徵對應的第二分數。具體而言,視線辨識模型123透過類神經網路演算法來識別出影像序列中是否存在使用者,並在存有使用者的情況下獲得其視線特徵。倘若視線特徵未面向指定方向或是視線特徵符合視線疲勞特徵,才透過危險判定模型125對其計算第二分數。In addition, in step S315, the visual
具體而言,在獲得使用者的視線特徵之後,透過視線辨識模型123基於視線特徵判斷使用者是否未面向指定方向。例如基於駕駛的視線方向來判斷駕駛是否面向正前方。在判定使用者未面向指定方向時,才透過危險判定模型125計算行為第二分數。例如,每經過第二判斷時間(例如1秒),將第二分數加上指定分數。舉例來說,當判斷駕駛的視線方向不在正面(指定方向)時,在經過1秒後,將第二分數加上15分,經過2秒後第二分數為30分(15+15),以此類推。而在偵測到視線方向回到指定方向時,將第二分數歸零。Specifically, after obtaining the user's line of sight feature, the line of
另一方面,在視線辨識模型123判定行為視線特徵判斷符合視線疲勞特徵的情況下,透過危險判定模型125計算對應的第二分數的方式如下:在判定視線特徵符合視線疲勞特徵時,設定第二分數為對應至疲勞等級為1的預設分數C1;在疲勞等級為1的情況下經過預設時間D1之後,判定視線特徵仍然符合視線疲勞特徵時,將第二分數設定為對應至疲勞等級為2的預設分數C2(C2>C1);在疲勞等級為2的情況下經過預設時間D2之後,判定視線特徵仍然符合視線疲勞特徵時,將第二分數設定為對應至疲勞等級為3的預設分數C3(C3>C2)。On the other hand, when the
具體而言,於視線辨識模型123的訓練中進一步設定視線疲勞特徵的特徵態樣。並且,進一步設定多個疲勞等級,並針對不同的疲勞等級設定不同的預設分數。例如,由疲勞程度輕至疲勞程度重來設定疲勞等級1~3,並且疲勞等級越高,對應的預設分數越高。Specifically, in the training of the
假設疲勞等級1對應的預設分數C1為60分,疲勞等級2對應的預設分數C2為80分,疲勞等級3對應的預設分數C3為100分,並且假設預設時間D1為5秒,預設時間D2為3秒。在初始判定符合視線疲勞特徵的情況下,設定第二分數為60分。在持續經過5秒仍未回復正常狀態的情況下,將第二分數設定為80分。倘若接著持續經過3秒仍未回復正常狀態的情況下,將第二分數設定為100分。在此僅為舉例說明,並不以此為限。而在視線特徵回復正常狀態時,將第二分數歸零。在此,將視線特徵未符合視線疲勞特徵視為是正常狀態。Assuming that the preset score C1 corresponding to fatigue level 1 is 60 points, the preset score C2 corresponding to fatigue level 2 is 80 points, the preset score C3 corresponding to fatigue level 3 is 100 points, and the preset time D1 is 5 seconds. The preset time D2 is 3 seconds. In the case where the initial judgment is consistent with the line-of-sight fatigue characteristics, the second score is set to 60 points. In the case where the normal state is not restored after 5 seconds, the second score is set to 80 points. If the normal state is not restored after 3 seconds, the second score is set to 100 points. This is only an example, and it is not limited to this. When the line of sight feature returns to a normal state, the second score is returned to zero. Here, it is considered that the line of sight feature does not meet the line of sight fatigue feature as a normal state.
在計算第一分數、第二分數之後,在步驟S330中,透過危險判定模型125基於第一分數與第二分數來計算危險分數。在一實施例中,危險判定模型125將第一分數與第二分數相加來獲得危險分數。在其他實施例中,危險分數的計算亦可為如下:危險分數=第一分數×第一權重+第二分數×第二權重。其中,第一權重+第二權重=1。After calculating the first score and the second score, in step S330, the
在獲得危險分數之後,在步驟S335中,根據危險分數來發出對應的警示訊號。並且,還可進一步設定為:持續發出警示訊號,直到偵測到行為姿態回復至正常狀態以及偵測到視線方向回到指定方向。在此,可將警示等級分為多個等級,不同的警示等級會發出不同的警示訊號。After the risk score is obtained, in step S335, a corresponding warning signal is issued according to the risk score. In addition, it can be further set to: continue to send out a warning signal until the detected behavior posture returns to the normal state and the detected line of sight direction returns to the specified direction. Here, the warning levels can be divided into multiple levels, and different warning levels will issue different warning signals.
例如,底下以4個警示等級來說明。危險分數位於60~80之間,判定目前危險等級為第一警示等級,其對應的警示訊號包括發出閃燈訊號以及提示短音(例如一短聲或兩短聲)。危險分數位於80~100之間,判定目前危險等級為第二警示等級,其對應的警示訊號包括發出閃燈訊號以及持續發出第一提示長音。危險分數位於100~200之間,判定目前危險等級為第三警示等級,其對應的警示訊號包括發出閃燈訊號以及持續發出第二提示長音(例如尖銳長音)。危險分數大於200,判定目前危險等級為第四警示等級,發送通知訊號至遠端管制中心,並且還可同時發出閃燈訊號以及第二提示長音。For example, there are 4 warning levels below. The hazard score is between 60 and 80, and the current hazard level is determined to be the first warning level. The corresponding warning signal includes a flashing light signal and a short sound (such as one short sound or two short sounds). The hazard score is between 80 and 100, and the current hazard level is determined to be the second warning level, and the corresponding warning signal includes the flashing light signal and the continuous first warning tone. The hazard score is between 100 and 200, and the current hazard level is determined to be the third warning level, and the corresponding warning signal includes the flashing light signal and the continuous second long sound (such as a sharp long sound). If the danger score is greater than 200, the current danger level is determined to be the fourth warning level, a notification signal is sent to the remote control center, and a flashing light signal and a second long tone can also be issued at the same time.
例如,透過行為辨識模型121偵測到駕駛出現疲勞行為8秒(第一分數100分),同時透過視線辨識模型123偵測到視線特徵符合視線疲勞特徵5秒(第二分數80分),則危險分數為180分。故,判定目前危險等級為第三警示等級,其對應的警示訊號包括發出閃燈訊號以及持續發出第二提示長音(例如尖銳長音)。For example, if driving fatigue is detected for 8 seconds through the behavior recognition model 121 (the first score is 100 points), and at the same time it is detected through the
在一實施例中,在危險分數大於200的情況下,處理器110可透過WiFi(wireless fidelity,無線保真)等無線通訊技術來發送通知訊號至遠端管制中心,以利後續追蹤與校正,或提供即時救援。並且,還可進一步將影像擷取裝置130所拍攝到的影像序列傳送至遠端管制中心。In one embodiment, when the risk score is greater than 200, the
另外,除了發出警示訊號之外,還可進一步直接鎖定中控台的操作(例如導航螢幕、音樂控制等)。In addition, in addition to issuing a warning signal, it can further directly lock the operation of the center console (such as navigation screen, music control, etc.).
綜上所述,本發明採用行為辨識模型與視線辨識模型行來同時識別行為姿態與視線方向,來獲得更準確的辨識結果,並且基於危險分數來發出對應的警示訊號,藉此可提醒駕駛與後方來車。此外,進一步利用深度特徵以及向量分析來分別訓練行為辨識模型與視線辨識模型,可提高辨識的準確率。In summary, the present invention uses the behavior recognition model and the line of sight recognition model line to simultaneously recognize the behavior posture and the line of sight direction to obtain more accurate recognition results, and issue corresponding warning signals based on the hazard score, thereby reminding driving and Cars coming from behind. In addition, further use of depth features and vector analysis to separately train the behavior recognition model and the line of sight recognition model can improve the accuracy of recognition.
100:影像辨識裝置 110:處理器 120:儲存裝置 121:行為辨識模型 123:視線辨識模型 125:危險判定模型 130:影像擷取裝置 N0~N17:特徵點 S305~S335:影像辨識方法各步驟 100: Image recognition device 110: processor 120: storage device 121: Behavior Recognition Model 123: Sight recognition model 125: Dangerous Judgment Model 130: Image capture device N0~N17: Feature points S305~S335: Steps of image recognition method
圖1是依照本發明一實施例的影像辨識裝置的方塊圖。 圖2是依照本發明一實施例的基於OpenPose模型所識別出的特徵點的示意圖。 圖3是依照本發明一實施例的影像辨識方法流程圖。 FIG. 1 is a block diagram of an image recognition device according to an embodiment of the invention. Fig. 2 is a schematic diagram of feature points identified based on the OpenPose model according to an embodiment of the present invention. FIG. 3 is a flowchart of an image recognition method according to an embodiment of the invention.
S305~S335:影像辨識方法各步驟 S305~S335: Steps of image recognition method
Claims (18)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109141300A TWI739675B (en) | 2020-11-25 | 2020-11-25 | Image recognition method and apparatus |
CN202110509547.4A CN113221734A (en) | 2020-11-25 | 2021-05-11 | Image recognition method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109141300A TWI739675B (en) | 2020-11-25 | 2020-11-25 | Image recognition method and apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI739675B true TWI739675B (en) | 2021-09-11 |
TW202221563A TW202221563A (en) | 2022-06-01 |
Family
ID=77094513
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW109141300A TWI739675B (en) | 2020-11-25 | 2020-11-25 | Image recognition method and apparatus |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113221734A (en) |
TW (1) | TWI739675B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201803755A (en) * | 2016-07-01 | 2018-02-01 | 三星電子股份有限公司 | Apparatus and method for a vehicle platform |
TW201912476A (en) * | 2017-09-01 | 2019-04-01 | 元智大學 | Method, device, and system for driving assistant based on fuzzy-set-optimized framework |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109803583A (en) * | 2017-08-10 | 2019-05-24 | 北京市商汤科技开发有限公司 | Driver monitoring method, apparatus and electronic equipment |
CN108839658B (en) * | 2018-05-07 | 2021-03-26 | 威马智慧出行科技(上海)有限公司 | Fatigue driving monitoring system and method |
CN109413351B (en) * | 2018-10-26 | 2021-07-13 | 平安科技(深圳)有限公司 | Music generation method and device |
CN109558865A (en) * | 2019-01-22 | 2019-04-02 | 郭道宁 | A kind of abnormal state detection method to the special caregiver of need based on human body key point |
CN111950371B (en) * | 2020-07-10 | 2023-05-19 | 上海淇毓信息科技有限公司 | Fatigue driving early warning method and device, electronic equipment and storage medium |
-
2020
- 2020-11-25 TW TW109141300A patent/TWI739675B/en active
-
2021
- 2021-05-11 CN CN202110509547.4A patent/CN113221734A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201803755A (en) * | 2016-07-01 | 2018-02-01 | 三星電子股份有限公司 | Apparatus and method for a vehicle platform |
TW201912476A (en) * | 2017-09-01 | 2019-04-01 | 元智大學 | Method, device, and system for driving assistant based on fuzzy-set-optimized framework |
Also Published As
Publication number | Publication date |
---|---|
CN113221734A (en) | 2021-08-06 |
TW202221563A (en) | 2022-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10936888B2 (en) | Apparatus detecting driving incapability state of driver | |
JP4926437B2 (en) | Vehicle driving support device | |
JP4872245B2 (en) | Pedestrian recognition device | |
JP2004259069A (en) | Alarm system for outputting alarm signal depending on vehicle hazard level | |
JP2013152700A (en) | Driver monitor device | |
JP2002331850A (en) | Driving behavior intention detector | |
JP2019195377A (en) | Data processing device, monitoring system, awakening system, data processing method, and data processing program | |
JP2008021269A (en) | Collision risk determining device, collision risk determining method and pedestrian identifying method | |
JP4647387B2 (en) | Vehicle driving support device | |
JP2007082594A (en) | Fatigue detection device | |
JP6331751B2 (en) | Driver inoperability detection device | |
JP6361312B2 (en) | Driver inoperability detection device | |
JP2016009256A (en) | Driver's undrivable state detector | |
JP2016009255A (en) | Driver's undrivable state detector | |
TWI522257B (en) | Vehicle safety system and operating method thereof | |
JP2016009251A (en) | Control device for vehicle | |
JP2018183532A (en) | State estimation apparatus | |
JPH07117593A (en) | Alarm device for vehicle | |
CN112238859A (en) | Driving support device | |
JP2012099085A (en) | Real-time warning system on windshield glass for vehicle, and operating method thereof | |
JP2007280352A (en) | Sight direction determination apparatus | |
TWI739675B (en) | Image recognition method and apparatus | |
TW201819226A (en) | Method for detecting driving behaviors and system thereof capable of alerting drivers to concentrate on driving before an abnormal driving behavior occurs, thereby effectively improving driving safety | |
US11807264B2 (en) | Driving assistance apparatus, driving assistance method, and medium | |
JP2018173996A (en) | Driving disabled state detector of driver |