DIGITS icon indicating copy to clipboard operation
DIGITS copied to clipboard

real-time object recognization using digits model (web camera)

Open Gloriabhsfer opened this issue 4 years ago • 0 comments

Hi all,

I want to train a deep learning model and do object classification and detection for my own object. I trained my dataset through digits-server and get my Caffe model.

Because I want to use this model to do real-time object detection and classification, to get my object information and position, I need to use a web camera as my input to the training model. In your example, there only have a program for the image. I have tested it and it works fine. So I want to modify the code and replace the image tag with the cv2.capture frame in OpenCV.

Screen Shot 2019-11-08 at 5 19 58 PM

It seems my format for my video is not the format in your Caffe model. I use google net to train my model, and my web camera is logi 720p, which output format is YUVY 2,2,4. I know the format in google net is RGB and need to transfer the OpenCV mat format into np.darray. And I have tested them but didn't work.

Can you give me some ideas to modify it? Or because my training data is the image, so I cannot apply a video on the model. If so, I will test other methods to do object recognition.

Thanks, Gloria

Gloriabhsfer avatar Nov 08 '19 22:11 Gloriabhsfer