{"id":81291,"date":"2021-06-17T09:00:24","date_gmt":"2021-06-17T03:30:24","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=81291"},"modified":"2021-06-17T09:00:24","modified_gmt":"2021-06-17T03:30:24","slug":"driver-drowsiness-detection-system","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/","title":{"rendered":"Driver Drowsiness Detection with OpenCV &amp; Dlib"},"content":{"rendered":"<p>In this project, we are going to build a driver drowsiness detection system that will detect if the eyes of the driver are close for too long and infer if the driver is sleepy or inactive.<\/p>\n<p>This can be an important safety implementation as studies suggest that accidents due to drivers getting drowsy or sleepy account for around 20% of all accidents and on certain long journey roads it&#8217;s up to 50%. It is a serious issue and most people that have driven for long hours at night can relate to the fact that fatigue and slight brief state of unconsciousness can happen to anyone and everyone.<\/p>\n<p>There has been an increase in safety systems in cars &amp; other vehicles and many are now mandatory in vehicles, but all of them cannot help if a driver falls asleep behind the wheel even for a brief moment. Hence that is what we are gonna build today &#8211; Driver Drowsiness Detection System<\/p>\n<h3>Methods &amp; Techniques Available<\/h3>\n<p>There are many techniques available for approaching this problem and each has its sets of pros and cons. We are gonna list some and then infer why we chose one for our use.<\/p>\n<h4>EEG based<\/h4>\n<p>Electroencephalogram (EEG) signal of driver measured with a single electrode neuro-signal acquisition device and a fatigue index or activity level calculated which in turn tells if the driver is likely to fall asleep. This is a wearable type system. It is fairly robust but has to be specifically tuned for different individuals in some cases.<\/p>\n<h4>Steering mounted<\/h4>\n<p>It works by recording the steering behavior of the driver at different points in the trip and infer the level of activity of driver. It is often used in conjunction with monitoring different behaviors such as pressure on the acceleration pedal, movement of the car, etc.<\/p>\n<h4>Yawning based<\/h4>\n<p>Video feed of the driver\u2019s face is continuously scanned for gestures such as yawning which indicates fatigue state of the driver. A small camera placed inside the vehicle which records the behavior of the driver and the feed is either locally or over a server scanned for yawning and such behavior.<\/p>\n<h4>Eyeblink measurement<\/h4>\n<p>Similar to yawning-based method a camera records the driver&#8217;s face and checks if the driver\u2019s eyes are closed or open. The estimated average blinking duration is between 100-400ms according to the Harward database of useful biological numbers. If the camera sees that the eye of the driver closes for a duration far more than that it marks the driver as asleep and some sort of alarm raised.<\/p>\n<p>This method has proven to be the most effective measure and easiest to implement providing satisfactory results. Hence we are going to be using the same for our project, along with yawning measurement.<\/p>\n<h3>Download Driver Drowsiness Detection Code<\/h3>\n<p>Please download the source code of python driver drowsiness detection: <a href=\"https:\/\/drive.google.com\/file\/d\/1aqN3NVKaH4z8LPthGUaBDr2CQ0q20c_7\/view?usp=sharing\"><strong>Driver Drowsiness Detection Project Code<\/strong><\/a><\/p>\n<h3>Building Driver Drowsiness Detection System<\/h3>\n<p>The libraries need for driver drowsiness detection system are<\/p>\n<ul>\n<li>Opencv<\/li>\n<li>Dlib<\/li>\n<li>Numpy<\/li>\n<\/ul>\n<p>These are the only packages you will need for this machine learning project.<\/p>\n<p>OpenCV and NumPy installation is using pip install and dlib installation using pip only works if you have cmake and vs build tools 2015 or later (if on python version&gt;=3.7)<\/p>\n<p>The easiest way is to create a python 3.6 env in anaconda and install a dlib wheel supported for python 3.6.<\/p>\n<h4>Import the libraries<\/h4>\n<p>Numpy is used for handling the data from dlib and mathematical functions. Opencv will help us in gathering the frames from the webcam and writing over them and also displaying the resultant frames.<\/p>\n<p>Dlib to extract features from the face and predict the landmark using its pre-trained face landmark detector.<\/p>\n<p>Dlib is an open source toolkit written in c++ that has a variety of machine learning models implemented and optimized. Preference is given to dlib over other libraries and training your own model because it is fairly accurate, fast, well documented, and available for academic, research, and even commercial use.<\/p>\n<p>Dlib\u2019s accuracy and speed are comparable with the most state-of-the-art neural networks, and because the scope of this project is not to train one, we\u2019ll be using dlib python wrapper.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/dlib-face-landmark.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81314\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/dlib-face-landmark.png\" alt=\"dlib face landmark\" width=\"800\" height=\"600\" \/><\/a><\/p>\n<p>Pretrained facial landmark model is available with the code, you can download it from there.<\/p>\n<p>The hypot function from the math library calculates the hypotenuse of a right-angle triangle or the distance between two points (euclidean norm).<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import numpy as np\nimport dlib\nimport cv2\n\nfrom math import hypot<\/pre>\n<p>Here we prepare our capture call to OpenCV&#8217;s video capture method that will capture the frames from the webcam in an infinite loop till we break it and stop the capture.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">cap = cv2.VideoCapture(0)<\/pre>\n<h4>Dlib&#8217;s face and facial landmark predictors<\/h4>\n<p>Keep the downloaded landmark detection .dat file in the same folder as this code file or provide a complete path in the dlib.shape_predictor function.<\/p>\n<p>This will prepare the predictor for further prediction.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">detector = dlib.get_frontal_face_detector()\n\npredictor = dlib.shape_predictor(\"shape_predictor_68_face_landmarks.dat\")\n<\/pre>\n<p>We create a function to calculate the midpoint from two given points.<\/p>\n<p>As we are gonna use this more than once in a call we create a separate function for this.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">def mid(p1 ,p2):\n    return int((p1.x + p2.x)\/2), int((p1.y + p2.y)\/2)\n<\/pre>\n<h4>Create a function for calculating the blinking ratio<\/h4>\n<p>Create a function for calculating the blinking ratio or the eye aspect ratio of the eyes. There are six landmarks for representing each eye.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/eye-aspect-ratio.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81317\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/eye-aspect-ratio.jpg\" alt=\"eye aspect ratio\" width=\"273\" height=\"185\" \/><\/a><\/p>\n<p>Starting from the left corner moving clockwise. We find the ratio of height and width of the eye to infer the open or close state of the eye.blink-ratio=(|p2-p6|+|p3-p5|)(2|p1-p4|).\u00a0The ratio falls to approximately zero when the eye is close but remains constant when they are open.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">def eye_aspect_ratio(eye_landmark, face_roi_landmark):\n    left_point = (face_roi_landmark.part(eye_landmark[0]).x, face_roi_landmark.part(eye_landmark[0]).y)\n    right_point = (face_roi_landmark.part(eye_landmark[3]).x, face_roi_landmark.part(eye_landmark[3]).y)\n\n    center_top = mid(face_roi_landmark.part(eye_landmark[1]), face_roi_landmark.part(eye_landmark[2]))\n    center_bottom = mid(face_roi_landmark.part(eye_landmark[5]), face_roi_landmark.part(eye_landmark[4]))\n\n    hor_line_length = hypot((left_point[0] - right_point[0]), (left_point[1] - right_point[1]))\n    ver_line_length = hypot((center_top[0] - center_bottom[0]), (center_top[1] - center_bottom[1]))\n\n    ratio = hor_line_length \/ ver_line_length\n    return ratio\n<\/pre>\n<h4>Create a function for calculating mouth aspect ratio<\/h4>\n<p>Similarly, we define the mouth ratio function for finding out if a person is yawning or not. This function gives the ratio of height to width of mouth. If height is more than width it means that the mouth is wide open.<\/p>\n<p>For this as well we use a series of points from the dlib detector to find the ratio.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">def mouth_aspect_ratio(lips_landmark, face_roi_landmark):\n    left_point = (face_roi_landmark.part(lips_landmark[0]).x, face_roi_landmark.part(lips_landmark[0]).y)\n    right_point = (face_roi_landmark.part(lips_landmark[2]).x, face_roi_landmark.part(lips_landmark[2]).y)\n\n    center_top = (face_roi_landmark.part(lips_landmark[1]).x, face_roi_landmark.part(lips_landmark[1]).y)\n    center_bottom = (face_roi_landmark.part(lips_landmark[3]).x, face_roi_landmark.part(lips_landmark[3]).y)\n\n    hor_line_length = hypot((left_point[0] - right_point[0]), (left_point[1] - right_point[1]))\n    ver_line_length = hypot((center_top[0] - center_bottom[0]), (center_top[1] - center_bottom[1]))\n    if hor_line_length == 0:\n        return ver_line_length\n    ratio = ver_line_length \/ hor_line_length\n    return ratio\n<\/pre>\n<p>We create a counter variable to count the number of frames the eye has been close for or the person is yawning and later use to define drowsiness in driver drowsiness detection system project<\/p>\n<p>Also, we declare the font for writing on images with opencv.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">count = 0\n\nfont = cv2.FONT_HERSHEY_TRIPLEX\n<\/pre>\n<h4>Begin processing of frames<\/h4>\n<p>Creating an infinite loop we receive frames from the opencv capture method.<\/p>\n<p>We flip the frame because mirror image and convert it to grayscale. Then pass it to the face detector.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">while True:\n    _, img = cap.read()\n    img = cv2.flip(img,1)\n    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\n\n    faces = detector(gray)\n<\/pre>\n<p>We loop if there are more than one face in the frame and calculate for all faces. Passing the face to the landmark predictor we get the facial landmarks for further analysis.<\/p>\n<p>Passing the points of each eye to the compute_blinking_ratio function we calculate the ratio for both the eyes and then take the mean of it.<\/p>\n<p>We also put the ratio on the top of the image.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">    for face_roi in faces:\n\n        landmark_list = predictor(gray, face_roi)\n\n        left_eye_ratio = eye_aspect_ratio([36, 37, 38, 39, 40, 41], landmark_list)\n        right_eye_ratio = eye_aspect_ratio([42, 43, 44, 45, 46, 47], landmark_list)\n        eye_open_ratio = (left_eye_ratio + right_eye_ratio) \/ 2\n        cv2.putText(img, str(eye_open_ratio), (0, 13), font, 0.5, (100, 100, 100))\n        ###print(left_eye_ratio,right_eye_ratio,eye_open_ratio)\n\n\/\/Similarly we calculate the ratio for the mouth to get yawning status, for both outer and inner lips to be more accurate and calculate its mean.\n\n        inner_lip_ratio = mouth_aspect_ratio([60,62,64,66], landmark_list)\n        outter_lip_ratio = mouth_aspect_ratio([48,51,54,57], landmark_list)\n        mouth_open_ratio = (inner_lip_ratio + outter_lip_ratio) \/ 2;\n        cv2.putText(img, str(mouth_open_ratio), (448, 13), font, 0.5, (100, 100, 100))\n        ###print(inner_lip_ratio,outter_lip_ratio,mouth_open_ratio)\n<\/pre>\n<p>Now that we have our data we check if the mouth is wide open and the eyes are not closed. If we find that either of these situations occurs we increment the counter variable counting the number of frames the situation is persisting.<\/p>\n<p>We also find the coordinates for the face bounding box<\/p>\n<p>If the eyes are close or yawning occurs for more than 10 consecutive frames we infer the driver as drowsy and print that on the image as well as creating the bounding box red, else just create a green bounding box<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">if mouth_open_ratio &gt; 0.380 and eye_open_ratio &gt; 4.0 or eye_open_ratio &gt; 4.30:\n    count +=1\nelse:\n    count = 0\nx,y = face_roi.left(), face_roi.top()\nx1,y1 = face_roi.right(), face_roi.bottom()\nif count&gt;10:\n    cv2.rectangle(img, (x,y), (x1,y1), (0, 0, 255), 2)\n    cv2.putText(img, \"Sleepy\", (x, y-5), font, 0.5, (0, 0, 255))\n    \nelse:\n    cv2.rectangle(img, (x,y), (x1,y1), (0, 255, 0), 2)\n<\/pre>\n<p>Finally, we show the frame and wait for the esc keypress to exit the infinite loop.<\/p>\n<p>After we exit the loop we release the webcam capture and close all the windows and exit the program.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">cap.release()\n\ncv2.destroyAllWindows()\n<\/pre>\n<h3>Driver Drowsiness Detection Output<\/h3>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/driver-drowsiness-detection-output.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81316\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/driver-drowsiness-detection-output.jpg\" alt=\"driver drowsiness detection output\" width=\"1099\" height=\"429\" \/><\/a><\/p>\n<h3>Summary<\/h3>\n<p>we have successfully created driver drowsiness detector, we can implement it in other projects like computer vision, self-driving cars, drive safety, etc.<\/p>\n<p>Driver drowsiness project can be used with a raspberry pie to create a standalone system for drivers, used as a web service, or installed in workplaces to monitor employees&#8217; activity. The sensitivity and the number of frames can be changed according to the requirements.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this project, we are going to build a driver drowsiness detection system that will detect if the eyes of the driver are close for too long and infer if the driver is sleepy&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":81315,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[210],"tags":[3594,3595,3596,3597,204,3598],"class_list":["post-81291","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-machine-learning","tag-computer-vision-python","tag-driver-drowsiness-detection","tag-driver-drowsiness-detection-python","tag-driver-drowsiness-detection-system","tag-machine-learning-project","tag-python-machine-learning-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Driver Drowsiness Detection with OpenCV &amp; Dlib - TechVidvan<\/title>\n<meta name=\"description\" content=\"Create Driver drowsiness detection system with Python, OpenCV, Dlib. With Eyeblink measurement check driver&#039;s eye and mouth and notify drowsiness\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Driver Drowsiness Detection with OpenCV &amp; Dlib - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Create Driver drowsiness detection system with Python, OpenCV, Dlib. With Eyeblink measurement check driver&#039;s eye and mouth and notify drowsiness\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-17T03:30:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/driver-drowsiness-detection-python-opencv-ml.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Driver Drowsiness Detection with OpenCV &amp; Dlib - TechVidvan","description":"Create Driver drowsiness detection system with Python, OpenCV, Dlib. With Eyeblink measurement check driver's eye and mouth and notify drowsiness","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/","og_locale":"en_US","og_type":"article","og_title":"Driver Drowsiness Detection with OpenCV &amp; Dlib - TechVidvan","og_description":"Create Driver drowsiness detection system with Python, OpenCV, Dlib. With Eyeblink measurement check driver's eye and mouth and notify drowsiness","og_url":"https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2021-06-17T03:30:24+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/driver-drowsiness-detection-python-opencv-ml.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Driver Drowsiness Detection with OpenCV &amp; Dlib","datePublished":"2021-06-17T03:30:24+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/"},"wordCount":1344,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/driver-drowsiness-detection-python-opencv-ml.jpg","keywords":["computer vision Python","driver drowsiness detection","driver drowsiness detection python","driver drowsiness detection system","machine learning project","Python machine learning project"],"articleSection":["Machine Learning Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/","url":"https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/","name":"Driver Drowsiness Detection with OpenCV &amp; Dlib - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/driver-drowsiness-detection-python-opencv-ml.jpg","datePublished":"2021-06-17T03:30:24+00:00","description":"Create Driver drowsiness detection system with Python, OpenCV, Dlib. With Eyeblink measurement check driver's eye and mouth and notify drowsiness","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/driver-drowsiness-detection-python-opencv-ml.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/driver-drowsiness-detection-python-opencv-ml.jpg","width":1200,"height":628,"caption":"driver drowsiness detection python opencv ml"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/driver-drowsiness-detection-system\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Driver Drowsiness Detection with OpenCV &amp; Dlib"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/81291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=81291"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/81291\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/81315"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=81291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=81291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=81291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}