Skip to main content

Recognize up to 10 signs of the LSV (Venezuelan Sign Language)

Project description

lsvtest

lsvtest es un paquete Python que proporciona funcionalidades para la detección y reconocimiento de LSV (Lenguaje de Señas Venezolano).

Instalación

Puedes instalar lsvtest utilizando pip:

pip install lsvtest

Uso Para usar lsvtest, sigue estos pasos:

Crear una estructura de proyectoCrea una estructura de proyecto como la siguiente:

project/
│
├── main.py
└── script.py

Contenido de main.py

from flask import Flask, jsonify
import subprocess

app = Flask(__name__)

# Variable to keep track of the process
process = None

@app.route("/start", methods=["GET"])
def start_process():
    global process
    if process is None:
        # Replace 'your_command_here' with the command you want to run
        process = subprocess.Popen(
            [
                "python",
                "-c",
                'import sys; sys.path.append("."); import script; script.start()',
            ]
        )
        return jsonify({"status": "Process started"}), 200
    else:
        return jsonify({"status": "Process is already running"}), 200

@app.route("/stop", methods=["GET"])
def stop_process():
    global process
    if process is not None:
        process.terminate()  # Sends SIGTERM
        process = None
        return jsonify({"status": "Process stopped"}), 200
    else:
        return jsonify({"status": "No process is running"}), 200

if __name__ == "__main__":
    app.run(debug=True, port=5000)

Contenido de script.py

from lsvtest import LSVRecognition

def start():
    recognition_service = LSVRecognition()

    recognition_service.continuous_detection(
        source=0, 
        output=lambda token: print(token), 
        wsl_compatibility=True, 
        show_video=True
    )

Ejecuta el servidor Flask desde la terminal en la carpeta del proyecto:

python main.py

Envía una solicitud GET a http://localhost:5000/start para iniciar el proceso de reconocimiento.

Envía una solicitud GET a http://localhost:5000/stop para detener el proceso de reconocimiento.

Puedes personalizar el reconocimiento modificando los parámetros de continuous_detection en script.py.

Problemas al instalar

Si tienes problemas al momento de instalar el paquete, prueba ejecutar primero:

pip install mediapipe opencv-python scikit-learn  tensorflow  

Y luego prueba a instalar el paquete nuevamente

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lsvtest-0.0.3.tar.gz (17.3 MB view hashes)

Uploaded Source

Built Distribution

lsvtest-0.0.3-py3-none-any.whl (17.3 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page