Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 691163384
  • Loading branch information
schmidt-sebastian authored and copybara-github committed Oct 29, 2024
1 parent 26899ed commit 3a79fff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions mediapipe/modules/face_geometry/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ cc_library(
"//mediapipe/util:resource_util",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:optional",
],
alwayslink = 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "mediapipe/framework/calculator_framework.h"
#include "mediapipe/framework/formats/image_frame.h"
Expand Down Expand Up @@ -256,9 +257,10 @@ class EffectRendererCalculator : public CalculatorBase {
MP_ASSIGN_OR_RETURN(std::unique_ptr<mediapipe::Resource> mesh_3d_blob,
ReadContentBlobFromFile(cc, mesh_3d_path),
_ << "Failed to read mesh 3D blob from file!");
absl::string_view mesh_str = mesh_3d_blob->ToStringView();

face_geometry::Mesh3d mesh_3d;
RET_CHECK(mesh_3d.ParseFromString(mesh_3d_blob->ToStringView()))
RET_CHECK(mesh_3d.ParseFromArray(mesh_str.data(), mesh_str.size()))
<< "Failed to parse a mesh 3D proto from a binary blob!";

return mesh_3d;
Expand Down

0 comments on commit 3a79fff

Please sign in to comment.