15 #define int64 opencv_broken_int
16 #define uint64 opencv_broken_uint
17 #include <opencv2/core.hpp>
18 #include <opencv2/dnn.hpp>
19 #include <opencv2/opencv.hpp>
40 std::vector<uint32_t>
rle;
60 cv::dnn::Net efficientSam;
62 std::string efficientSamModelPath;
63 std::string cutieModelDir;
64 std::string cutieEncodeKeyModelPath;
65 std::string cutieEncodeValueModelPath;
66 std::string cutieMemoryReadoutModelPath;
67 std::string cutieDecodeModelPath;
68 std::string protobufDataPath;
69 std::string processingDevice =
"CPU";
71 std::map<size_t, CVObjectMaskPromptSet> promptKeyframes;
73 float maskThreshold = 0.0f;
82 void SetProcessingDevice();
97 void SetJson(
const std::string value);
Header file for Clip class.
Header file for JSON class.
This is a message class for thread safe comunication between ClipProcessingJobs and OpenCV classes.
Preprocess a clip into EfficientSAM/Cutie object masks stored in the object-detection protobuf format...
std::map< size_t, CVObjectMaskFrameData > masksData
void maskClip(openshot::Clip &video, size_t start=0, size_t end=0, bool process_interval=false)
std::shared_ptr< Frame > PreviewSeedMask(std::shared_ptr< Frame > frame)
void SetJson(const std::string value)
static std::string ValidateONNXModel(std::string modelPath)
CVObjectMask(std::string processInfoJson, ProcessingController &processingController)
void SetJsonValue(const Json::Value root)
This class represents a clip (used to arrange readers on the timeline)
This namespace is the default namespace for all code in the openshot library.
std::vector< uint32_t > rle
bool HasPositivePrompt() const
std::vector< cv::Rect_< float > > positiveRects
std::vector< cv::Point2f > positivePoints
std::vector< cv::Rect_< float > > negativeRects
std::vector< cv::Point2f > negativePoints