using tsne, vp-trees, and cosine similarity to search and visualise a dataset through affection mapping
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

52 lines
925 B

#ifndef _REQUEST
#define _REQUEST
#include "ofMain.h"
// Embeddings structure
struct Vector7D{
float angry;
float disgust;
float fear;
float happy;
float sad;
float surprise;
float neutral;
bool operator!=(const Vector7D &other) const {
return angry != other.angry ||
disgust != other.disgust ||
fear != other.fear ||
happy != other.happy ||
sad != other.sad ||
surprise != other.surprise ||
neutral != other.neutral;
}
};
// JSON -> Struct
struct VPQuery{
std::string folder;
std::string video;
std::string image;
int frame;
};
class Request {
public:
void setup(std::string ip, int port, std::string page);
VPQuery query(Vector7D input);
ofHttpRequest request;
ofURLFileLoader http;
ofJson jsonResponse;
Request();
};
#endif