Skip to content

Detecting and localizing digits anywhere in a given picture or feed.

License

Notifications You must be signed in to change notification settings

vstark21/Digits_Detection

Repository files navigation

Digits Detection

Detecting digits in a Video feed using OpenCV and Tensorflow

The two modules it contains are:

  • main_utils - This contains main functions.
  • model_utils - This contains functions to train a CNN model, using this CNN architecture I got an accuracy of 99.8% in Kaggle MNIST Competition.

Approach

  • Takes in video feed from mobile phone using an app like DroidCam, so we need to mention IP-address and port number which can be found in that app in python as follows:

    cap = cv2.VideoCapture("http://x.x.x.x:y/mjpegfeed")
    # where x -> IP-address and y -> port number
    
    ret, frame = cap.read()
    # frame -> one frame(picture) captured at that moment
  • Then processes the image when key c is pressed to detect digits using contour detection.

  • Then resizes the image and predicts using pre-trained model ( mnist_model.h5 ).

Results

Image on the right shows us prediction results

About

Detecting and localizing digits anywhere in a given picture or feed.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published