Project import generated by Copybara.
GitOrigin-RevId: 852dfb05d450167899c0dd5ef7c45622a12e865b
This commit is contained in:
committed by
Hadon Nash
parent
d144e564d8
commit
de4fbc10e6
@@ -31,7 +31,53 @@ std::string GetUnusedSidePacketName(const CalculatorGraphConfig& /*config*/,
|
||||
std::string GetUnusedNodeName(const CalculatorGraphConfig& config,
|
||||
const std::string& node_name_base);
|
||||
|
||||
// Returns a short unique name for a Node in a CalculatorGraphConfig.
|
||||
// This is the Node.name (if specified) or the Node.calculator.
|
||||
// If there are multiple calculators with similar name in the graph, the name
|
||||
// will be postfixed by "_<COUNT>". For example, in the following graph the node
|
||||
// names will be as mentiond.
|
||||
//
|
||||
// node { // Name will be "CalcA"
|
||||
// calculator: "CalcA"
|
||||
// }
|
||||
// node { // Name will be "NameB"
|
||||
// calculator: "CalcB"
|
||||
// name: "NameB"
|
||||
// }
|
||||
// node { // Name will be "CalcC_1" due to duplicate "calculator" field.
|
||||
// calculator: "CalcC"
|
||||
// }
|
||||
// node { // Name will be "CalcC_2" due to duplicate "calculator" field.
|
||||
// calculator: "CalcC"
|
||||
// }
|
||||
// node { // Name will be "NameX".
|
||||
// calculator: "CalcD"
|
||||
// name: "NameX"
|
||||
// }
|
||||
// node { // Name will be "NameY".
|
||||
// calculator: "CalcD"
|
||||
// name: "NameY"
|
||||
// }
|
||||
// node { // Name will be "NameZ_1". due to "name" field duplicate.
|
||||
// calculator: "CalcE"
|
||||
// name: "NameZ"
|
||||
// }
|
||||
// node { // Name will be "NameZ_2". due to "name" field duplicate.
|
||||
// calculator: "CalcF"
|
||||
// name: "NameZ"
|
||||
// }
|
||||
//
|
||||
// TODO: Update GraphNode.UniqueName in MediaPipe Visualizer to match
|
||||
// this logic.
|
||||
// TODO: Fix the edge case mentioned in the bug.
|
||||
std::string CanonicalNodeName(const CalculatorGraphConfig& graph_config,
|
||||
int node_id);
|
||||
|
||||
} // namespace tool
|
||||
} // namespace mediapipe
|
||||
|
||||
namespace mediapipe {
|
||||
using ::mediapipe::tool::CanonicalNodeName;
|
||||
} // namespace mediapipe
|
||||
|
||||
#endif // MEDIAPIPE_FRAMEWORK_TOOL_NAME_UTIL_H_
|
||||
|
||||
Reference in New Issue
Block a user