/ Machine Learning

Simple dynamic library for video sentiment recognition

Simple dynamic library for video sentiment recognition

EmotionLib

Simple dynamic library for video sentiment recognition.

Made using Caffe

Functions list:

- float* make(const char* path, double N, struct progress* bar), where progress is struct{int,int} to check the current progress of recognition
Returns a float array pointer with positivity values for each N-th frame of video in path, first array element is database size

You can use N = 0 for automatic frame rate detection. In this case, the function will take one frame for every second of the video

- int clean(float* res)
To clean up an array with coefficients

C# Import Example:

    [StructLayout(LayoutKind.Sequential)]
    public struct progress
    {
        public int cur;
        public int end;
    };
    [DllImport("EmotionLib.dll")]
    public static extern IntPtr make([MarshalAs(UnmanagedType.LPStr)] string path, double N, ref progress bar);
    [DllImport("EmotionLib.dll", CallingConvention = CallingConvention.Cdecl)]
    public static extern int clean(IntPtr ptr);

GitHub

Comments