jominjose14 / SleepyWheels

An ensemble drowsiness detection system
https://sleepywheels.vercel.app
3 stars 0 forks source link

for the model #1

Open Ustarlight opened 1 year ago

Ustarlight commented 1 year ago

Thanks for your greatest work, could you please afford the model,thanks again.

jominjose14 commented 1 year ago

Hi @Ariellsc Thanks for the appreciation. I have added a download link to the model in this project's README. Hope it proves useful to you. Cheers

Ustarlight commented 1 year ago

Thanks 👍

lanbowan1 commented 3 months ago

I am getting this error using trained model, is there any solution for this? Thanks 微信截图_20240519191040

jominjose14 commented 3 months ago

Sorry for the late reply. Please try changing line 12 of last cell of detector.ipynb: from nn_frame = cv2.resize(frame, (150,150), interpolation = cv2.INTER_AREA) to nn_frame = cv2.resize(frame, (224,224), interpolation = cv2.INTER_AREA)

and line 3 of cell 7 (the cell in which effnet(nn_frame) method is defined): from p = model.predict(nn_frame.reshape(-1, 150, 150, 3)) to p = model.predict(nn_frame.reshape(-1, 224, 224, 3))

Please note that I have refactored the app in my latest commit. After the latest commit, you will not face this error. But there are many other changes like replacing dlib with mediapipe and using a python file instead of a notebook for the live detection part of the project. So if you do not wish to pull the latest commit, the above 2 changes should help.

lanbowan1 commented 3 months ago

I am excited to receive your reply and would like to express my gratitude for your work, which has been a significant source of inspiration and assistance to me. I recently attempted to run your Jupyter and Python code, with encouraging results (as illustrated in Figure 1). However, I encountered an issue: the web link is not functional, and I am unable to log in and update in real time on the webpage. I am uncertain about the cause of this problem (as illustrated in Figure 2). I would appreciate your input if you have the time. I would like to take this opportunity to extend my best wishes to you for your continued good health, success in your work, and a happy life.

特务兔?? @.***

 

------------------ 原始邮件 ------------------ 发件人: "jominjose14/SleepyWheels" @.>; 发送时间: 2024年5月28日(星期二) 中午1:16 @.>; @.**@.>; 主题: Re: [jominjose14/SleepyWheels] for the model (Issue #1)

Sorry for the late reply. Please try changing line 12 of last cell of detector.ipynb: from nn_frame = cv2.resize(frame, (150,150), interpolation = cv2.INTER_AREA) to nn_frame = cv2.resize(frame, (224,224), interpolation = cv2.INTER_AREA)

and line 3 of cell 7 (the cell in which effnet(nn_frame) method is defined): from p = model.predict(nn_frame.reshape(-1, 150, 150, 3)) to p = model.predict(nn_frame.reshape(-1, 224, 224, 3))

Please note that I have refactored the app in my latest commit. After the latest commit, you will not face this error. But there are many other changes like replacing dlib with mediapipe and using a python file instead of a notebook for the live detection part of the project. So if you do not wish to pull the latest commit, the above 2 changes should help.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

jominjose14 commented 3 months ago

The images (Figure 1 and 2) are not visible. But I think I have understood the problem. The web hosting service I was using stopped accepting requests from non-browser clients, due to which the python script app.py was no longer able to make http post requests to record alarms and yawns into the database. In my latest commit, I have hosted the dashboard on a different service. The python script app.py is now able to make post requests during my tests. The dashboard also updates after a refresh. Please try on your end and let me know if it works. Do keep in mind that I am using a free tier for web hosting, so the website has limited database storage and network bandwidth. Hence, please try to minimize number of network requests. Cheers.

lanbowan1 commented 3 months ago

I extend my sincerest apologies for the delay in my response. I am grateful for your reply and promptness in addressing my queries. I recently attempted to use the data you had uploaded and found that I am not yet able to open and record it on the web page.  I have been trying to use some of the solutions and I think it may be my problem. Therefore, I am  going to leave the webpage record implementation alone for now or learn to try to solve it again as I am lacking in this area. Again, thank you very much for writing back and taking the time to improve the code, best wishes to you!

特务兔?? @.***

 

------------------ 原始邮件 ------------------ 发件人: "jominjose14/SleepyWheels" @.>; 发送时间: 2024年5月31日(星期五) 上午7:31 @.>; @.**@.>; 主题: Re: [jominjose14/SleepyWheels] for the model (Issue #1)

The images (Figure 1 and 2) are not visible. But I think I have understood the problem. The web hosting service I was using stopped accepting requests from non-browser clients, due to which the python script app.py was no longer able to make http post requests to record alarms and yawns into the database. In my latest commit, I have hosted the dashboard on a different service. The python script app.py is now able to make post requests during my tests. The dashboard also updates after a refresh. Please try on your end and let me know if it works. Do keep in mind that I am using a free tier for web hosting, so the website has limited database storage and network bandwidth. Hence, please try to minimize number of network requests. Cheers.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>