Darknet/YOLO v3.0-177-gfa2353b
Object Detection Framework
 
Loading...
Searching...
No Matches
Darknet::Keypoints Class Referencefinal

The Keypoints class works with Darknet's V3 API. More...

#include "darknet_keypoints.hpp"

Collaboration diagram for Darknet::Keypoints:

Public Member Functions

 Keypoints ()=delete
 
 Keypoints (const Darknet::NetworkPtr ptr)
 Constructor needs a neural network pointer.
 
 ~Keypoints ()
 Destructor.
 
cv::Mat annotate (const Predictions &predictions, const Skeletons &skeletons, cv::Mat mat)
 Draw the skeletons onto the given image.
 
cv::Mat annotate (const Predictions &predictions, cv::Mat mat)
 Similar to the other annotate() method, but automatically calls create_skeletons().
 
Skeletons create_skeletons (const Predictions &predictions)
 Looks through the prediction results and attempts to organize each person into Skeleton.
 
VStr names ()
 Return the set of names for the classes in Keypoints.
 

Public Attributes

int circle_size
 Size of circles used to draw keypoints.
 
bool draw_keypoints
 Draw a circle above each detected keypoint.
 
bool draw_labels
 Draw the labels beside each keypoint.
 
bool draw_skeleton
 Draw the skeletons joining each keypoint.
 
int line_size
 Size of lines used to draw skeletons.
 

Private Attributes

const Darknet::NetworkPtr network_ptr
 

Detailed Description

The Keypoints class works with Darknet's V3 API.

The only format currently supported is the MSCOCO-style keypoint classes with an extra "person" class appended for top-down grouping. The classes are defined as follows:

  • 0: nose
  • 1: left eye
  • 2: right eye
  • 3: left ear
  • 4: right ear
  • 5: left shoulder
  • 6: right shoulder
  • 7: left elbow
  • 8: right elbow
  • 9: left wrist
  • 10: right wrist
  • 11: left hip
  • 12: right hip
  • 13: left knee
  • 14: right knee
  • 15: left ankle
  • 16: right ankle
  • 17: person
Since
2024-09-03

Constructor & Destructor Documentation

◆ Keypoints() [1/2]

Darknet::Keypoints::Keypoints ( )
delete

◆ Keypoints() [2/2]

Darknet::Keypoints::Keypoints ( const Darknet::NetworkPtr  ptr)

Constructor needs a neural network pointer.

See also
Darknet::load_neural_network()
Since
2024-09-03

◆ ~Keypoints()

Darknet::Keypoints::~Keypoints ( )

Destructor.

Member Function Documentation

◆ annotate() [1/2]

cv::Mat Darknet::Keypoints::annotate ( const Predictions predictions,
const Skeletons skeletons,
cv::Mat  mat 
)

Draw the skeletons onto the given image.

Since
2024-09-03
Here is the caller graph for this function:

◆ annotate() [2/2]

cv::Mat Darknet::Keypoints::annotate ( const Predictions predictions,
cv::Mat  mat 
)

Similar to the other annotate() method, but automatically calls create_skeletons().

Since
2024-09-03
Here is the call graph for this function:

◆ create_skeletons()

Darknet::Skeletons Darknet::Keypoints::create_skeletons ( const Predictions predictions)

Looks through the prediction results and attempts to organize each person into Skeleton.

A skeleton will always contain exactly 18 indexes. If a skeleton does not have an entry for a body part, then the index will be set to -1. Otherwise, any other values is interpreted as an index into predictions.

Since
2024-09-03
Here is the call graph for this function:
Here is the caller graph for this function:

◆ names()

Darknet::VStr Darknet::Keypoints::names ( )

Return the set of names for the classes in Keypoints.

Since
2024-09-07

Member Data Documentation

◆ circle_size

int Darknet::Keypoints::circle_size

Size of circles used to draw keypoints.

draw_keypoints must also be set to true. Default value is 6.

Since
2024-09-20

◆ draw_keypoints

bool Darknet::Keypoints::draw_keypoints

Draw a circle above each detected keypoint.

Default value is true.

See also
circle_size
Since
2024-09-20

◆ draw_labels

bool Darknet::Keypoints::draw_labels

Draw the labels beside each keypoint.

Default value is false.

Since
2024-09-20

◆ draw_skeleton

bool Darknet::Keypoints::draw_skeleton

Draw the skeletons joining each keypoint.

Default value is true.

See also
line_size
Since
2024-09-20

◆ line_size

int Darknet::Keypoints::line_size

Size of lines used to draw skeletons.

draw_skeleton must also be set to true. Default value is 3.

Since
2024-09-20

◆ network_ptr

const Darknet::NetworkPtr Darknet::Keypoints::network_ptr
private

The documentation for this class was generated from the following files: