as

Projects / Moodsic

Moodsic

A hackathon project. The webcam reads a face, a model names an emotion, and Spotify gets a playlist.

Why

Picking a playlist from a menu is the thing people skip. The camera is already pointed at the person. The project bets that an emotion label is enough of a query.

Diagrams

A solid outline is the path in the repo. A dashed outline is the alternative that shape is refusing.

Frames stay in the browser. OpenCV and a model name an emotion. Flask asks Spotify for a playlist. An optional genre filter sits on that request.

flowchart TD
  cam["Webcam in the browser"]
  model["OpenCV and a model"]
  flask["Flask"]
  genre["Optional genre filter"]
  spotify["Spotify playlist"]
  cam --> model --> flask --> spotify
  genre --> flask
  class cam,model,flask,genre,spotify chosen
          

The camera stays in the page and the playlist call stays on the server. The genre filter narrows the result after the label. It is not a second head on the model. The writeup does not name the checkpoint.

flowchart TD
  q{Who calls Spotify}
  q -->|"camera in the page, playlist on the server"| split["Browser and Flask"]
  q -->|"the page holds the playlist call"| page["Browser only"]
  filt{Genre}
  filt -->|"a filter on the request"| req["After the emotion label"]
  filt -->|"another output of the model"| head["Inside the model"]
  class split,req chosen
  class page,head rejected
          

Why this shape

One path. The genre filter is optional and sits on the request, not in the model.
inWebcamLive frames in the browser.
labelOpenCV and a modelThe site writeup says a deep learning model. It does not name the checkpoint.
outSpotifyFlask in the middle. An optional genre filter narrows the playlist.

The frontend is HTML, CSS, and JavaScript. Flask is the backend. That split keeps the camera in the browser and the playlist call on the server.

Where it breaks

The playlist is whatever the label says. A bad read of the face is a bad playlist, and there is no second signal in the writeup. The genre filter can hide that, or it can empty the result if the label and the genre do not overlap. This is a Devpost project. I am not adding a model name the page does not give.