4

I have a system design question I was hoping u guys could help me with.

So I want to make a display that shows an animated wallpaper. I want to have a camera in the display that will recognize finger gestures and will change the wallpaper accordingly (shuffle to a new one, etc.)
EX: when the current wallpaper is displaying, when the user shows the camera the peace sign, it will switch the current wallpaper to a random wallpaper.

I used tensorflow and the mediapipe hands library to get the finger gesture recognition to work. I used tensorflow, python, and openCV.

Now that the finger gesture recognition is finished, I moved to the animated wallpapers and I made a couple with p5js.

How could I best combine the two? Should I switch from tensorflow in python to tensorflow.js? Or should I find a way to re-do my animated wallpapers in python?

My original plan was having the foundation of the whole system be python. This is so I can have the finger gesture recognition run on the main thread, and have another thread deal with the wallpapers.

Let me know if u guys have any ideas or if I’m not clear. Thanks!!!

Comments
  • 1
    Tensorflow.js is kinda garbage.

    Why not use some IPC and send messages between the the wallpaper process and the visual detection process? :D
  • 1
    @rantydev I was hoping that I could do this without Tensorflow.js lol I'll definitely check out IPC. So my thought now is to have the recognition program run on the main thread, and then have a separate thread where I have a local web server (written in python) to handle the p5js stuff. Then, I can use IPC to pass data from the recognition thread to the web server thread
  • 1
    đź‘Ť I'd probably go with different processes alltogether: run node in one process, python in the other, and use sockets for IPC

    ..but that's just because I like IPC :)
  • 0
    @rantydev Ohh i understand. Im trying that approach right now. I just have to figure out the server aspect. I have an html file with inline js for each wallpaper. I have to figure out how to change the html file being served, when the node server gets the data from the IPC connection. Then, i have to figure out how to refresh the page on the browser to reflect the change of wallpaper
Add Comment