.def(py::init<>(),"Constructs a new landmark mapper that performs an identity mapping, that is, its output is the same as the input.")
.def(py::init<>(),"Constructs a new landmark mapper that performs an identity mapping, that is, its output is the same as the input.")
.def("__init__",[](core::LandmarkMapper&instance,std::stringfilename){// wrap the fs::path c'tor with std::string
.def("__init__",[](core::LandmarkMapper&instance,std::stringfilename){// wrap the fs::path c'tor with std::string
new(&instance)core::LandmarkMapper(filename);
new(&instance)core::LandmarkMapper(filename);
},"Constructs a new landmark mapper from a file containing mappings from one set of landmark identifiers to another.")
},"Constructs a new landmark mapper from a file containing mappings from one set of landmark identifiers to another.",py::arg("filename"))
// We can't expose the convert member function yet - need std::optional (or some trick with self/this and a lambda)
// We can't expose the convert member function yet - need std::optional (or some trick with self/this and a lambda)
;
;
...
@@ -103,7 +103,7 @@ PYBIND11_PLUGIN(eos) {
...
@@ -103,7 +103,7 @@ PYBIND11_PLUGIN(eos) {
.def("get_color_model",[](constmorphablemodel::MorphableModel&m){returnm.get_color_model();},"Returns the PCA colour (albedo) model of this Morphable Model.")
.def("get_color_model",[](constmorphablemodel::MorphableModel&m){returnm.get_color_model();},"Returns the PCA colour (albedo) model of this Morphable Model.")
;
;
morphablemodel_module.def("load_model",&morphablemodel::load_model,"Load a Morphable Model from a cereal::BinaryInputArchive (.bin) from the harddisk.");
morphablemodel_module.def("load_model",&morphablemodel::load_model,"Load a Morphable Model from a cereal::BinaryInputArchive (.bin) from the harddisk.",py::arg("filename"));
/**
/**
* - Blendshape
* - Blendshape
...
@@ -115,7 +115,7 @@ PYBIND11_PLUGIN(eos) {
...
@@ -115,7 +115,7 @@ PYBIND11_PLUGIN(eos) {
.def_readwrite("deformation",&morphablemodel::Blendshape::deformation,"A 3m x 1 col-vector (xyzxyz...)', where m is the number of model-vertices. Has the same format as PcaModel::mean.")
.def_readwrite("deformation",&morphablemodel::Blendshape::deformation,"A 3m x 1 col-vector (xyzxyz...)', where m is the number of model-vertices. Has the same format as PcaModel::mean.")
;
;
morphablemodel_module.def("load_blendshapes",&morphablemodel::load_blendshapes,"Load a file with blendshapes from a cereal::BinaryInputArchive (.bin) from the harddisk.");
morphablemodel_module.def("load_blendshapes",&morphablemodel::load_blendshapes,"Load a file with blendshapes from a cereal::BinaryInputArchive (.bin) from the harddisk.",py::arg("filename"));
// Helper function - draws a sample with given shape, blendshape and colour coeffs, and
// Helper function - draws a sample with given shape, blendshape and colour coeffs, and
...
@@ -142,7 +142,7 @@ PYBIND11_PLUGIN(eos) {
...
@@ -142,7 +142,7 @@ PYBIND11_PLUGIN(eos) {
*/
*/
py::class_<morphablemodel::EdgeTopology>(morphablemodel_module,"EdgeTopology","A struct containing a 3D shape model's edge topology.");
py::class_<morphablemodel::EdgeTopology>(morphablemodel_module,"EdgeTopology","A struct containing a 3D shape model's edge topology.");
morphablemodel_module.def("load_edge_topology",&morphablemodel::load_edge_topology,"Load a 3DMM edge topology file from a json file.");
morphablemodel_module.def("load_edge_topology",&morphablemodel::load_edge_topology,"Load a 3DMM edge topology file from a json file.",py::arg("filename"));
/**
/**
* Bindings for the eos::fitting namespace:
* Bindings for the eos::fitting namespace:
...
@@ -177,11 +177,11 @@ PYBIND11_PLUGIN(eos) {
...
@@ -177,11 +177,11 @@ PYBIND11_PLUGIN(eos) {
;
;
py::class_<fitting::ContourLandmarks>(fitting_module,"ContourLandmarks","Defines which 2D landmarks comprise the right and left face contour.")
py::class_<fitting::ContourLandmarks>(fitting_module,"ContourLandmarks","Defines which 2D landmarks comprise the right and left face contour.")
.def_static("load",&fitting::ContourLandmarks::load,"Helper method to load contour landmarks from a text file with landmark mappings, like ibug2did.txt.")
.def_static("load",&fitting::ContourLandmarks::load,"Helper method to load contour landmarks from a text file with landmark mappings, like ibug2did.txt.",py::arg("filename"))
;
;
py::class_<fitting::ModelContour>(fitting_module,"ModelContour","Definition of the vertex indices that define the right and left model contour.")
py::class_<fitting::ModelContour>(fitting_module,"ModelContour","Definition of the vertex indices that define the right and left model contour.")
.def_static("load",&fitting::ModelContour::load,"Helper method to load a ModelContour from a json file from the hard drive.")
.def_static("load",&fitting::ModelContour::load,"Helper method to load a ModelContour from a json file from the hard drive.",py::arg("filename"))