diff --git a/hackathon/README.MD b/hackathon/README.MD new file mode 100644 index 0000000..2370ba6 --- /dev/null +++ b/hackathon/README.MD @@ -0,0 +1,3 @@ +# Hackathon emotionale Robotik + +Wir haben einen Server entwickelt, welcher Emotionen anhand von Bildaufnahmen auswertet. Die IP-Adresse des Servers müsst ihr in der Config-Datei hinterlegen. Eure Aufgabe ist im Client in der Klasse OwnRobot passende Gesichtsausdrücke mit Pygame zu generieren. Hierzu könnt ihr euren Code in der Update-Funktion platzieren. Dort stehen euch das aktuelle Foto sowie die dazugehörigen erkannten Emotionen zur Verfügung. Ihr könnte den Parameter update_interval überschreiben, um die Geschwindigkeit der Aktualisierungen zu verändern. Der Client selbst lässt sich durch Ausführen der start_client.sh/.bat im root-Verzeichnis ausführen. Viel Spaß beim Coden. diff --git a/hackathon/requirements.txt b/hackathon/requirements.txt index 96edaf1..930458a 100644 --- a/hackathon/requirements.txt +++ b/hackathon/requirements.txt @@ -1,3 +1,4 @@ opencv-python-headless facenet-pytorch -hsemotion \ No newline at end of file +hsemotion +pygame \ No newline at end of file diff --git a/hackathon/scripts/install.bat b/hackathon/scripts/install.bat new file mode 100644 index 0000000..35a0d79 --- /dev/null +++ b/hackathon/scripts/install.bat @@ -0,0 +1,5 @@ +@echo off + +python -m venv env +call env\Scripts\activate.bat +pip install -r requirements.txt diff --git a/hackathon/scripts/start_client.bat b/hackathon/scripts/start_client.bat new file mode 100644 index 0000000..1a03e1a --- /dev/null +++ b/hackathon/scripts/start_client.bat @@ -0,0 +1,4 @@ +@echo off + +call env\Scripts\activate.bat +python client.py diff --git a/hackathon/scripts/start_server.bat b/hackathon/scripts/start_server.bat new file mode 100644 index 0000000..4624f2b --- /dev/null +++ b/hackathon/scripts/start_server.bat @@ -0,0 +1,4 @@ +@echo off + +call env\Scripts\activate.bat +python server.py \ No newline at end of file diff --git a/hackathon/server.py b/hackathon/server.py index b022169..427b22c 100644 --- a/hackathon/server.py +++ b/hackathon/server.py @@ -47,7 +47,7 @@ def update_values(queue: Queue): else: queue.put((frame_bgr, emotions)) finally: - capture.close() + capture.release() def update_to_clients(queue: Queue):