<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by David Perez Vicens on Medium]]></title>
        <description><![CDATA[Stories by David Perez Vicens on Medium]]></description>
        <link>https://medium.com/@davidpv?source=rss-56271bb62c6d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*B-bHCtc0Zw3RC6-b.</url>
            <title>Stories by David Perez Vicens on Medium</title>
            <link>https://medium.com/@davidpv?source=rss-56271bb62c6d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 14:44:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@davidpv/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Eyes on the road]]></title>
            <link>https://medium.com/saturdays-ai/eyes-on-the-road-70b0dbeebacd?source=rss-56271bb62c6d------2</link>
            <guid isPermaLink="false">https://medium.com/p/70b0dbeebacd</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[ai-saturdays]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[face-detection-app]]></category>
            <category><![CDATA[random-forest]]></category>
            <dc:creator><![CDATA[David Perez Vicens]]></dc:creator>
            <pubDate>Sat, 12 Aug 2023 08:46:57 GMT</pubDate>
            <atom:updated>2023-08-26T20:48:43.734Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Driver Drowsiness model prediction. Saturdays AI</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NGfTo0EamJOF4ZkItIUmBQ.png" /></figure><p>Eyes on the road is a project developed as part of <a href="https://saturdays.ai/">Saturdays AI</a> in Alicante in the first half of 2023. During six weeks, students learned different approaches to use artificial intelligence like supervised and unsupervised learning, random forest, regression or natural language processing tools.</p><p>After the training sessions, students had to develop a social project with all the concepts learned and we though that what is more social that saving lives? In Spain, the cause of four out of ten accidents is drivers getting sleepy. That’s why we decided to develop a tool to prevent drivers getting sleepy while driving using a low cost device like a Raspberry Pi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*5qc9npTOkT79fUuh8ONjIA.png" /></figure><p>After different unlucky attempts, we took a direct approach, let’s use a model that calculates how closed your eyes are so we can play a sound or an alarm when this happens.</p><p>The first step was to acquire and process all the images from the dataset. We used the <a href="https://dmd.vicomtech.org/">DMD (Driving Monitoring Dataset)</a>, more specifically the fatigue related subset.</p><p>The <a href="http://dmd.vicomtech.org/">Driver Monitoring Datase</a>t is the largest visual dataset for real driving actions, with footage from synchronized multiple cameras (body, face, hands) and multiple streams (RGB, Depth, IR) recorded in two scenarios (real car, driving simulator). Different annotated labels related to distraction, fatigue and gaze-head pose can be used to train Deep Learning models for Driver Monitor Systems.</p><p>The DMD content consists of hundreds of videos for each subset, an example of the video frame sample can be shown bellow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*haAhCrbDQVOajUDFZCiSiQ.png" /></figure><p>Each video comes with a JSON file that labels each frame with a specific category with the following strcuture.</p><pre>...<br>&quot;actions&quot;: {<br>      &quot;0&quot;: {<br>        &quot;name&quot;: &quot;&quot;,<br>        &quot;type&quot;: &quot;eyes_state/open&quot;,<br>        &quot;frame_intervals&quot;: [<br>          { &quot;frame_start&quot;: 23, &quot;frame_end&quot;: 33 },<br>          { &quot;frame_start&quot;: 45, &quot;frame_end&quot;: 51 },<br>...js</pre><p>Due that all the original DMD dataset were videos we have to challenge to process all videos and extract the specific frames that were labeled as awake and drowsy, that way all model could be more efficient in processing each image from the webcam. To accomplish this, we created a script that processes all the labels in json format and extracts the frames into each labeled folder.</p><pre>import os<br>import cv2<br>import json<br>import re<br><br># Path to the dataset/raw folder<br>json_folder = &#39;dmd/raw&#39;<br><br># Create output directory if it doesn&#39;t exist<br>output_dir = &#39;dmd/labels&#39;<br>os.makedirs(output_dir, exist_ok=True)<br><br><br># Function to sanitize folder names<br>def sanitize_folder_name(folder_name):<br>    # Replace invalid characters with underscores<br>    folder_name = re.sub(r&#39;[&lt;&gt;:&quot;/\\|?*]&#39;, &#39;_&#39;, folder_name)<br>    # Remove leading and trailing whitespaces<br>    folder_name = folder_name.strip()<br>    return folder_name<br><br><br># Process each JSON file in the folder<br>for filename in os.listdir(json_folder):<br>    if filename.endswith(&#39;.json&#39;):<br>        json_path = os.path.join(json_folder, filename)<br><br>        # Load JSON data<br>        with open(json_path) as json_file:<br>            data = json.load(json_file)<br><br>        # Set video_path based on the JSON filename<br>        video_filename = filename.replace(&#39;ann_drowsiness.json&#39;, &#39;face.mp4&#39;)<br>        video_path = os.path.join(json_folder, video_filename)<br><br>        # Process each action in the JSON data<br>        for action_key, action_value in data[&#39;openlabel&#39;][&#39;actions&#39;].items():<br>            action_type = action_value[&#39;type&#39;]<br>            action_type_folder = sanitize_folder_name(action_type)<br>            frame_intervals = action_value[&#39;frame_intervals&#39;]<br><br>            # Create subfolder for the action type if it doesn&#39;t exist<br>            action_folder = os.path.join(output_dir, action_type_folder)<br>            os.makedirs(action_folder, exist_ok=True)<br><br>            # Process frame intervals<br>            for interval in action_value[&#39;frame_intervals&#39;]:<br>                frame_start = interval[&#39;frame_start&#39;]<br>                frame_end = interval[&#39;frame_end&#39;]<br><br>                # Open video file for reading<br>                video = cv2.VideoCapture(video_path)<br><br>                # Set video frame position to the start frame<br>                video.set(cv2.CAP_PROP_POS_FRAMES, frame_start)<br><br>                # Read and save frames until the end frame is reached<br>                for frame_num in range(frame_start, frame_end + 1):<br>                    ret, frame = video.read()<br>                    if ret:<br>                        # Save frame as a JPG image<br>                        output_filename = f&#39;{frame_num}.jpg&#39;<br>                        output_path = os.path.join(action_folder, output_filename)<br>                        cv2.imwrite(output_path, frame)<br><br>                        print(f&#39;Saved frame: {output_path}&#39;)<br>                    else:<br>                        break<br><br>                # Release video resources<br>                video.release()</pre><p>With this scripts we processed each video and extracted every frame that was labeled in each interval. You end with a structure of <strong>folders named by label</strong> (blinks_blinking, eyes_state_close, eyes_state_closing, eyes_state_open, eyes_state_opening, eyes_state_undefined) but we need to simplify even more all the labels and ended using only a <strong>binary approach</strong> with “<strong>awake</strong>” and “<strong>drowsy</strong>” labels.</p><p>Now that we have accomplished <strong>transforming video processing</strong> (heavy CPU load) into <strong>image processing</strong> we can focus in the next step.</p><h3>Face landmarks detection</h3><p>We could start training our model with these images but the primary tests we did were pretty inaccurate due that all the images were based in a few people diversity subset and in the same light conditions. To solve this we processed all the images with an already generated <strong>open source library called </strong><a href="http://dlib.net/"><strong>DLIB</strong></a> to detect faces landmarks such as mouth outline, eyes outline and face outline.</p><p><strong>Dlib</strong> is a modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ to solve real world problems. It is used in both industry and academia in a wide range of domains including robotics, embedded devices, mobile phones, and large high performance computing environments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*SpIZifeMlAzAlsvlvdG2qw.png" /><figcaption>These are the face landmarks points that we can get for each frame.</figcaption></figure><p>For blink detection, we are only interested in two sets of facil strcutures (the eyes).</p><p>For each eye, we have 6 *(x, y)*coordinates. These start at the left-corner of the eye, as if you were looking at the person, and then go clockwise around the rest of the region:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*U0DACujkICySHmbr5yI17g.png" /></figure><p>According to Soukupová and Čech’s 2016 paper titled “Real-Time Eye Blink Detection using Facial Landmarks,” there’s a relationship between the width and height of certain coordinates. This relationship can be expressed through an equation called the “eye aspect ratio” (EAR).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ze13C-v4rV89kQKkBnd6rA.png" /></figure><p>The equation uses 2D facial landmark locations to measure the distance between vertical and horizontal eye landmarks. The numerator measures vertical eye landmark distance and the denominator measures horizontal eye landmark distance. The equation is useful because it can detect blinking by noticing when the eye aspect ratio falls to zero. With this equation, we don’t need to use image processing, we can just rely on the ratio of eye landmark distances. The figure below from Soukupová and Čech can help illustrate this better.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*09bsYPFdfh9U80p7g8rmtg.png" /></figure><p>In the top left, there is an open eye that stays mostly the same size over time.</p><p>When the person blinks (top right), the eye gets much smaller.</p><p>The bottom graph shows how the eye changes size over time in a video clip. It starts out mostly the same, then quickly becomes very small, and then gets big again, which shows that the person blinked once.</p><p>Our goal is to transform all images into a CSV dataset that binds every image into a 0/1 depending if we detect the person is awake of drowsy by processing the face landmarks using the “eye aspect ratio” EAR.</p><pre>import os<br>import cv2<br>import imutils<br>from imutils import face_utils<br>import dlib<br>import glob2<br>import matplotlib.pyplot as plt<br>import pandas as pd<br>from scipy.spatial import distance as dist<br><br>DATASET = &#39;./dmd/binary_labels&#39;<br>CSV_FILE = &#39;landmarks.csv&#39;<br>detector = dlib.get_frontal_face_detector()<br>predictor = dlib.shape_predictor(&#39;dlib/shape_predictor_68_face_landmarks.dat&#39;)<br><br>EYE_AR_THRESH = 0.3<br>MOUTH_AR_THRESH = 0.2<br><br>def get_landmarks_ratios(frame):<br><br>    frame = imutils.resize(frame, width=640)<br>    gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)<br><br>    # detect faces<br>    faces = detector(gray)<br>    print(f&#39;Faces: {len(faces)}&#39;)<br><br>    if len(faces) == 0:<br>        return None<br><br>    # get the largest face<br>    largest_face = None;<br>    for face in faces:<br>        largest_face_area = 0;<br>        if face.area() &gt; largest_face_area:<br>            largest_face = face<br><br>    shape = predictor(gray, largest_face)<br><br>    # Extracting the indices of the facial features<br>    (lStart, lEnd) = face_utils.FACIAL_LANDMARKS_IDXS[&quot;left_eye&quot;]<br>    (rStart, rEnd) = face_utils.FACIAL_LANDMARKS_IDXS[&quot;right_eye&quot;]<br>    (mStart, mEnd) = face_utils.FACIAL_LANDMARKS_IDXS[&quot;inner_mouth&quot;]<br><br>    # Get coordinates for left eye, right eye, and mouth<br>    left_eye = [(shape.part(i).x, shape.part(i).y) for i in range(lStart, lEnd)]<br>    right_eye = [(shape.part(i).x, shape.part(i).y) for i in range(rStart, rEnd)]<br>    mouth = [(shape.part(i).x, shape.part(i).y) for i in range(mStart, mEnd)]<br><br>    # Compute aspect ratios for the eyes and mouth<br>    def eye_aspect_ratio(eye):<br>        A = dist.euclidean(eye[1], eye[5])<br>        B = dist.euclidean(eye[2], eye[4])<br>        C = dist.euclidean(eye[0], eye[3])<br>        ear = (A + B) / (2.0 * C)<br>        return ear<br><br>    def mouth_aspect_ratio(mouth):<br>        A = dist.euclidean(mouth[2], mouth[6])<br>        C = dist.euclidean(mouth[0], mouth[4])<br>        mar = A / C<br>        return mar<br><br>    left_ear = eye_aspect_ratio(left_eye)<br>    right_ear = eye_aspect_ratio(right_eye)<br>    mouth_ar = mouth_aspect_ratio(mouth)<br><br>    return left_ear, right_ear, mouth_ar</pre><h3><strong>Dataset creation</strong></h3><p>Finally, we can create our CSV file using all the processed information. The CSV file will include the Image name, Left Eye AR, Right Eye AR, Mouth AR, and a binary value of 0/1 depending on the awareness state.</p><pre>if os.path.exists(CSV_FILE):<br>    csv = pd.read_csv<br>else:<br>    # Create a DataFrame to hold the data<br>    df = pd.DataFrame(columns=[&quot;Image&quot;, &quot;Left_Eye_AR&quot;, &quot;Right_Eye_AR&quot;, &quot;Mouth_AR&quot;, &quot;Awake&quot;])<br>    file_paths = glob2.glob(DATASET + &#39;/**/*.jpg&#39;)<br>    data = []<br><br>    for i, file_path in enumerate(file_paths):<br><br>        awake = 1 if &#39;awake&#39; in file_path else 0<br>        print(f&#39;Awake: {awake}&#39;)<br>        img = cv2.imread(file_path)<br>        ratios = get_landmarks_ratios(img)<br><br>        if img is not None and ratios is not None:<br>            # for ratio in ratios:<br><br>            print(f&quot;{ratios}\n&quot;)<br>            if img is not None and ratios is not None:<br>                row = {<br>                    &quot;Image&quot;: file_path,<br>                    &quot;Left_Eye_AR&quot;: ratios[0],<br>                    &quot;Right_Eye_AR&quot;: ratios[1],<br>                    &quot;Mouth_AR&quot;: ratios[2],<br>                    &quot;Awake&quot;: awake<br>                }<br>                data.append(row)<br><br><br>    df = pd.concat([df, pd.DataFrame(data)], ignore_index=True)  # concatenate the new data with the old dataframe<br><br>    df.to_csv(&#39;landmarks_ratios.csv&#39;, index=False)</pre><p>Sample of the CSV generated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-P47ZP8XnUMMJKXU21U4TA.png" /></figure><p>The next step is to conduct a study of all available model options and review all dataset information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*8-DdsMf_jz4SBBKoyVNZ6g.png" /></figure><p>Using the describe method, we can precisely adjust the minimum and maximum thresholds for the eyes and mouth to achieve accurate detection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-7g1X5LJaRUdbbeI5e0o2w.png" /></figure><p>After processing the distribution image we observed that our dataset is well balanced.</p><h3>Model selection and training</h3><p>We tested all three model approaches using hyperparameters to get the best fit model, each with its own advantages and disadvantages:</p><h4>Support Vector Machines (SVM)</h4><p>This algorithm can model complex, non-linear relationships. It may work better than Logistic Regression if such relationships are present in the data. However, it may take longer to train, especially with large datasets.</p><pre>start = time.time()<br>svm_params = {<br>  &#39;gamma&#39;: [&#39;scale&#39;, &#39;auto&#39;, 1, 0.1, 0.01, 0.001],<br>    &#39;C&#39;: [0.1, 1],<br>    &#39;kernel&#39;: [&#39;rbf&#39;,  &#39;sigmoid&#39;]<br>}<br>svm_grid_search = GridSearchCV(SVC(probability=True), svm_params, cv=5)<br><br># Fit the model<br>svm_grid_search.fit(X_train, y_train)<br><br>end = time.time()<br>print(f&#39;Time taken to train model: {end - start} seconds&#39;)<br>print(&#39;Best parameters for SVM: &#39;, svm_grid_search.best_params_)<br><br>joblib.dump(svm_grid_search, MODEL_PATH + &#39;/svm.pkl&#39; )<br><br>evaluate_model(svm_grid_search)Py</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iFXpJsvn5rvRMBgGO1JEbQ.png" /></figure><h4><strong>Random Forest Classifier</strong></h4><p>This is an ensemble method that builds multiple decision trees and combines their predictions. It often performs well out-of-the-box and can handle non-linear relationships.</p><pre>start = time.time()<br>rf_params = {<br>    &#39;n_estimators&#39;: [100, 200],<br>    &#39;max_depth&#39;: [10, 20],<br>    &#39;min_samples_split&#39;: [2, 5],<br>    &#39;min_samples_leaf&#39;: [1, 2],<br>}<br>rf_grid_search = GridSearchCV(RandomForestClassifier(random_state=0), rf_params, cv=5)<br><br>rf_grid_search.fit(X_train, y_train)<br><br>end = time.time()<br><br>joblib.dump(rf_grid_search, MODEL_PATH + &#39;/rfgrid.pkl&#39; )<br><br>print(&#39;Best parameters for RandomForestClassifier: &#39;, rf_grid_search.best_params_)<br>print(f&#39;Time taken to train model: {end - start} seconds&#39;)<br><br>evaluate_model(rf_grid_search)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D5D9-WWg4FxKZBcvLpezcw.png" /></figure><h4><strong>Gradient Boosting Classifier</strong></h4><p>This is another powerful ensemble method, which builds trees sequentially, each trying to correct the mistakes of the previous one.</p><pre>start = time.time()<br><br>gb_params = {<br>    &#39;n_estimators&#39;: [100, 200],<br>    &#39;learning_rate&#39;: [0.01, 0.1],<br>    &#39;max_depth&#39;: [3, 5],<br>    &#39;min_samples_split&#39;: [2, 5],<br>    &#39;min_samples_leaf&#39;: [1, 2],<br>}<br><br>gb_grid_search = GridSearchCV(GradientBoostingClassifier(random_state=42), gb_params, cv=5)<br><br>gb_grid_search.fit(X_train, y_train)<br><br>end = time.time()<br><br>joblib.dump(gb_grid_search, MODEL_PATH + &#39;/gbgrid.pkl&#39; )<br><br>print(&#39;Best parameters for GradientBoostingClassifier: &#39;, gb_grid_search.best_params_)<br>print(f&#39;Time taken to train model: {end - start} seconds&#39;)<br><br>evaluate_model(gb_grid_search)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_SVeRbyFN7aK06m9Rs40BA.png" /></figure><h3>Result evaluation</h3><p>The confusion matrix shows the false positives and negatives that our model detects, this value being quite low compared to the accurate predictions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B95snpqt9zPpDa4ZBwj2VA.png" /></figure><h3>Raspberry Pi Integration</h3><p>The next step is to develop a program that can process real-time images from a Raspberry Pi Webcam, extract the coordinates of facial landmarks, and analyze them using the trained random forest model.</p><p>Here is the workflow for the program.</p><ol><li>Boot and initialize Pi &amp; Webcam.</li><li>Detect face and face landmark points.</li><li>Extract and clean landmakrs points.</li><li>Transform and normalize landmark points into csv format.</li><li>Predict 0/1 (awake status) using transformed data.</li><li>Store prediction in a timeline buffer.</li><li>Trigger PI sound if buffer algorithm predicts an increment in drowsiness.</li></ol><p>Here is the code for the program.</p><pre>import dlib<br>import glob2<br>import os<br>import cv2<br>import imutils<br>from matplotlib import pyplot as plt<br>import joblib<br><br>DATASET = &#39;datasets/dmd/test&#39;<br>detector = dlib.get_frontal_face_detector()<br>predictor = dlib.shape_predictor(&#39;datasets/dlib/shape_predictor_68_face_landmarks.dat&#39;)<br><br>def get_landmarks_ratios(frame):<br><br>    frame = imutils.resize(frame, width=640)<br>    gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)<br><br>    # detect faces<br>    faces = detector(gray)<br><br>    if len(faces) == 0:<br>        return None<br><br>    # get the largest face<br>    largest_face = None;<br>    for face in faces:<br>        largest_face_area = 0;<br>        if face.area() &gt; largest_face_area:<br>            largest_face = face<br><br>    shape = predictor(gray, largest_face)<br><br>    # Extracting the indices of the facial features<br>    (lStart, lEnd) = face_utils.FACIAL_LANDMARKS_IDXS[&quot;left_eye&quot;]<br>    (rStart, rEnd) = face_utils.FACIAL_LANDMARKS_IDXS[&quot;right_eye&quot;]<br>    (mStart, mEnd) = face_utils.FACIAL_LANDMARKS_IDXS[&quot;inner_mouth&quot;]<br><br>    # Get coordinates for left eye, right eye, and mouth<br>    left_eye = [(shape.part(i).x, shape.part(i).y) for i in range(lStart, lEnd)]<br>    right_eye = [(shape.part(i).x, shape.part(i).y) for i in range(rStart, rEnd)]<br>    mouth = [(shape.part(i).x, shape.part(i).y) for i in range(mStart, mEnd)]<br><br>    # Compute aspect ratios for the eyes and mouth<br>    def eye_aspect_ratio(eye):<br>        A = dist.euclidean(eye[1], eye[5])<br>        B = dist.euclidean(eye[2], eye[4])<br>        C = dist.euclidean(eye[0], eye[3])<br>        ear = (A + B) / (2.0 * C)<br>        return ear<br><br>    def mouth_aspect_ratio(mouth):<br>        A = dist.euclidean(mouth[2], mouth[6])<br>        C = dist.euclidean(mouth[0], mouth[4])<br>        mar = A / C<br>        return mar<br><br>    left_ear = eye_aspect_ratio(left_eye)<br>    right_ear = eye_aspect_ratio(right_eye)<br>    mouth_ar = mouth_aspect_ratio(mouth)<br><br>    return left_ear, right_ear, mouth_ar<br><br>file_paths = glob2.glob(DATASET + &#39;/**/*.jpg&#39;)<br>rows = []<br>model = joblib.load(MODEL_PATH + &#39;/pimodel.pkl&#39;)<br>for i, file_path in enumerate(file_paths):<br><br>    img = cv2.imread(file_path)<br>    ratios = get_landmarks_ratios(img)<br><br>    print(&#39;\n&#39;)<br>    print(f&#39;image: {file_path}&#39;)<br>    if img is not None and ratios is not None:<br>        features = np.array([ratios])<br>        features = features.reshape(1, -1)<br>        predictions = model.predict(features)<br>        print(predictions)<br>        print(&#39;Awake&#39; if predictions[0] else &#39;Drowsy&#39;)<br>    else:<br>        print(&#39;No faces detected in the image.&#39;)</pre><h3>Demo</h3><p>Here you can find a video we recorded with the set up and the application we developed running, playing a sound when we were getting sleepy.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fw8PRt0f7nVg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dw8PRt0f7nVg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fw8PRt0f7nVg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/700aa5850a440349851611024bb973ce/href">https://medium.com/media/700aa5850a440349851611024bb973ce/href</a></iframe><h3>Conclusion</h3><p>With additional time, you could refine the prediction model and incorporate more variables. It may be beneficial to utilize a categorization prediction model rather than a binary prediction, as it allows for more flexibility in processing predictions.</p><h3>Additional info</h3><p>You can find more information about the project at:</p><ul><li><a href="https://frangarcia.github.io/eyesontheroad/">https://frangarcia.github.io/eyesontheroad/</a></li><li><a href="https://frangarcia.github.io/eyesontheroad/presentation/index.html">https://frangarcia.github.io/eyesontheroad/presentation/index.html</a></li><li><a href="https://github.com/frangarcia/eyesontheroad">https://github.com/frangarcia/eyesontheroad</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70b0dbeebacd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/saturdays-ai/eyes-on-the-road-70b0dbeebacd">Eyes on the road</a> was originally published in <a href="https://medium.com/saturdays-ai">Saturdays.AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>