{"id":9450,"date":"2023-02-13T19:04:49","date_gmt":"2023-02-14T00:04:49","guid":{"rendered":"https:\/\/blogs.mathworks.com\/student-lounge\/?p=9450"},"modified":"2026-03-09T08:15:05","modified_gmt":"2026-03-09T12:15:05","slug":"hacking-a-youtube-creator-assistant-with-matlab","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/student-lounge\/2023\/02\/13\/hacking-a-youtube-creator-assistant-with-matlab\/","title":{"rendered":"Hacking a YouTube Creator Assistant with MATLAB"},"content":{"rendered":"<div class=\"rtcContent\">\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Are you a content creator that is looking to make your content thumbnails more eye catching? Joining us today is <a href=\"https:\/\/www.linkedin.com\/in\/nathanfong1\/\"><span style=\"font-weight: bold; font-style: italic; text-decoration: underline;\">Nathan Fong<\/span><\/a><span style=\"font-style: italic;\"> and <\/span><a href=\"https:\/\/www.linkedin.com\/in\/stuart-fong\/\"><span style=\"font-weight: bold; font-style: italic; text-decoration: underline;\">Stuart Fong <\/span><\/a><span style=\"font-style: italic;\">from Queens University in Canada! Read on to learn more about how their hack can help you! Over to you&#8217;ll guys..<\/span><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Hi everybody, Nathan and Stuart Fong here! We are second-year computer science students at Queen\u2019s University located in Ontario, Canada. We are hackathon lovers who enjoy learning about data science and machine learning. On July 15-17, we participated in the <a href=\"https:\/\/selfiehacksii.devpost.com\/\"><span style=\"font-weight: bold; text-decoration: underline;\">SelfieHacks II<\/span><\/a> hackathon hosted by <a href=\"http:\/\/mlh.io\/\"><span style=\"font-weight: bold; text-decoration: underline;\">Major League Hacking (MLH)<\/span><\/a> and created a project called YouTube Creator Assistant, which won the prize for best use of MATLAB.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 559px; height: 311px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2023\/02\/RLB_YouTubeCreatorAssistant_1.png\" alt=\"YCA Team Photo.jpeg\" width=\"559\" height=\"311\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><a href=\"https:\/\/www.linkedin.com\/in\/nathanfong1\/\"><span style=\"font-weight: bold; font-style: italic; text-decoration: underline;\">Nathan<\/span><\/a><span style=\"font-style: italic;\"> (left) and <\/span><a href=\"https:\/\/www.linkedin.com\/in\/stuart-fong\/\"><span style=\"font-weight: bold; font-style: italic; text-decoration: underline;\">Stuart<\/span><\/a><span style=\"font-style: italic;\"> (right)<\/span><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<h2 style=\"margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\"><span style=\"font-weight: bold; text-decoration: underline;\">Inspiration<\/span>:<\/h2>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Going into SelfieHacks II, we had no ideas on what to make, but we knew that we wanted to create a project that empowered content creators. During our brainstorming session, we wondered \u201cWhat is something that all content creators struggle with?,\u201d where we came up with the idea to help content creators to grow their communities. We then narrowed the scope to helping YouTube creators, and helping their content reach a wider audience.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">If we wanted to track how many people are actively engaging with a channel, one of the best indicators is the view count of their videos. As views and subscribers are main indicators of the success of a video or channel, we wanted to make a tool that increases these numbers. This then increases the exposure of their videos to new users, allowing the channel to grow. Thinking in this way, we finally came up with our project idea, which we called YouTube Creator Assistant.<\/div>\n<h2 style=\"margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\"><span style=\"font-weight: bold; text-decoration: underline;\">Breaking down the problem<\/span>:<\/h2>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">We started with looking at the YouTube homepage and identifying what elements would persuade a user to click on a certain video over another, such as the title and thumbnail. In our program, we wanted to take these components of the video to generate a predicted view count. The user can test various combinations of components such as thumbnails, titles, video duration and categories to maximise the number of views. While editing can be done with trial and error after the video has been published, our solution allows it to be done beforehand. Views can then be gained more easily during the time that is most crucial: right at the beginning.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<h2 style=\"margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\"><span style=\"font-weight: bold; text-decoration: underline;\">How did we implement it?<\/span>:<\/h2>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">We used the <a href=\"https:\/\/www.kaggle.com\/datasets\/praneshmukhopadhyay\/youtube-thumbnail-dataset\"><span style=\"font-weight: bold; text-decoration: underline;\">Youtube Thumbnail<\/span><\/a> and <a href=\"https:\/\/www.kaggle.com\/datasets\/praneshmukhopadhyay\/youtubers-saying-things\"><span style=\"font-weight: bold; text-decoration: underline;\">Youtubers Saying Things<\/span><\/a> datasets, but before we could use them, we had to clean the data. To start off, some of the columns were unneeded such as the video link and transcript. While we could use the video itself to pull some features, we decided against it for now and deleted the columns. Moving on, some of the variables were not in usable formats, where viewer and subscriber counts were abbreviated, and the video length was in HH:MM:SS format. Fixing this in MATLAB was very convenient as we could open the data table beside us, allowing us to see changes in real-time.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 619px; height: 329px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2023\/02\/RLB_YouTubeCreatorAssistant_2.png\" alt=\"YCA Data.png\" width=\"619\" height=\"329\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">To create our model, we first looked at the types of data we had, which included images for the thumbnails, language data for the titles, and tabular data for the rest of the information. For the thumbnails, we used a convolutional neural network (CNN) to identify eye-catching elements of the image (AKA clickbait). Next for the titles, we extracted features that we thought were useful, such as the length and the percentage of capital letters. Finally for the tabular data, we used a fully connected neural network to predict how each variable relates to the resulting number of viewers. Then, we combined the outputs of the two networks, giving us the predicted viewer count.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">After being introduced to MATLAB during a <a href=\"https:\/\/youtu.be\/TChyQCgsZZw\"><span style=\"font-weight: bold; text-decoration: underline;\">workshop at Local Hack Day: Build 2022<\/span><\/a>, we wanted to try using one of the tools, Deep Network Designer, to build our neural networks. While using it, we saw how easy it was to prototype our model. The drag-and-drop interface allowed us to quickly change or swap out our layers without lowering the readability of our code. The process was as easy as creating how our model looked, choosing the input and output datastores, and then starting the training.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 630px; height: 557px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2023\/02\/RLB_YouTubeCreatorAssistant_3.png\" alt=\"YCA Network.png\" width=\"630\" height=\"557\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">To deploy our model, we wanted to use Gradio as it is a web interface that we were more familiar with. The problem with this is that our model was created using MATLAB while Gradio uses the Python programming language. Luckily, MATLAB offers something called MATLAB Engine, which allows us to run MATLAB code in Python. To do this, we first <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/matlab_external\/install-the-matlab-engine-for-python.html\"><span style=\"font-weight: bold; text-decoration: underline;\">installed it<\/span><\/a>, and then imported it using the following code:<\/div>\n<div style=\"background-color: #f5f5f5; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #bfbfbf; border-right: 1px solid #bfbfbf; border-top: 1px solid #bfbfbf; border-bottom: 0px none #212121; border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: #212121; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">import <span style=\"color: #a709f5;\">matlab.engine<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #bfbfbf; border-right: 1px solid #bfbfbf; border-top: 0px none #212121; border-bottom: 1px solid #bfbfbf; border-radius: 0px 0px 4px 4px; padding: 0px 45px 4px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: #212121; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">eng = matlab.engine.start_matlab()<\/span><\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">We were then able to take inputs from our Gradio web app in Python, feed them into our MATLAB model, and output the predicted view count as a Python integer.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<h2 style=\"margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\"><span style=\"font-weight: bold; text-decoration: underline;\">Results<\/span>:<\/h2>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">We tested our model by creating a fake thumbnail and filling in some details about our hypothetical video and channel. We then tried changing the thumbnail and title to one that we thought would attract more viewers and as expected, the predicted number of views increased!<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Overall, our finished model performed well on new input++s, where a more \u201cclickbait-y\u201d thumbnail or title is predicted to have a greater number of views. Despite this, we found during testing that it has some difficulties with outputting an accurate prediction of the viewer count for<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">+ channels with a small number of subscribers. This is fine for the intended purpose of the model, but we feel that it would benefit from some additional data, as the current data only features the most trending and popular creators. In the future, we plan to give the model more data specifically containing YouTube channels with fewer subscribers, so that the model can better identify how a specific feature impacts the resulting viewer count. Watch this video to see how our code works<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline; width: 373px; height: 718px;\" src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2023\/02\/RLB_YouTubeCreatorAssistant_4.png\" alt=\"YCA demo 3.jpg\" width=\"373\" height=\"718\" \/><\/div>\n<h2 style=\"margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\"><span style=\"font-weight: bold; text-decoration: underline;\">Key Takeaways<\/span>:<\/h2>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Compared to Python, we found that MATLAB was easier to use for prototyping, as there were many built-in functions to make coding quick and easy. The huge amount of documentation reduced the difficulty of trying new things, allowing us to explore more of MATLAB\u2019s many features. YouTube Creator Assistant was a fun project to work on and we learned a ton about MATLAB\u2019s features for data science and machine learning, as well as its Deep Network Designer and MATLAB Engine.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #212121; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">If you have any comments or questions about this project, feel free to reach out to us! Our code is <a href=\"https:\/\/github.com\/stuartfong1\/YouTube-Creator-Assistant\"><span style=\"font-weight: bold; text-decoration: underline;\">available on Github<\/span><\/a>, and you can see more about this project on our <a href=\"https:\/\/devpost.com\/software\/youtube-creator-assistant\"><span style=\"font-weight: bold; text-decoration: underline;\">Devpost submission page<\/span><\/a>.<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2023\/02\/RLB_YouTubeCreatorAssistant_1.png\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div>\n<p>\nAre you a content creator that is looking to make your content thumbnails more eye catching? Joining us today is Nathan Fong and Stuart Fong from Queens University in Canada! Read on to learn more&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/student-lounge\/2023\/02\/13\/hacking-a-youtube-creator-assistant-with-matlab\/\">read more >><\/a><\/p>\n","protected":false},"author":165,"featured_media":9435,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[365,630,451,6],"tags":[104,453,88,642],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/9450"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/users\/165"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/comments?post=9450"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/9450\/revisions"}],"predecessor-version":[{"id":9456,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/9450\/revisions\/9456"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media\/9435"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media?parent=9450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/categories?post=9450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/tags?post=9450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}