#!/usr/bin/env python2 from lib import SciOCR import pygtk pygtk.require('2.0') import gtk protoNet = "/home/fedor/Project/SciOCR/data/net/ruphy-28000.model.proto" lstm = SciOCR.Clstm() lstm.load(protoNet) cvImg = SciOCR.Mat() cvProcessed = SciOCR.Mat() pixbuf = gtk.gdk.pixbuf_new_from_file("./data/dummy.bmp") vec = SciOCR.vect_of_rect() textBuf = gtk.TextBuffer() ctext = "" def browse_for(type): """This function is used to browse for an image. The path to the image will be returned if the user selects one, however a blank string will be returned if they cancel or do not select one.""" if (type == "image"): title = "Select Image" elif (type == "clstm_net"): title = "Select lstm net file" else: title = "Something wrong!" file_open = gtk.FileChooserDialog(