Arrows Doxygen¶
Darknet¶
-
class
kwiver::arrows::darknet::
darknet_detector
¶ Inherits from kwiver::vital::algorithm_impl< darknet_detector, vital::algo::image_object_detector >
Public Functions
-
vital::config_block_sptr
get_configuration
() const¶ Get this algorithm’s configuration block .
Get this alg’s configuration block .
This method returns the required configuration for the algorithm. The implementation of this method should be light-weight and only create and fill in the config block.
This base virtual function implementation returns an empty configuration.
- Return
config_block
containing the configuration for this algorithm and any nested components.
-
void
set_configuration
(vital::config_block_sptr config)¶ Set this algorithm’s properties via a config block.
This method is called to pass a configuration to the algorithm. The implementation of this method should be light-weight and only save the necessary config values. Defer any substantial processing in another method.
- Exceptions
no_such_configuration_value_exception
: Thrown if an expected configuration value is not present.algorithm_configuration_exception
: Thrown when the algorithm is given an invalidconfig_block
or is otherwise unable to configure itself.
- Parameters
config
: Theconfig_block
instance containing the configuration parameters for this algorithm
-
bool
check_configuration
(vital::config_block_sptr config) const¶ Check that the algorithm’s configuration config_block is valid.
This checks solely within the provided
config_block
and not against the current state of the instance. This isn’t static for inheritance reasons.- Return
- true if the configuration check passed and false if it didn’t.
- Parameters
config
: The config block to check configuration of.
-
vital::detected_object_set_sptr
detect
(vital::image_container_sptr image_data) const¶ Find all objects on the provided image.
This method analyzes the supplied image and along with any saved context, returns a vector of detected image objects.
- Return
- vector of image objects found
- Parameters
image_data
: the image pixels
-
vital::config_block_sptr
-
class
kwiver::arrows::darknet::
darknet_trainer
¶ Darknet Training Utility Class.
Inherits from kwiver::vital::algorithm_impl< darknet_trainer, vital::algo::train_detector >
Public Functions
-
vital::config_block_sptr
get_configuration
() const¶ Get this algorithm’s configuration block .
Get this alg’s configuration block .
This method returns the required configuration for the algorithm. The implementation of this method should be light-weight and only create and fill in the config block.
This base virtual function implementation returns an empty configuration.
- Return
config_block
containing the configuration for this algorithm and any nested components.
-
void
set_configuration
(vital::config_block_sptr config)¶ Set this algorithm’s properties via a config block.
This method is called to pass a configuration to the algorithm. The implementation of this method should be light-weight and only save the necessary config values. Defer any substantial processing in another method.
- Exceptions
no_such_configuration_value_exception
: Thrown if an expected configuration value is not present.algorithm_configuration_exception
: Thrown when the algorithm is given an invalidconfig_block
or is otherwise unable to configure itself.
- Parameters
config
: Theconfig_block
instance containing the configuration parameters for this algorithm
-
bool
check_configuration
(vital::config_block_sptr config) const¶ Check that the algorithm’s configuration config_block is valid.
This checks solely within the provided
config_block
and not against the current state of the instance. This isn’t static for inheritance reasons.- Return
- true if the configuration check passed and false if it didn’t.
- Parameters
config
: The config block to check configuration of.
-
void
train_from_disk
(std::vector<std::string> train_image_names, std::vector<kwiver::vital::detected_object_set_sptr> train_groundtruth, std::vector<std::string> test_image_names, std::vector<kwiver::vital::detected_object_set_sptr> test_groundtruth)¶ Train a detection model given a list of images and detections.
This varient is geared towards offline training.
- Parameters
train_image_list
: list of train image filenamestrain_groundtruth
: annotations loaded for each imagetest_image_list
: list of test image filenamestest_groundtruth
: annotations loaded for each image
-
vital::config_block_sptr