def main():
    lv = LiveVis(settings)

    help_keys, _ = bindings.get_key_help('help_mode')
    quit_keys, _ = bindings.get_key_help('quit')
    print('\n\nRunning toolbox. Push %s for help or %s to quit.\n\n' % (help_keys[0], quit_keys[0]))
    lv.run_loop()
Exemplo n.º 2
0
def main():
    lv = LiveVis(settings)

    help_keys, _ = bindings.get_key_help('help_mode')
    quit_keys, _ = bindings.get_key_help('quit')
    print '\n\nRunning toolbox. Push %s for help or %s to quit.\n\n' % (help_keys[0], quit_keys[0])
    lv.run_loop()
Exemplo n.º 3
0
def main(model=None):
    try:
        if model:
            change_model_to_load(model)

        try:
            import settings
        except:
            print '\nError importing settings.py. Check the error message below for more information.'
            print "If you haven't already, you'll want to open the settings_model_selector.py file"
            print 'and edit it to point to your caffe checkout.\n'
            raise

        if not os.path.exists(settings.caffevis_caffe_root):
            raise Exception(
                'ERROR: Set caffevis_caffe_root in settings.py first.')

        lv = LiveVis(settings)

        help_keys, _ = bindings.get_key_help('help_mode')
        quit_keys, _ = bindings.get_key_help('quit')
        print '\n\nRunning toolbox. Push %s for help or %s to quit.\n\n' % (
            help_keys[0], quit_keys[0])
        lv.run_loop()
    except Exception as exep:
        print str(exep)
    finally:
        clean_temp_file()
Exemplo n.º 4
0
def main():
    sv = SignalVis(settings)

    help_keys, _ = bindings.get_key_help('help_mode')
    quit_keys, _ = bindings.get_key_help('quit')
    print '\n\nRunning toolbox. Push {} for help or {} to quit'.format(help_keys[0], quit_keys[0])
    sv.run_loop()
def tool_start():
    lv = LiveVis(deep_visualization_settings)

    help_keys, _ = bindings.get_key_help('help_mode')
    quit_keys, _ = bindings.get_key_help('quit')
    print '\n\nRunning toolbox. Push %s for help or %s to quit.\n\n' % (help_keys[0], quit_keys[0])
    lv.run_loop()
    return True
Exemplo n.º 6
0
    ret, jpeg = cv2.imencode('.jpg', lv.window_buffer[:, :, ::-1])
    return jpeg.tobytes()


@app.route('/video_feed')
def video_feed():
    return Response(gen(),
                    mimetype='multipart/x-mixed-replace; boundary=frame')


if __name__ == '__main__':

    global lv

    def someFunc():
        print "someFunc was called"
        lv.run_loop()

    if os.environ.get("WERKZEUG_RUN_MAIN") == "true":
        # The reloader has already run - do what you want to do here

        lv = LiveVis(settings)
        help_keys, _ = bindings.get_key_help('help_mode')
        quit_keys, _ = bindings.get_key_help('quit')
        print '\n\nRunning toolbox. Push %s for help or %s to quit.\n\n' % (
            help_keys[0], quit_keys[0])

        thread.start_new_thread(someFunc, ())

    app.run(host='127.0.0.1', debug=True)