Integrating Machine Learning Model in Django

40 views
Skip to first unread message

Aakash Baranwal

unread,
Apr 11, 2019, 3:59:30 AM4/11/19
to django...@googlegroups.com
Hi Everybody,

I need a help in integrating a machine learning model with my website.

I have a file upload button where I can upload either an image or a video. After it is uploaded, I want to run my model into it and whatever is the result I want to display it and keep a record of the whole process.

Also, I wish to add a feature of connecting my website with my CCTV camera, so I can have a live video feed instead of uploading a video and then do the same. 

PS - I can select whether I want to upload the image or the video or I want to use the live footage of the camera and run my model on that.

Thank You in advance.

With Kind Regards

Aakash 

panfei

unread,
Apr 11, 2019, 7:32:03 AM4/11/19
to Django users
Video analysis is a GPU intensive process, it may take a long time to process a whole video, I think you can use Celery to run the process as an asynchronous task, and use callback to trace the progress of the tasks .

Celery can be easily integrated with Django, officially support.

Aakash Baranwal <baaka...@gmail.com> 于2019年4月11日周四 下午3:59写道:
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALr9hQ0sxzr%3DwZfNa6%3DhAy1tU6KdRE3-S6nJ4YbOock1SoFpmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
不学习,不知道

Aakash Baranwal

unread,
Apr 12, 2019, 1:30:44 AM4/12/19
to django...@googlegroups.com
Thanks a  lot. 

I read about it and I think it will do the job for me. I plan to send a live video and chunk it after 1 hour time and then run the model on it. 

How to create a REST API for calling my model to run on the video and then another challenge is how to show the result video to the person who requested for the service i.e. the one who uploaded the video.

Thank you for the help.

PARTH PATIL

unread,
Apr 12, 2019, 1:57:46 AM4/12/19
to django...@googlegroups.com
Assuming that you have to do all the processing locally on your server computer.

Best Regards,
PARTH PATIL

On Thu, 11 Apr 2019, 1:29 pm Aakash Baranwal, <baaka...@gmail.com> wrote:
Hi Everybody,

I need a help in integrating a machine learning model with my website.

I have a file upload button where I can upload either an image or a video. After it is uploaded, I want to run my model into it and whatever is the result I want to display it and keep a record of the whole process.

This can can be easily done using using the current framework. Just process whatever you want to do in a single view and return the result to the user. You can use threading to optimize your load time.


Also, I wish to add a feature of connecting my website with my CCTV camera, so I can have a live video feed instead of uploading a video and then do the same. 

You can use django socket to send asynchronous messages to the server and do your processing when a message is received in a consumer. That would do the trick.

With Kind Regards

Aakash 

--
Reply all
Reply to author
Forward
0 new messages