Giter Site home page Giter Site logo

live_me_id_extractor's Introduction

Live Me Id Extractor

This repository contains the module which makes it possible to extract live me id from live me screenshots using super-deep image-based pre-processing and exploration. This repository uses features from another repository developed as a part of this project: https://github.com/UMass-Rescue/deep_text_detection.

Suitability

This module is suitable for detecting live_me id across screenshots captured from web/phone/screen-capture. Further, it can be ideal for scenarios where such an image is actually part of a larger image collage. Presently, it supports only single id extraction, but it's relatively straightforward to extend it to multiple id detection in case of image collages of multiple ids.

Usage of main module: search_user_id

Parameters Invoked Default Argument Description
im Required Required image variable of type np.ndarray or image path
abandon_search_length 6 If it finds alphabetic string above this length, it drops the edge enhancement search and moves to the next box.
minimum_string_length 3 The numeric string detected has to be of minimum length of 3 to avoid ambiguity with other numbers on the screen. Can be tuned further with a better understanding of the data.
advanced False If turned on, it performs detail enhancement based configurability search. Can be tuned further with a better understanding of the data.
# Required packages (general)
from live_me_id_extractor import extract_user_id
from matplotlib.image import imread

# Demo-specific packages (not required for the working of this module) 
from matplotlib import pyplot as plt
import os
# Using image as numpy array 
base_path = 'dataset/live_me/'
image_path = os.path.join(base_path, 'tani_gupta.jpg')
im = imread(image_path)
plt.imshow(im)

png

detected_text, user_info = extract_user_id(im)
print ("Detected Text = {}".format(detected_text))
if user_info is not None:
    print ("User Information = {}".format(user_info))
Detected Text = 468
User Information = [{'display_name': 'toxik', '_id': '468', 'name': 'toxik', 'type': 'user', 'bio': None, 'created_at': '2007-05-22T10:37:50.875785Z', 'updated_at': '2020-03-30T04:57:13.301866Z', 'logo': 'https://static-cdn.jtvnw.net/user-default-pictures-uv/13e5fa74-defa-11e9-809c-784f43822e80-profile_image-300x300.png'}]
# Using image file, no-array
detected_text, user_info = extract_user_id(image_path)
print ("Detected Text = {}".format(detected_text))
if user_info is not None:
    print ("User Information = {}".format(user_info))
Detected Text = 468
User Information = [{'display_name': 'toxik', '_id': '468', 'name': 'toxik', 'type': 'user', 'bio': None, 'created_at': '2007-05-22T10:37:50.875785Z', 'updated_at': '2020-03-30T04:57:13.301866Z', 'logo': 'https://static-cdn.jtvnw.net/user-default-pictures-uv/13e5fa74-defa-11e9-809c-784f43822e80-profile_image-300x300.png'}]
# Demo 2
image_path = os.path.join(base_path, 'amanda_cerny.jpg')
im = imread(image_path)
plt.imshow(im)

png

detected_text, user_info = extract_user_id(im)
print ("Detected Text = {}".format(detected_text))
if user_info is not None:
    print ("User Information = {}".format(user_info))
Detected Text = 344
User Information = [{'display_name': 'dobro_restart', '_id': '344', 'name': 'dobro_restart', 'type': 'user', 'bio': None, 'created_at': '2018-09-04T15:20:10.804593Z', 'updated_at': '2018-09-04T17:38:33.146777Z', 'logo': 'https://static-cdn.jtvnw.net/user-default-pictures-uv/cdd517fe-def4-11e9-948e-784f43822e80-profile_image-300x300.png'}]
# Using image file, no-array
detected_text, user_info = extract_user_id(image_path)
print ("Detected Text = {}".format(detected_text))
if user_info is not None:
    print ("User Information = {}".format(user_info))
Detected Text = 344
User Information = [{'display_name': 'dobro_restart', '_id': '344', 'name': 'dobro_restart', 'type': 'user', 'bio': None, 'created_at': '2018-09-04T15:20:10.804593Z', 'updated_at': '2018-09-04T17:38:33.146777Z', 'logo': 'https://static-cdn.jtvnw.net/user-default-pictures-uv/cdd517fe-def4-11e9-948e-784f43822e80-profile_image-300x300.png'}]

live_me_id_extractor's People

Contributors

royadityak94 avatar

Watchers

James Cloos avatar  avatar Jagath Jai Kumar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.