Skip to content

Commit

Permalink
given naming properly for the model files
Browse files Browse the repository at this point in the history
  • Loading branch information
venkat0907 committed Jul 17, 2023
1 parent 7e1a05d commit 5eab23c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions base/include/FacialLandmarksCV.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ class FacialLandmarkCVProps : public ModuleProps

FacialLandmarkCVProps(FaceDetectionModelType _type) : type(_type) {}

FacialLandmarkCVProps(FaceDetectionModelType _type, const std::string _modelConfiguration, const std::string _modelBinary, const std::string _landmarksDetectionModel, cv::Ptr<cv::face::Facemark> _facemark)
: type(_type), modelConfiguration(_modelConfiguration), modelBinary(_modelBinary), landmarksDetectionModel(_landmarksDetectionModel),facemark(_facemark)
FacialLandmarkCVProps(FaceDetectionModelType _type, const std::string _Face_Detection_Configuration, const std::string _Face_Detection_Weights, const std::string _landmarksDetectionModel, cv::Ptr<cv::face::Facemark> _facemark)
: type(_type), Face_Detection_Configuration(_Face_Detection_Configuration), Face_Detection_Weights(_Face_Detection_Weights), landmarksDetectionModel(_landmarksDetectionModel),facemark(_facemark)
{
if (_type != FaceDetectionModelType::SSD)
{
throw AIPException(AIP_FATAL, "This constructor only supports SSD");
throw AIPException(AIP_FATAL, "This constructor only supports SSD");
}
}

Expand All @@ -37,8 +37,8 @@ class FacialLandmarkCVProps : public ModuleProps
}

FaceDetectionModelType type;
const std::string modelConfiguration = "./data/assets/deploy.prototxt";
const std::string modelBinary = "./data/assets/res10_300x300_ssd_iter_140000_fp16.caffemodel";
const std::string Face_Detection_Configuration = "./data/assets/deploy.prototxt";
const std::string Face_Detection_Weights = "./data/assets/res10_300x300_ssd_iter_140000_fp16.caffemodel";
const std::string landmarksDetectionModel = "./data/assets/face_landmark_model.dat";
const std::string faceDetectionModel = "./data/assets/haarcascade.xml";
cv::Ptr<cv::face::Facemark> facemark = cv::face::FacemarkKazemi::create();
Expand Down
4 changes: 2 additions & 2 deletions base/src/FacialLandmarksCV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ class DetailSSD : public Detail
public:
DetailSSD(FacialLandmarkCVProps& _props) : Detail(_props)
{
cv::String modelConfiguration = props.modelConfiguration;
cv::String modelBinary = props.modelBinary;
cv::String modelConfiguration = props.Face_Detection_Configuration;
cv::String modelBinary = props.Face_Detection_Weights;

facemark = props.facemark;
facemark->loadModel(props.landmarksDetectionModel);
Expand Down

0 comments on commit 5eab23c

Please sign in to comment.