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

#include "Chart.hpp"

Collaboration diagram for Chart:

Public Member Functions

 Chart ()
 Constructor.
 
 Chart (const std::string &name, const size_t max_batch, const float max_loss)
 Constructor.
 
 ~Chart ()
 Destructor.
 
bool empty () const
 Determines if the chart has been initialized.
 
Chartinitialize ()
 
Chartsave_to_disk ()
 
Chartupdate_accuracy (const float accuracy)
 
Chartupdate_accuracy (const int current_iteration, const float accuracy)
 
Chartupdate_bottom_text (const float seconds_remaining)
 
Chartupdate_loss (const int current_iteration, const float loss)
 
Chartupdate_save_and_display (const int current_iteration, const float loss, const float seconds_remaining, const bool dont_show)
 

Public Attributes

cv::Size dimensions
 The dimensions of the full chart.png image.
 
std::string filename
 e.g., "chart.png"
 
int grid_offset_in_pixels
 The number of pixels reserved on the left, right, and bottom sides of the image to draw text. Normally, this is 60.
 
cv::Rect grid_rect
 The RoI for the grid within the full chart mat.
 
std::time_t last_save_timestamp
 
std::time_t last_update_timestamp
 
cv::Scalar map_colour
 
cv::Mat mat
 This is the full image of the chart.
 
float max_batches
 We're going to store max_batches as a float to make the math easier.
 
float max_chart_loss
 
float max_map_value
 
float previous_loss_iteration
 
float previous_loss_value
 
float previous_map_iteration
 
float previous_map_shown
 
float previous_map_value
 
std::time_t started_timestamp
 
std::string title
 e.g., "Loss and Mean Average Precision"
 

Constructor & Destructor Documentation

◆ Chart() [1/2]

Chart::Chart ( )

Constructor.

◆ Chart() [2/2]

Chart::Chart ( const std::string &  name,
const size_t  max_batch,
const float  max_loss 
)

Constructor.

Here is the call graph for this function:

◆ ~Chart()

Chart::~Chart ( )

Destructor.

Member Function Documentation

◆ empty()

bool Chart::empty ( ) const

Determines if the chart has been initialized.

Here is the caller graph for this function:

◆ initialize()

Chart & Chart::initialize ( )
Here is the caller graph for this function:

◆ save_to_disk()

Chart & Chart::save_to_disk ( )
Here is the caller graph for this function:

◆ update_accuracy() [1/2]

Chart & Chart::update_accuracy ( const float  accuracy)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_accuracy() [2/2]

Chart & Chart::update_accuracy ( const int  current_iteration,
const float  accuracy 
)
Note
This is called only when a new mAP% value has been calculated, typically every 1000 iterations.

◆ update_bottom_text()

Chart & Chart::update_bottom_text ( const float  seconds_remaining)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_loss()

Chart & Chart::update_loss ( const int  current_iteration,
const float  loss 
)
Note
This is called at every iteration to update the chart.
Here is the caller graph for this function:

◆ update_save_and_display()

Chart & Chart::update_save_and_display ( const int  current_iteration,
const float  loss,
const float  seconds_remaining,
const bool  dont_show 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ dimensions

cv::Size Chart::dimensions

The dimensions of the full chart.png image.

Normally, this would be 1000x940, and once the border areas have been removed from 3 sides this leaves us with a grid measuring 880x880, where each large cell measures 88x88 pixels.

◆ filename

std::string Chart::filename

e.g., "chart.png"

◆ grid_offset_in_pixels

int Chart::grid_offset_in_pixels

The number of pixels reserved on the left, right, and bottom sides of the image to draw text. Normally, this is 60.

◆ grid_rect

cv::Rect Chart::grid_rect

The RoI for the grid within the full chart mat.

◆ last_save_timestamp

std::time_t Chart::last_save_timestamp

◆ last_update_timestamp

std::time_t Chart::last_update_timestamp

◆ map_colour

cv::Scalar Chart::map_colour

◆ mat

cv::Mat Chart::mat

This is the full image of the chart.

It is created by initialize() and kept up-to-date by update_loss() and update_accuracy() at the end of each iteration.

◆ max_batches

float Chart::max_batches

We're going to store max_batches as a float to make the math easier.

This way we don't have to keep converting it to a float when we multiply or divide using max_batches.

◆ max_chart_loss

float Chart::max_chart_loss

◆ max_map_value

float Chart::max_map_value

◆ previous_loss_iteration

float Chart::previous_loss_iteration

◆ previous_loss_value

float Chart::previous_loss_value

◆ previous_map_iteration

float Chart::previous_map_iteration

◆ previous_map_shown

float Chart::previous_map_shown

◆ previous_map_value

float Chart::previous_map_value

◆ started_timestamp

std::time_t Chart::started_timestamp

◆ title

std::string Chart::title

e.g., "Loss and Mean Average Precision"


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