C++ API Reference

class anchor
#include <etl_localization.hpp>

Public Static Functions

vector<box> generate(const localization::config &cfg)
vector<int> inside_image_bounds(int width, int height, const std::vector<box> &all_anchors)

Private Functions

anchor()

Private Static Functions

vector<box> generate_anchors(size_t base_size, const std::vector<float> &ratios, const std::vector<float> &scales)
vector<box> ratio_enum(const box &anchor, const std::vector<float> &ratios)
vector<box> mkanchors(const std::vector<float> &ws, const std::vector<float> &hs, float x_ctr, float y_ctr)
vector<box> scale_enum(const box &anchor, const std::vector<float> &scales)
class async
#include <util.hpp>

Public Functions

async()
void run(std::function<void(void *)> f, void *param = nullptr, )
void wait()
bool is_ready()
bool is_busy()
void rethrow_exception()

Private Functions

async(const async&)
void entry(void *param)

Private Members

std::function<void(void *)> func
std::shared_ptr<std::thread> thread
bool ready
std::exception_ptr stored_exception
class audio_classifier
#include <provider_audio_classifier.hpp>

Inherits from nervana::provider_interface

Public Functions

audio_classifier(nlohmann::json js)
virtual void provide(int idx, buffer_in_array &in_buf, buffer_out_array &out_buf)

Private Members

audio::config audio_config
label::config label_config
audio::extractor audio_extractor
audio::transformer audio_transformer
audio::loader audio_loader
audio::param_factory audio_factory
label::extractor label_extractor
label::loader label_loader
class audio_only
#include <provider_audio_only.hpp>

Inherits from nervana::provider_interface

Public Functions

audio_only(nlohmann::json js)
virtual void provide(int idx, buffer_in_array &in_buf, buffer_out_array &out_buf)

Private Members

audio::config audio_config
audio::extractor audio_extractor
audio::transformer audio_transformer
audio::loader audio_loader
audio::param_factory audio_factory
class audio_transcriber
#include <provider_audio_transcriber.hpp>

Inherits from nervana::provider_interface

Public Functions

audio_transcriber(nlohmann::json js)
virtual void provide(int idx, buffer_in_array &in_buf, buffer_out_array &out_buf)
virtual void post_process(buffer_out_array &out_buf)
const std::unordered_map<char, uint8_t> &get_cmap() const

Private Members

audio::config audio_config
char_map::config trans_config
audio::extractor audio_extractor
audio::transformer audio_transformer
audio::loader audio_loader
audio::param_factory audio_factory
char_map::extractor trans_extractor
char_map::loader trans_loader
struct AviIndex
#include <avi.hpp>

Public Members

uint32_t ckid
uint32_t dwFlags
uint32_t dwChunkOffset
uint32_t dwChunkLength
struct AviMainHeader
#include <avi.hpp>

Public Members

uint32_t dwMicroSecPerFrame
uint32_t dwMaxBytesPerSec
uint32_t dwReserved1
uint32_t dwFlags
uint32_t dwTotalFrames
uint32_t dwInitialFrames
uint32_t dwStreams
uint32_t dwSuggestedBufferSize
uint32_t dwWidth
uint32_t dwHeight
uint32_t dwReserved[4]
class AviMjpegStream
#include <avi.hpp>

Public Functions

AviMjpegStream()
bool parseAvi(std::istream &in_str)
bool parseAvi(std::istream &in_str, frame_list &in_frame_list)
size_t getFramesCount()
frame_list &getFrames()
uint32_t getWidth()
uint32_t getHeight()
double getFps()

Protected Functions

bool parseAviWithFrameList(std::istream &in_str, frame_list &in_frame_list)
void skipJunk(RiffChunk &chunk, std::istream &in_str)
void skipJunk(RiffList &list, std::istream &in_str)
bool parseHdrlList(std::istream &in_str)
bool parseIndex(std::istream &in_str, uint32_t index_size, frame_list &in_frame_list)
bool parseMovi(std::istream &in_str, frame_list &in_frame_list)
bool parseStrl(std::istream &in_str, uint8_t stream_id)
bool parseInfo(std::istream &in_str)
void printError(std::istream &in_str, RiffList &list, uint32_t expected_fourcc)
void printError(std::istream &in_str, RiffChunk &chunk, uint32_t expected_fourcc)

Protected Attributes

uint32_t m_stream_id
uint64_t m_movi_start
uint64_t m_movi_end
frame_list m_frame_list
uint32_t m_width
uint32_t m_height
double m_fps
bool m_is_indx_present
struct AviStreamHeader
#include <avi.hpp>

Public Members

uint32_t fccType
uint32_t fccHandler
uint32_t dwFlags
uint32_t dwPriority
uint32_t dwInitialFrames
uint32_t dwScale
uint32_t dwRate
uint32_t dwStart
uint32_t dwLength
uint32_t dwSuggestedBufferSize
uint32_t dwQuality
uint32_t dwSampleSize
int16_t left
int16_t top
int16_t right
int16_t bottom
struct nervana::AviStreamHeader::@0 nervana::AviStreamHeader::rcFrame
class batch_iterator
#include <batch_iterator.hpp>

Public Functions

batch_iterator(std::shared_ptr<block_iterator> src_block_iterator, int batch_size)
void read(nervana::buffer_in_array &dst_buffer_array)
void reset()

Protected Functions

void pop_item_from_block(nervana::buffer_in_array &dst_buffer_array)
void transfer_buffer_item(nervana::buffer_in *dst, nervana::buffer_in *src)

Protected Attributes

std::shared_ptr<block_iterator> _src_block_iterator
int _batch_size
std::shared_ptr<nervana::buffer_in_array> _src_buffer_array_ptr
int _i
struct BitmapInfoHeader
#include <avi.hpp>

Public Members

uint32_t biSize
int32_t biWidth
int32_t biHeight
uint16_t biPlanes
uint16_t biBitCount
uint32_t biCompression
uint32_t biSizeImage
int32_t biXPelsPerMeter
int32_t biYPelsPerMeter
uint32_t biClrUsed
uint32_t biClrImportant
class block_iterator
#include <block_iterator.hpp>

Subclassed by nervana::block_iterator_sequential, nervana::block_iterator_shuffled

Public Functions

virtual void read(nervana::buffer_in_array &dest) = 0
virtual void reset() = 0
class block_iterator_sequential
#include <block_iterator_sequential.hpp>

Inherits from nervana::block_iterator

Public Functions

block_iterator_sequential(std::shared_ptr<block_loader> loader)
virtual void read(nervana::buffer_in_array &dest)
virtual void reset()

Private Members

std::shared_ptr<block_loader> _loader
uint32_t _count
uint32_t _i
class block_iterator_shuffled
#include <block_iterator_shuffled.hpp>

Inherits from nervana::block_iterator

Public Functions

block_iterator_shuffled(std::shared_ptr<block_loader> loader)
virtual void read(nervana::buffer_in_array &dest)
virtual void reset()

Protected Functions

void shuffle()

Private Members

std::minstd_rand0 _rand
std::shared_ptr<block_loader> _loader
std::vector<uint32_t> _indices
std::vector<uint32_t>::iterator _it
uint32_t _epoch
class block_loader
#include <block_loader.hpp>

Subclassed by nervana::block_loader_cpio_cache, nervana::block_loader_file, nervana::block_loader_nds

Public Functions

virtual void load_block(nervana::buffer_in_array &dest, uint32_t block_num) = 0
virtual void prefetch_block(uint32_t block_num)
virtual uint32_t object_count() = 0
uint32_t block_count()
uint32_t block_size()

Protected Functions

block_loader(uint32_t block_size)

Protected Attributes

uint32_t _block_size
class block_loader_cpio_cache
#include <block_loader_cpio_cache.hpp>

Inherits from nervana::block_loader

Public Functions

block_loader_cpio_cache(const std::string &rootCacheDir, const std::string &cache_id, const std::string &version, std::shared_ptr<block_loader> loader)
virtual void load_block(nervana::buffer_in_array &dest, uint32_t block_num)
virtual void prefetch_block(uint32_t block_num)
virtual uint32_t object_count()

Private Functions

bool load_block_from_cache(nervana::buffer_in_array &dest, uint32_t block_num)
void write_block_to_cache(nervana::buffer_in_array &dest, uint32_t block_num)
string block_filename(uint32_t block_num)
void invalidate_old_cache(const std::string &rootCacheDir, const std::string &cache_id, const std::string &version)
bool filename_holds_invalid_cache(const std::string &filename, const std::string &cache_id, const std::string &version)
bool check_if_complete()
void mark_cache_complete()
bool take_ownership()
void release_ownership()

Private Members

const std::string owner_lock_filename
const std::string cache_complete_filename
std::string _cacheDir
std::shared_ptr<block_loader> _loader
const size_t block_count
bool cache_owner
int ownership_lock
class block_loader_file
#include <block_loader_file.hpp>

Inherits from nervana::block_loader

Public Functions

block_loader_file(std::shared_ptr<nervana::manifest_csv> manifest, float subset_fraction, uint32_t block_size)
virtual void load_block(nervana::buffer_in_array &dest, uint32_t block_num)
void load_file(std::vector<char> &buff, const std::string &filename)
virtual void prefetch_block(uint32_t block_num)
virtual uint32_t object_count()

Private Functions

void generate_subset(const std::shared_ptr<nervana::manifest_csv> &manifest, float subset_fraction)
void prefetch_entry(void *param)
void fetch_block(uint32_t block_num)

Private Members

const std::shared_ptr<nervana::manifest_csv> _manifest
async async_handler
std::vector<std::pair<std::vector<char>, std::exception_ptr>> prefetch_buffer
uint32_t prefetch_block_num
bool prefetch_pending
size_t elements_per_record
class block_loader_nds
#include <block_loader_nds.hpp>

Inherits from nervana::block_loader

Public Functions

block_loader_nds(const std::string &baseurl, const std::string &token, int collection_id, uint32_t block_size, int shard_count = 1, int shard_index = 0)
~block_loader_nds()
virtual void load_block(nervana::buffer_in_array &dest, uint32_t block_num)
virtual void prefetch_block(uint32_t block_num)
virtual uint32_t object_count()
uint32_t block_count()

Private Functions

void load_metadata()
void get(const std::string &url, std::stringstream &stream)
const string load_block_url(uint32_t block_num)
const string metadata_url()
void prefetch_entry(void *param)
void fetch_block(uint32_t block_num)

Private Members

const std::string _baseurl
const std::string _token
const int _collection_id
const int _shard_count
const int _shard_index
unsigned int _objectCount
unsigned int _blockCount
void *_curl
async async_handler
std::vector<std::vector<char>> prefetch_buffer
uint32_t prefetch_block_num
bool prefetch_pending
class box
#include <box.hpp>

Subclassed by nervana::boundingbox::box

Public Functions

box()
box(float _xmin, float _ymin, float _xmax, float _ymax)
box operator+(const box &b) const
box operator*(float v) const
bool operator==(const box &b) const
cv::Rect rect() const
float xcenter() const
float ycenter() const
float x() const
float y() const
float width() const
float height() const

Public Members

float xmin
float ymin
float xmax
float ymax
class box
#include <etl_boundingbox.hpp>

Inherits from nervana::box

Public Functions

box operator*(float v) const

Public Members

bool difficult
bool truncated
int label
class buffer_in
#include <buffer_in.hpp>

Public Functions

buffer_in()
virtual ~buffer_in()
void read(std::istream &is, int size)
void reset()
vector<char> &get_item(int index)
void add_item(const std::vector<char> &buf)
void add_item(std::vector<char> &&buf)
void add_exception(std::exception_ptr e)
void shuffle(uint32_t random_seed)
int get_item_count()

Private Members

std::vector<std::vector<char>> buffers
std::map<int, std::exception_ptr> exceptions
class buffer_in_array
#include <buffer_in.hpp>

Public Functions

buffer_in_array(unsigned int nbuffers_in)
~buffer_in_array()
buffer_in *operator[](int i)
const buffer_in *operator[](int i) const
size_t size() const
std::vector<buffer_in *>::iterator begin()
std::vector<buffer_in *>::iterator end()

Private Members

std::vector<buffer_in *> data
class buffer_out
#include <buffer_out.hpp>

Public Functions

buffer_out(size_t element_size, size_t batch_size, bool pinned = false)
virtual ~buffer_out()
char *get_item(size_t index)
char *data()
size_t get_item_count()
size_t size()

Private Functions

buffer_out()
char *alloc()
void dealloc(char *data)

Private Members

char *_data
size_t _size
size_t _batch_size
bool _pinned
size_t _stride
size_t _item_size
class buffer_out_array
#include <buffer_out.hpp>

Public Functions

buffer_out_array(const std::vector<size_t> &write_sizes, size_t batch_size, bool pinned = false)
~buffer_out_array()
buffer_out *operator[](size_t i)
size_t size() const

Private Members

std::vector<buffer_out *> data
class buffer_pool
#include <buffer_pool.hpp>

Subclassed by nervana::buffer_pool_in, nervana::buffer_pool_out

Public Functions

void write_exception(std::exception_ptr exception_ptr)
void reraise_exception()

Protected Functions

buffer_pool()
void clear_exception()

Protected Attributes

std::vector<std::exception_ptr> _exceptions
int _readPos
int _writePos
class buffer_pool_in
#include <buffer_pool_in.hpp>

Inherits from nervana::buffer_pool

Public Functions

buffer_pool_in(unsigned int nbuffers_in)
virtual ~buffer_pool_in()
buffer_in_array &get_for_write()
buffer_in_array &get_for_read()
void advance_read_pos()
void advance_write_pos()
bool empty()
bool full()
std::mutex &get_mutex()
void wait_for_not_empty(std::unique_lock<std::mutex> &lock)
void wait_for_non_full(std::unique_lock<std::mutex> &lock)
void signal_not_empty()
void signal_not_full()

Protected Functions

void advance(int &index)

Protected Attributes

int _used
std::vector<std::shared_ptr<buffer_in_array>> _bufs
std::mutex _mutex
std::condition_variable _nonFull
std::condition_variable _nonEmpty

Protected Static Attributes

constexpr int _count
class buffer_pool_out
#include <buffer_pool_out.hpp>

Inherits from nervana::buffer_pool

Public Functions

buffer_pool_out(const std::vector<size_t> &writeSizes, size_t batchSize, bool pinned = false)
virtual ~buffer_pool_out()
buffer_out_array &get_for_write()
buffer_out_array &get_for_read()
void advance_read_pos()
void advance_write_pos()
bool empty()
bool full()
std::mutex &get_mutex()
void wait_for_not_empty(std::unique_lock<std::mutex> &lock)
void wait_for_non_full(std::unique_lock<std::mutex> &lock)
void signal_not_empty()
void signal_not_full()

Protected Functions

void advance(int &index)

Protected Attributes

int _used
std::vector<std::shared_ptr<buffer_out_array>> _bufs
std::mutex _mutex
std::condition_variable _nonFull
std::condition_variable _nonEmpty

Protected Static Attributes

constexpr int _count
class config
#include <etl_label.hpp>

Inherits from nervana::interface::config

Public Functions

config(nlohmann::json js)

Public Members

bool binary
std::string output_type

Private Functions

config()

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> config_list
class config
#include <etl_label_map.hpp>

Inherits from nervana::interface::config

Public Functions

config(nlohmann::json js)
virtual ~config()
int max_label_count() const

Public Members

std::string output_type
std::vector<std::string> class_names
int max_classes

Private Functions

config()

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> config_list
class config
#include <etl_audio.hpp>

Configuration for audio ETL.

An instantiation of this class controls the ETL of audio data into the target memory buffers from the source CPIO archives.

Extract

  • Audio files should be stored in mono, PCM-16 .wav format. If needed, you should create an ingestion script to convert to this format (commonly using sox or ffmpeg)

Transform

  • Audio can be transformed into three different representations: spectrogram, mel-frequency spectral coefficients, or mel-frequency cepstral coefficients

Load

  • Just a simple loading into a memory buffer.

Inherits from nervana::interface::config

Public Functions

config(nlohmann::json js)

Parses the configuration JSON.

void validate()

Public Members

std::string max_duration

Maximum duration of any audio clip in units of “seconds”, “milliseconds”, or “samples” (e.g. “4 seconds”).

std::string frame_stride

Interval between consecutive frames in units of “seconds”, “milliseconds”, or “samples” (e.g. .01 seconds).

std::string frame_length

Duration of each frame in units of “seconds”, “milliseconds”, or “samples” (e.g. .025 seconds).

uint32_t num_cepstra

Number of cepstra to use (only for feature_type=”mfcc”)

uint32_t num_filters

Number of filters to use for mel-frequency transform (used in feature_type=”mfsc”) (Not used for mfcc?)

std::string output_type

Input data type. Currently only “uint8_t” is supported.

std::string feature_type

Feature space to represent audio. Options are “specgram” - Short-time fourier transform, “mfsc” - Mel-Frequency spectrogram, “mfcc” - Mel-Frequency cepstral coefficients

std::string window_type

Window type for spectrogram generation

std::string noise_index_file
std::string noise_root
uint32_t sample_freq_hz

Sample rate of input audio in hertz

std::uniform_real_distribution<float> time_scale_fraction

Simple linear time-warping

std::uniform_real_distribution<float> noise_level

How much noise to add (a value of 1 would be 0 dB SNR)

uint32_t time_steps
uint32_t freq_steps
uint32_t max_duration_tn
uint32_t frame_length_tn
uint32_t frame_stride_tn
float max_duration_ms
float frame_length_ms
float frame_stride_ms
std::bernoulli_distribution add_noise

Probability of adding noise

std::uniform_int_distribution<uint32_t> noise_index

Index into noise index file

std::uniform_real_distribution<float> noise_offset_fraction

Offset from start of noise file

Private Functions

config()
void parse_samples_or_seconds(const std::string &unit, float &ms, uint32_t &tn)

Private Members

float add_noise_probability
std::vector<std::shared_ptr<interface::config_info_interface>> config_list
class config
#include <etl_localization.hpp>

Inherits from nervana::interface::config

Public Functions

config(nlohmann::json js, const image::config &iconfig)
size_t total_anchors() const

Public Members

size_t rois_per_image
size_t output_height
size_t output_width
size_t base_size
float scaling_factor
std::vector<float> ratios
std::vector<float> scales
float negative_overlap
float positive_overlap
float foreground_fraction
size_t max_gt_boxes
std::vector<std::string> class_names
float fixed_scaling_factor
size_t output_buffer_size
std::unordered_map<std::string, int> class_name_map

Private Functions

config()
void validate()

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> config_list
class config
#include <etl_multicrop.hpp>

Inherits from nervana::interface::config

Public Functions

config(nlohmann::json js)

Public Members

std::vector<float> crop_scales
nervana::image::config crop_config
int crop_count
std::vector<bool> orientations

Private Functions

config()
void validate()

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> config_list
class config
#include <etl_blob.hpp>

Inherits from nervana::interface::config

Public Functions

config(nlohmann::json js)

Public Members

std::string output_type
size_t output_count

Private Functions

config()

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> config_list
class config
#include <etl_video.hpp>

Inherits from nervana::interface::config

Public Functions

config(nlohmann::json js)

Public Members

uint32_t max_frame_count
nervana::image::config frame

Private Functions

config()

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> config_list
class config
#include <etl_boundingbox.hpp>

Inherits from nervana::interface::config

Public Functions

config(nlohmann::json js)

Public Members

size_t height
size_t width
size_t max_bbox_count
std::vector<std::string> class_names
std::string output_type
std::unordered_map<std::string, int> label_map

Private Functions

config()
void validate()

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> config_list
class config
#include <interface.hpp>

Subclassed by nervana::audio::config, nervana::blob::config, nervana::boundingbox::config, nervana::char_map::config, nervana::image::config, nervana::label::config, nervana::label_map::config, nervana::loader_config, nervana::localization::config, nervana::multicrop::config, nervana::video::config

Public Types

enum mode

Values:

OPTIONAL
REQUIRED

Public Functions

config()
const nervana::shape_type &get_shape_type() const
const std::vector<nervana::shape_type> &get_shape_type_list() const
void verify_config(const std::string &location, const std::vector<std::shared_ptr<interface::config_info_interface>> &config, nlohmann::json js) const
void add_shape_type(const std::vector<size_t> &sh, const std::string &output_type, const bool flatten_all_dims = false)
void add_shape_type(const std::vector<size_t> &sh, const nervana::output_type &ot, const bool flatten_all_dims = false)

Public Static Functions

template <typename T, typename S>
static void set_dist_params(T &dist, S &params)
static void set_dist_params(std::bernoulli_distribution &dist, std::vector<bool> &params)
template <typename T>
static void parse_dist(T &value, const std::string &key, const nlohmann::json &js, mode required = mode::OPTIONAL)
template <typename T>
static void parse_value(T &value, const std::string &key, const nlohmann::json &js, mode required = mode::OPTIONAL)
template <typename T>
static void parse_enum(T &value, const std::string key, const nlohmann::json &js, mode required = mode::OPTIONAL)

Private Members

std::vector<nervana::shape_type> shape_type_list
class config
#include <etl_char_map.hpp>

Inherits from nervana::interface::config

Public Functions

config(nlohmann::json js)
const std::unordered_map<char, uint8_t> &get_cmap() const

Public Members

uint32_t max_length

Maximum length of each transcript. Samples with longer transcripts will be truncated

std::string alphabet

Character map alphabet

uint8_t unknown_value

Integer value to give to unknown characters. 0 causes them to be discarded.

bool pack_for_ctc

Pack the output buffer for use in CTC. This places them end to end

std::string output_type

Output data type. Currently only uint8_t is supported

Private Functions

config()
void validate()
bool unique_chars(std::string test_string)

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> config_list
std::unordered_map<char, uint8_t> _cmap

Friends

friend nervana::char_map::config::extractor
class config
#include <etl_image.hpp>

Configuration for image ETL.

An instantiation of this class controls the ETL of image data into the target memory buffers from the source CPIO archives.

Inherits from nervana::interface::config

Public Functions

config(nlohmann::json js)

Public Members

uint32_t height
uint32_t width
std::string output_type
bool do_area_scale
bool channel_major
bool crop_enable
bool fixed_aspect_ratio
uint32_t channels
float fixed_scaling_factor
std::uniform_real_distribution<float> scale

Scale the crop box (width, height)

std::uniform_int_distribution<int> angle

Rotate the image (rho, phi)

std::normal_distribution<float> lighting

Adjust lighting

std::uniform_real_distribution<float> horizontal_distortion

Adjust aspect ratio

std::uniform_real_distribution<float> contrast

Adjust contrast

std::uniform_real_distribution<float> brightness

Adjust brightness

std::uniform_real_distribution<float> saturation

Adjust saturation

std::uniform_int_distribution<int> hue

Rotate hue in degrees. Valid values are [0-360]

std::uniform_real_distribution<float> crop_offset

Offset from center for the crop

std::bernoulli_distribution flip_distribution

Flip the image left to right

Private Functions

config()
void validate()

Private Members

std::vector<std::shared_ptr<interface::config_info_interface>> config_list
bool flip_enable
bool center

Friends

friend nervana::image::config::video::config
friend nervana::image::config::multicrop::config
template <typename>
class config_info
#include <interface.hpp>

Inherits from nervana::interface::config_info_interface

Public Functions

config_info(T &var, const std::string &name, nervana::interface::config::mode m, std::function<void(T&, const std::string&, const nlohmann::json&, nervana::interface::config::mode)> parse, std::function<bool(T)> validate = [](T) ->bool{return true;})
virtual const std::string &name() const
virtual bool required() const
virtual std::string type() const
virtual std::string get_default_value() const
virtual void parse(nlohmann::json js)

Private Functions

config_info()

Private Members

T &target_variable
const std::string var_name
nervana::interface::config::mode parse_mode
std::function<void(T&, const std::string&, const nlohmann::json&, nervana::interface::config::mode)> parse_function
std::function<bool(T)> validate_function
T default_value
class config_info_interface
#include <interface.hpp>

Subclassed by nervana::interface::config_info< typename >

Public Functions

virtual const std::string &name() const = 0
virtual void parse(nlohmann::json js) = 0
virtual bool required() const = 0
virtual std::string type() const = 0
virtual std::string get_default_value() const = 0
class conststring
#include <log.hpp>

Public Functions

template <size_t SIZE>
constexpr conststring(const char (&p)[SIZE])
constexpr char operator[](size_t i) const
constexpr const char *get_ptr(size_t offset) const
constexpr size_t size() const

Private Members

const char *_string
size_t _size
class CRC32
#include <crc.hpp>

CRC-32 Checksum Calculation.

Uses CRC polynomial 0xEDB88320

Inherits from CryptoPP::HashTransformation

Public Functions

CRC32()
void Update(const byte *input, size_t length)
void TruncatedFinal(byte *hash, size_t size)
unsigned int DigestSize() const
std::string AlgorithmName() const
void UpdateByte(byte b)
byte GetCrcByte(size_t i) const

Public Static Functions

static CRYPTOPP_CONSTEXPR const char* CryptoPP::CRC32::StaticAlgorithmName()

Protected Functions

void Reset()

Private Members

word32 m_crc

Private Static Attributes

const word32 m_tab
class CRC32C
#include <crc.hpp>

CRC-32C Checksum Calculation.

Uses CRC polynomial 0x82F63B78

Since
Crypto++ 5.6.4

Inherits from CryptoPP::HashTransformation

Public Functions

CRC32C()
void Update(const byte *input, size_t length)
void TruncatedFinal(byte *hash, size_t size)
unsigned int DigestSize() const
std::string AlgorithmName() const
void UpdateByte(byte b)
byte GetCrcByte(size_t i) const

Public Static Functions

static CRYPTOPP_CONSTEXPR const char* CryptoPP::CRC32C::StaticAlgorithmName()

Protected Functions

void Reset()

Private Members

word32 m_crc

Private Static Attributes

const word32 m_tab
struct DataHeader
#include <wav_data.hpp>

Public Members

uint32_t dwDataCC
uint32_t dwDataLen
class decode_thread_pool
#include <loader.hpp>

Inherits from nervana::thread_pool

Public Functions

decode_thread_pool(int count, const std::shared_ptr<nervana::buffer_pool_in> &in, const std::shared_ptr<nervana::buffer_pool_out> &out, const std::shared_ptr<python_backend> &pbe)
virtual ~decode_thread_pool()
virtual void start()
virtual void stop()
void add_provider(std::shared_ptr<nervana::provider_interface> prov)

Protected Functions

virtual void run(int id)
virtual void work(int id)
void produce()
void consume()
void manage()

Private Functions

decode_thread_pool()
decode_thread_pool(const decode_thread_pool&)

Private Members

int _itemsPerThread
std::shared_ptr<nervana::buffer_pool_in> _in
std::shared_ptr<nervana::buffer_pool_out> _out
std::shared_ptr<python_backend> _python_backend
std::mutex _mutex
std::condition_variable _started
std::condition_variable _ended
int _batchSize
int _endSignaled
std::thread *_manager
bool _stopManager
bool _managerStopped
nervana::buffer_in_array *_inputBuf
int _bufferIndex
std::vector<std::shared_ptr<nervana::provider_interface>> _providers
std::vector<int> _startSignaled
std::vector<int> _startInds
std::vector<int> _endInds
class decoded
#include <etl_label.hpp>

Inherits from nervana::interface::decoded_media

Public Functions

decoded(int index)
virtual ~decoded()
int get_index()

Private Functions

decoded()

Private Members

int _index
class decoded
#include <etl_label_map.hpp>

Inherits from nervana::interface::decoded_media

Public Functions

decoded()
virtual ~decoded()
const std::vector<int> &get_data() const

Private Members

std::vector<int> labels

Friends

friend nervana::label_map::decoded::label_map::extractor
class decoded
#include <etl_audio.hpp>

Inherits from nervana::interface::decoded_media

Public Functions

decoded(cv::Mat raw)
size_t size()
cv::Mat &get_time_data()
cv::Mat &get_freq_data()

Public Members

uint32_t valid_frames

Protected Attributes

cv::Mat time_rep
cv::Mat freq_rep
class decoded
#include <etl_localization.hpp>

Inherits from nervana::boundingbox::decoded

Public Functions

decoded()
virtual ~decoded()

Public Members

std::vector<int> labels
std::vector<target> bbox_targets
std::vector<int> anchor_index
float image_scale
cv::Size output_image_size
cv::Size input_image_size
std::vector<boundingbox::box> gt_boxes
class decoded
#include <etl_blob.hpp>

Inherits from nervana::interface::decoded_media

Public Functions

decoded(const char *buf, int bufSize)
virtual ~decoded()

Private Members

const char *data
int data_size

Friends

friend nervana::blob::decoded::loader
class decoded
#include <etl_boundingbox.hpp>

Inherits from nervana::interface::decoded_media

Subclassed by nervana::localization::decoded

Public Functions

decoded()
bool extract(const char *data, int size, const std::unordered_map<std::string, int> &label_map)
virtual ~decoded()
const std::vector<boundingbox::box> &boxes() const
int width() const
int height() const
int depth() const

Private Members

std::vector<boundingbox::box> _boxes
int _width
int _height
int _depth

Friends

friend nervana::boundingbox::decoded::transformer
friend nervana::boundingbox::decoded::extractor
class decoded
#include <etl_char_map.hpp>

Inherits from nervana::interface::decoded_media

Public Functions

decoded(std::vector<uint8_t> char_ints, uint32_t nvalid)
virtual ~decoded()
std::vector<uint8_t> get_data() const
uint32_t get_length() const

Private Members

std::vector<uint8_t> _labels
uint32_t _nvalid
class decoded
#include <etl_image.hpp>

Inherits from nervana::interface::decoded_media

Public Functions

decoded()
decoded(cv::Mat img)
bool add(cv::Mat img)
bool add(const std::vector<cv::Mat> &images)
virtual ~decoded()
cv::Mat &get_image(int index)
cv::Size2i get_image_size() const
int get_image_channels() const
size_t get_image_count() const
size_t get_size() const

Protected Functions

bool all_images_are_same_size()

Protected Attributes

std::vector<cv::Mat> _images
class decoded_media
#include <interface.hpp>

Subclassed by nervana::audio::decoded, nervana::blob::decoded, nervana::boundingbox::decoded, nervana::char_map::decoded, nervana::image::decoded, nervana::label::decoded, nervana::label_map::decoded

Public Functions

virtual ~decoded_media()
class extractor
#include <etl_label.hpp>

Inherits from nervana::interface::extractor< label::decoded >

Public Functions

extractor(const label::config &cfg)
virtual ~extractor()
virtual std::shared_ptr<label::decoded> extract(const char *buf, int bufSize)

Private Members

bool _binary
class extractor
#include <etl_label_map.hpp>

Inherits from nervana::interface::extractor< label_map::decoded >

Public Functions

extractor(const label_map::config &cfg)
virtual ~extractor()
virtual shared_ptr<decoded> extract(const char *data, int size)
const std::unordered_map<std::string, int> &get_data()

Private Members

std::unordered_map<std::string, int> dictionary
class extractor
#include <etl_audio.hpp>

Inherits from nervana::interface::extractor< audio::decoded >

Public Functions

extractor()
virtual ~extractor()
virtual std::shared_ptr<audio::decoded> extract(const char *item, int itemSize)

Extract audio data from a wav file using sox.

class extractor
#include <etl_localization.hpp>

Inherits from nervana::interface::extractor< localization::decoded >

Public Functions

extractor(const localization::config &cfg)
virtual std::shared_ptr<localization::decoded> extract(const char *data, int size)
virtual ~extractor()

Private Functions

extractor()

Private Members

boundingbox::extractor bbox_extractor
class extractor
#include <etl_pixel_mask.hpp>

Inherits from nervana::interface::extractor< image::decoded >

Public Functions

extractor(const image::config &config)
virtual ~extractor()
virtual shared_ptr<image::decoded> extract(const char *inbuf, int insize)
class extractor
#include <etl_blob.hpp>

Inherits from nervana::interface::extractor< blob::decoded >

Public Functions

extractor(const blob::config &cfg)
virtual ~extractor()
virtual std::shared_ptr<blob::decoded> extract(const char *buf, int bufSize)
class extractor
#include <etl_video.hpp>

Inherits from nervana::interface::extractor< image::decoded >

Public Functions

extractor(const video::config&)
virtual ~extractor()
virtual std::shared_ptr<image::decoded> extract(const char *item, int itemSize)

Private Functions

extractor()
template <typename T>
class extractor
#include <interface.hpp>

Public Functions

virtual ~extractor()
virtual std::shared_ptr<T> extract(const char *, int) = 0
class extractor
#include <etl_boundingbox.hpp>

Inherits from nervana::interface::extractor< nervana::boundingbox::decoded >

Public Functions

extractor(const std::unordered_map<std::string, int> &map)
virtual ~extractor()
virtual shared_ptr<boundingbox::decoded> extract(const char *data, int size)
void extract(const char *data, int size, std::shared_ptr<boundingbox::decoded> &rc)

Private Functions

extractor()

Private Members

std::unordered_map<std::string, int> label_map
class extractor
#include <etl_char_map.hpp>

Inherits from nervana::interface::extractor< char_map::decoded >

Public Functions

extractor(const char_map::config &cfg)
virtual ~extractor()
virtual std::shared_ptr<char_map::decoded> extract(const char *in_array, int in_sz)

Private Members

const std::unordered_map<char, uint8_t> &_cmap
uint32_t _max_length
const uint8_t _unknown_value
class extractor
#include <etl_depthmap.hpp>

Inherits from nervana::interface::extractor< image::decoded >

Public Functions

extractor(const image::config &config)
virtual ~extractor()
virtual shared_ptr<image::decoded> extract(const char *inbuf, int insize)
class extractor
#include <etl_image.hpp>

Inherits from nervana::interface::extractor< image::decoded >

Public Functions

extractor(const image::config &cfg)
virtual ~extractor()
virtual shared_ptr<image::decoded> extract(const char *inbuf, int insize)
const int get_channel_count()

Private Members

int _pixel_type
int _color_mode
class file_reader
#include <cpio.hpp>

Inherits from nervana::cpio::reader

Public Functions

file_reader()
~file_reader()
bool open(const std::string &fileName)
void close()

Private Members

std::ifstream _ifs
class file_util
#include <file_util.hpp>

Public Static Functions

string path_join(const std::string &s1, const std::string &s2)
size_t get_file_size(const std::string &filename)
void remove_directory(const std::string &dir)
bool make_directory(const std::string &dir)
string make_temp_directory(const std::string &path = "")
std::string get_temp_directory()
void remove_file(const std::string &file)
vector<char> read_file_contents(const std::string &path)
void iterate_files(const std::string &path, std::function<void(const std::string &file, bool is_dir)> func, bool recurse = false, )
string tmp_filename(const std::string &extension = "")
void touch(const std::string &filename)
bool exists(const std::string &filename)
int try_get_lock(const std::string &filename)
void release_lock(int fd, const std::string &filename)

Private Static Functions

void iterate_files_worker(const std::string &path, std::function<void(const std::string &file, bool is_dir)> func, bool recurse = false, )
class file_writer
#include <cpio.hpp>

Public Functions

~file_writer()
void open(const std::string &fileName, const std::string &dataType = "")
void close()
void write_all_records(nervana::buffer_in_array &buff)
void write_record(nervana::buffer_in_array &buff, int record_idx)
void write_record_element(const char *elem, uint32_t elem_size, uint32_t element_idx)
void increment_record_count()

Private Members

std::ofstream _ofs
header _header
trailer _trailer
record_header _recordHeader
int _fileHeaderOffset
std::string _fileName
std::string _tempName
struct FmtHeader
#include <wav_data.hpp>

Public Members

uint32_t dwFmtCC
uint32_t dwFmtLen
uint16_t hwFmtTag
uint16_t hwChannels
uint32_t dwSampleRate
uint32_t dwBytesPerSec
uint16_t hwBlockAlign
uint16_t hwBitDepth
class gil_state
#include <python_backend.hpp>

Public Functions

gil_state()
~gil_state()

Private Members

PyGILState_STATE gstate
class HashTransformation
#include <crc.hpp>

Subclassed by CryptoPP::CRC32, CryptoPP::CRC32C

class header
#include <cpio.hpp>

Public Functions

header()
void read(std::istream &ifs)
void write(std::ostream &ofs)

Private Members

char _magic[4]
uint32_t _formatVersion
uint32_t _writerVersion
char _dataType[8]
uint32_t _itemCount
uint8_t _unused[40]

Friends

friend nervana::cpio::header::reader
friend nervana::cpio::header::file_writer
class image_boundingbox
#include <provider_image_boundingbox.hpp>

Inherits from nervana::provider_interface

Public Functions

image_boundingbox(nlohmann::json js)
virtual ~image_boundingbox()
virtual void provide(int idx, buffer_in_array &in_buf, buffer_out_array &out_buf)

Private Functions

image_boundingbox()

Private Members

image::config image_config
boundingbox::config bbox_config
image::extractor image_extractor
image::transformer image_transformer
image::loader image_loader
image::param_factory image_factory
boundingbox::extractor bbox_extractor
boundingbox::transformer bbox_transformer
boundingbox::loader bbox_loader
std::default_random_engine _r_eng
class image_classifier
#include <provider_image_classifier.hpp>

Inherits from nervana::provider_interface

Public Functions

image_classifier(nlohmann::json js)
virtual void provide(int idx, buffer_in_array &in_buf, buffer_out_array &out_buf)

Private Members

image::config image_config
label::config label_config
image::extractor image_extractor
image::transformer image_transformer
image::loader image_loader
image::param_factory image_factory
label::extractor label_extractor
label::loader label_loader
class image_localization
#include <provider_image_localization.hpp>

Inherits from nervana::provider_interface

Public Functions

image_localization(nlohmann::json js)
virtual void provide(int idx, buffer_in_array &in_buf, buffer_out_array &out_buf)

Private Members

image::config image_config
localization::config localization_config
image::extractor image_extractor
image::transformer image_transformer
image::loader image_loader
image::param_factory image_factory
localization::extractor localization_extractor
localization::transformer localization_transformer
localization::loader localization_loader
class image_only
#include <provider_image_only.hpp>

Inherits from nervana::provider_interface

Public Functions

image_only(nlohmann::json js)
virtual void provide(int idx, buffer_in_array &in_buf, buffer_out_array &out_buf)

Private Members

image::config image_config
image::extractor image_extractor
image::transformer image_transformer
image::loader image_loader
image::param_factory image_factory
class image_pixelmask
#include <provider_image_pixelmask.hpp>

Inherits from nervana::provider_interface

Public Functions

image_pixelmask(nlohmann::json js)
virtual void provide(int idx, buffer_in_array &in_buf, buffer_out_array &out_buf)

Private Members

image::config image_config
image::config target_config
image::extractor image_extractor
image::transformer image_transformer
image::loader image_loader
image::param_factory image_factory
pixel_mask::extractor target_extractor
pixel_mask::transformer target_transformer
image::loader target_loader
class image_stereo_blob
#include <provider_image_stereo.hpp>

Inherits from nervana::provider_interface

Public Functions

image_stereo_blob(nlohmann::json js)
virtual void provide(int idx, buffer_in_array &in_buf, buffer_out_array &out_buf)

Private Members

image::config image_config
blob::config target_config
image::extractor image_extractor
image::transformer image_transformer
image::loader image_loader
image::param_factory image_factory
blob::extractor target_extractor
blob::loader target_loader
class loader
#include <etl_image.hpp>

Inherits from nervana::interface::loader< image::decoded >

Public Functions

loader(const image::config &cfg)
virtual ~loader()
virtual void load(const std::vector<void *>&, std::shared_ptr<image::decoded>)

Private Functions

void split(cv::Mat&, char *)

Private Members

bool channel_major
bool fixed_aspect_ratio
shape_type stype
uint32_t channels
class loader
#include <etl_label.hpp>

Inherits from nervana::interface::loader< label::decoded >

Public Functions

loader(const label::config &cfg)
virtual ~loader()
void load(const std::vector<void *> &buflist, std::shared_ptr<label::decoded> mp)

Private Members

const label::config &_cfg
class loader
#include <etl_label_map.hpp>

Inherits from nervana::interface::loader< label_map::decoded >

Public Functions

loader(const label_map::config &cfg)
virtual ~loader()
virtual void load(const std::vector<void *>&, std::shared_ptr<label_map::decoded>)

Private Members

int max_label_count
class loader
#include <etl_audio.hpp>

Inherits from nervana::interface::loader< audio::decoded >

Public Functions

loader(const audio::config &cfg)
virtual ~loader()
virtual void load(const std::vector<void *>&, std::shared_ptr<audio::decoded>)

Private Members

const audio::config &_cfg
class loader
#include <etl_localization.hpp>

Inherits from nervana::interface::loader< localization::decoded >

Public Functions

loader(const localization::config &cfg)
virtual ~loader()
void load(const std::vector<void *> &buf_list, std::shared_ptr<localization::decoded> mp)

Private Functions

loader()

Private Members

int total_anchors
size_t max_gt_boxes
std::vector<shape_type> shape_type_list
class loader
#include <etl_video.hpp>

Inherits from nervana::interface::loader< image::decoded >

Public Functions

loader(const video::config &cfg)
virtual ~loader()
virtual void load(const std::vector<void *>&, std::shared_ptr<image::decoded>)

Private Functions

loader()
class loader
#include <etl_blob.hpp>

Inherits from nervana::interface::loader< blob::decoded >

Public Functions

loader(const blob::config &cfg)
virtual ~loader()
void load(const std::vector<void *> &buflist, std::shared_ptr<blob::decoded> mp)
template <typename T>
class loader
#include <interface.hpp>

Public Functions

virtual ~loader()
virtual void load(const std::vector<void *>&, std::shared_ptr<T>) = 0
class loader
#include <etl_boundingbox.hpp>

Inherits from nervana::interface::loader< nervana::boundingbox::decoded >

Public Functions

loader(const boundingbox::config &cfg)
virtual ~loader()
virtual void load(const std::vector<void *>&, std::shared_ptr<boundingbox::decoded>)

Private Members

const size_t max_bbox
class loader
#include <loader.hpp>

Public Functions

loader(const char *cfg_string, PyObject *py_obj_backend)
virtual ~loader()
int start()
void stop()
int reset()
PyObject *shapes()
PyObject *next(int bufIdx)
int itemCount()

Private Functions

void drain()
loader()
loader(const loader&)

Private Members

bool _first
bool _single_thread_mode
std::shared_ptr<nervana::buffer_pool_in> _read_buffers
std::shared_ptr<nervana::buffer_pool_out> _decode_buffers
std::unique_ptr<nervana::read_thread_pool> _read_thread_pool
std::unique_ptr<decode_thread_pool> _decode_thread_pool
std::shared_ptr<nervana::block_loader> _block_loader
std::shared_ptr<nervana::batch_iterator> _batch_iterator
int _batchSize
nlohmann::json _lcfg_json
std::shared_ptr<python_backend> _python_backend
class loader
#include <etl_char_map.hpp>

Inherits from nervana::interface::loader< char_map::decoded >

Public Functions

loader(const char_map::config &cfg)
virtual ~loader()
virtual void load(const std::vector<void *>&, std::shared_ptr<char_map::decoded>)
class loader
#include <etl_depthmap.hpp>

Inherits from nervana::interface::loader< image::decoded >

Public Functions

loader(const image::config &cfg)
virtual ~loader()
virtual void load(const std::vector<void *>&, std::shared_ptr<image::decoded>)

Private Functions

void split(cv::Mat&, char *)

Private Members

const image::config &_cfg
class loader_config
#include <loader.hpp>

Inherits from nervana::interface::config

Public Functions

loader_config(nlohmann::json js)

Public Members

std::string manifest_filename
std::string manifest_root
int minibatch_size
std::string type
std::string cache_directory
int macrobatch_size
float subset_fraction
bool shuffle_every_epoch
bool shuffle_manifest
bool single_thread
int random_seed

Private Functions

loader_config()
bool validate()

Private Members

std::vector<std::shared_ptr<nervana::interface::config_info_interface>> config_list
class log_helper
#include <log.hpp>

Public Functions

log_helper(LOG_TYPE type, const char *file, int line, const char *func)
~log_helper()
std::ostream &stream()

Private Members

std::stringstream _stream
class logger
#include <log.hpp>

Public Static Functions

void set_log_path(const std::string &path)
void start()
void stop()

Private Static Functions

void log_item(const std::string &s)
void process_event(const std::string &s)
void thread_entry(void *param)

Private Static Attributes

string log_path
deque<string> queue

Friends

friend nervana::logger::log_helper
class manifest
#include <manifest.hpp>

Subclassed by nervana::manifest_csv, nervana::manifest_nds

Public Functions

virtual std::string cache_id() = 0
virtual std::string version() = 0
class manifest_csv
#include <manifest_csv.hpp>

Inherits from nervana::manifest

Public Types

typedef std::vector<std::string> FilenameList
typedef std::vector<FilenameList>::const_iterator iter

Public Functions

manifest_csv(const std::string &filename, bool shuffle, const std::string &root = "", float subset_fraction = 1.0)
virtual string cache_id()
virtual string version()
size_t objectCount() const
int nelements()
iter begin() const
iter end() const
void generate_subset(float subset_fraction)
uint32_t get_crc()

Protected Functions

void parse_stream(std::istream &is, const std::string &root)
void shuffle_filename_lists()

Private Members

const std::string _filename
std::vector<FilenameList> _filename_lists
CryptoPP::CRC32C crc_engine
bool crc_computed
uint32_t computed_crc
class manifest_nds
#include <manifest_nds.hpp>

Inherits from nervana::manifest

Public Functions

manifest_nds(const std::string &filename)
~manifest_nds()
virtual string cache_id()
virtual std::string version()

Public Members

std::string baseurl
std::string token
int collection_id

Public Static Functions

bool is_likely_json(const std::string filename)
class memory_stream
#include <util.hpp>

Inherits from istream

Public Functions

memory_stream(char *data, size_t size)

Private Members

memstream<char> wrapper
template <typename CharT, typename TraitsT = std::char_traits<CharT>>
class memstream
#include <util.hpp>

Inherits from std::basic_streambuf< CharT, TraitsT >

Public Functions

memstream(CharT *data, size_t size)
std::ios::pos_type seekoff(std::ios::off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which)
std::ios::pos_type seekpos(std::ios::pos_type pos, std::ios_base::openmode which)
class MotionJpegCapture
#include <cap_mjpeg_decoder.hpp>

Public Functions

MotionJpegCapture(const std::string&)
MotionJpegCapture(char *buffer, size_t size)
virtual ~MotionJpegCapture()
virtual double getProperty(int property) const
virtual bool setProperty(int property, double value)
virtual bool grabFrame()
virtual bool retrieveFrame(int, cv::Mat &output_frame)
virtual bool isOpened() const
virtual int getCaptureDomain()
bool open()
void close()

Protected Functions

bool parseRiff(std::istream &in_str)
uint64_t getFramePos() const
std::vector<char> readFrame(frame_iterator it)

Protected Attributes

std::shared_ptr<std::istream> m_file_stream
bool m_is_first_frame
frame_list m_mjpeg_frames
frame_iterator m_frame_iterator
cv::Mat m_current_frame
uint32_t m_frame_width
uint32_t m_frame_height
double m_fps
class noise_clips
#include <noise_clips.hpp>

Public Functions

noise_clips(const std::string noiseIndexFile, const std::string noiseRoot)
virtual ~noise_clips()
void addNoise(cv::Mat &wav_mat, bool add_noise, uint32_t noise_index, float noise_offset_fraction, float noise_level)

Add noise to a sound waveform.

Private Functions

void load_index(const std::string &index_file, const std::string &root_dir)
void load_data()
void read_noise(std::string &noise_file, int *dataLen)

Private Members

std::vector<cv::Mat> _noise_data
std::vector<std::string> _noise_files
char *_buf
int _bufLen
class output_type
#include <typemap.hpp>

Public Functions

output_type()
output_type(const std::string &r)
bool valid() const

Public Members

std::string tp_name
int np_type
int cv_type
size_t size

Public Static Functions

static bool is_valid_type(const std::string &s)
class param_factory
#include <etl_image.hpp>

Inherits from nervana::interface::param_factory< image::decoded, image::params >

Public Functions

param_factory(image::config &cfg)
virtual ~param_factory()
shared_ptr<image::params> make_params(std::shared_ptr<const image::decoded> input)

Private Members

image::config &_cfg
std::default_random_engine _dre
class param_factory
#include <etl_audio.hpp>

Inherits from nervana::interface::param_factory< audio::decoded, audio::params >

Public Functions

param_factory(audio::config &cfg)
virtual ~param_factory()
shared_ptr<audio::params> make_params(std::shared_ptr<const audio::decoded> input)

Private Members

audio::config &_cfg
std::default_random_engine _dre
template <typename T, typename S>
class param_factory
#include <interface.hpp>

Public Functions

virtual ~param_factory()
virtual std::shared_ptr<S> make_params(std::shared_ptr<const T>) = 0
class params
#include <etl_audio.hpp>

Inherits from nervana::interface::params

Public Functions

void dump(std::ostream& = std::cout)

Public Members

bool add_noise
uint32_t noise_index
float noise_level
float noise_offset_fraction
float time_scale_fraction

Private Functions

params()

Friends

friend nervana::audio::params::audio::param_factory
class params
#include <etl_image.hpp>

Inherits from nervana::interface::params

Public Functions

void dump(std::ostream& = std::cout)

Public Members

cv::Rect cropbox
cv::Size2i output_size
int angle
bool flip
std::vector<float> lighting
float color_noise_std
float contrast
float brightness
float saturation
int hue
bool debug_deterministic

Private Functions

params()

Friends

friend nervana::image::params::image::param_factory
class params
#include <etl_label_map.hpp>

Inherits from nervana::interface::params

Public Functions

params()
class params
#include <interface.hpp>

Subclassed by nervana::audio::params, nervana::image::params, nervana::label_map::params

Public Functions

virtual ~params()
class photometric
#include <image.hpp>

Public Functions

photometric()

Public Static Functions

void lighting(cv::Mat &inout, std::vector<float>, float color_noise_std)
void cbsjitter(cv::Mat &inout, float contrast, float brightness, float saturation, int hue = 0)

Public Static Attributes

const float _CPCA
const cv::Mat CPCA
const cv::Mat CSTD
class provider_factory
#include <provider_factory.hpp>

Public Functions

virtual ~provider_factory()

Public Static Functions

std::shared_ptr<nervana::provider_interface> create(nlohmann::json configJs)
class provider_interface
#include <provider_interface.hpp>

Subclassed by nervana::audio_classifier, nervana::audio_only, nervana::audio_transcriber, nervana::image_boundingbox, nervana::image_classifier, nervana::image_localization, nervana::image_only, nervana::image_pixelmask, nervana::image_stereo_blob, nervana::video_classifier, nervana::video_only

Public Functions

virtual void provide(int idx, buffer_in_array &in_buf, buffer_out_array &out_buf) = 0
virtual void post_process(buffer_out_array &out_buf)
virtual const std::vector<nervana::shape_type> &get_oshapes()

Public Members

uint32_t num_inputs

Protected Attributes

std::vector<nervana::shape_type> oshapes
class python_backend
#include <python_backend.hpp>

Public Functions

python_backend(PyObject *py_obj_backend)
~python_backend()
void setup_buffers(const std::vector<nervana::shape_type> &oshape_types, int batchSize)
void clear_buffers()
bool use_pinned_memory()
void call_backend_transfer(nervana::buffer_out_array &outBuf, int bufIdx)
PyObject *get_host_tuple(int bufIdx)
PyObject *get_shapes()

Public Members

std::vector<nervana::shape_type> _oshape_types
int _batchSize

Private Functions

python_backend()
PyObject *initPyList(int length = 2)
void wrap_buffer_pool(PyObject *list, nervana::buffer_out *buf, int bufIdx, const nervana::shape_type &shape_type)

Private Members

PyObject *_py_obj_backend
std::vector<PyObject *> _host_lists
std::vector<PyObject *> _dev_lists
PyObject *_f_consume
class read_thread_pool
#include <loader.hpp>

Inherits from nervana::thread_pool

Public Functions

read_thread_pool(const std::shared_ptr<nervana::buffer_pool_in> &out, const std::shared_ptr<nervana::batch_iterator> &batch_iterator)

Protected Functions

virtual void work(int id)

Private Functions

read_thread_pool()
read_thread_pool(const read_thread_pool&)

Private Members

std::shared_ptr<nervana::buffer_pool_in> _out
std::shared_ptr<nervana::batch_iterator> _batch_iterator
class reader
#include <cpio.hpp>

Subclassed by nervana::cpio::file_reader

Public Functions

reader()
reader(std::istream *is)
void read(nervana::buffer_in &dest)
void read(std::vector<char> &dest)
int itemCount()

Protected Functions

void readHeader()

Protected Attributes

std::istream *_is
header _header
trailer _trailer
record_header _recordHeader
class record_header
#include <cpio.hpp>

Public Functions

record_header()
void loadDoubleShort(uint32_t *dst, uint16_t src[2])
void saveDoubleShort(uint16_t *dst, uint32_t src)
void read(std::istream &ifs, uint32_t *fileSize)
void write(std::ostream &ofs, uint32_t fileSize, const char *fileName)

Public Members

uint16_t _magic
uint16_t _dev
uint16_t _ino
uint16_t _mode
uint16_t _uid
uint16_t _gid
uint16_t _nlink
uint16_t _rdev
uint16_t _mtime[2]
uint16_t _namesize
uint16_t _filesize[2]
struct RiffChunk
#include <avi.hpp>

Public Members

uint32_t m_four_cc
uint32_t m_size
struct RiffList
#include <avi.hpp>

Public Members

uint32_t m_riff_or_list_cc
uint32_t m_size
uint32_t m_list_type_cc
struct RiffMainHeader
#include <wav_data.hpp>

Public Members

uint32_t dwRiffCC
uint32_t dwRiffLen
uint32_t dwWaveID
class shape_type
#include <typemap.hpp>

Public Functions

shape_type(const std::vector<size_t> &shape, const output_type &otype, const bool flatten = false)
size_t get_element_count() const
size_t get_byte_size() const
const std::vector<size_t> &get_shape() const
const output_type &get_otype() const
bool flatten_all_dims() const

Private Members

std::vector<size_t> _shape
output_type _otype
size_t _byte_size
bool _flatten_with_batch_size
class signal_generator
#include <wav_data.hpp>

Subclassed by nervana::sinewave_generator

Public Functions

virtual ~signal_generator()
virtual int16_t operator()(float t) const = 0
class sinewave_generator
#include <wav_data.hpp>

Inherits from nervana::signal_generator

Public Functions

sinewave_generator(float frequency, int16_t amplitude = INT16_MAX)
virtual int16_t operator()(float t) const

Private Members

float frequency
int16_t amplitude
class specgram
#include <specgram.hpp>

Public Functions

specgram()
virtual ~specgram()

Public Static Functions

void wav_to_specgram(const cv::Mat &wav_mat, const int frame_length_tn, const int frame_stride_tn, const int max_time_steps, const cv::Mat &window, cv::Mat &specgram)
void specgram_to_cepsgram(const cv::Mat &specgram, const cv::Mat &filter_bank, cv::Mat &cepsgram)
void cepsgram_to_mfcc(const cv::Mat &cepsgram, const int num_cepstra, cv::Mat &mfcc)
void create_window(const std::string &window_type, const int n, cv::Mat &win)
void create_filterbanks(const int num_filters, const int fftsz, const int sample_freq_hz, cv::Mat &fbank)

Create an array of frequency weights to convert from linear frequencies to mel-frequencies. For reference, see: http://practicalcryptography.com/miscellaneous/machine-learning/guide-mel-frequency-cepstral-coefficients-mfccs/#computing-the-mel-filterbank.

Private Static Functions

static double hz_to_mel(double freq_hz)
static double mel_to_hz(double freq_mel)
class target
#include <etl_localization.hpp>

Public Functions

target()
target(float x, float y, float w, float h)

Public Members

float dx
float dy
float dw
float dh
class thread_pool
#include <thread_pool.hpp>

Subclassed by nervana::decode_thread_pool, nervana::read_thread_pool

Public Functions

thread_pool(int count)
virtual ~thread_pool()
virtual void start()
virtual void stop()
bool stopped()
void join()

Protected Functions

virtual void work(int id) = 0
virtual void run(int id)

Protected Attributes

int _count
std::vector<std::thread *> _threads
bool _done
bool *_stopped
class thread_starter

Public Functions

thread_starter()
virtual ~thread_starter()
class trailer
#include <cpio.hpp>

Public Functions

trailer()
void write(std::ostream &ofs)
void read(std::istream &ifs)

Private Members

uint32_t _unused[4]
class transformer
#include <etl_audio.hpp>

Inherits from nervana::interface::transformer< audio::decoded, audio::params >

Public Functions

transformer(const audio::config &config)
virtual ~transformer()
std::shared_ptr<audio::decoded> transform(std::shared_ptr<audio::params> params, std::shared_ptr<audio::decoded> decoded)

Transform the raw sound waveform into the desired feature space, possibly after adding noise.

The transformation pipeline is as follows:

  1. Optionally add noise (controlled by add_noise parameter)
  2. Convert to spectrogram
  3. Optionally convert to MFSC (controlled by feature_type parameter)
  4. Optionally convert to MFCC (controlled by feature_type parameter)
  5. Optionally time-warp (controlled by time_scale_fraction)

Private Functions

transformer()
void scale_time(cv::Mat &img, float scale_fraction)

Private Members

std::shared_ptr<noise_clips> _noisemaker
const audio::config &_cfg
cv::Mat _window
cv::Mat _filterbank
class transformer
#include <etl_image.hpp>

Inherits from nervana::interface::transformer< image::decoded, image::params >

Public Functions

transformer(const image::config&)
virtual ~transformer()
virtual shared_ptr<image::decoded> transform(std::shared_ptr<image::params>, std::shared_ptr<image::decoded>)
cv::Mat transform_single_image(std::shared_ptr<image::params>, cv::Mat&)

Private Members

image::photometric photo
class transformer
#include <etl_boundingbox.hpp>

Inherits from nervana::interface::transformer< nervana::boundingbox::decoded, nervana::image::params >

Public Functions

transformer(const boundingbox::config&)
virtual ~transformer()
virtual shared_ptr<boundingbox::decoded> transform(std::shared_ptr<image::params>, std::shared_ptr<boundingbox::decoded>)

Public Static Functions

vector<boundingbox::box> transform_box(const std::vector<boundingbox::box> &b, const cv::Rect &crop, bool flip, float x_scale, float y_scale)
class transformer
#include <etl_multicrop.hpp>

Inherits from nervana::interface::transformer< image::decoded, image::params >

Public Functions

transformer(const multicrop::config &cfg)
virtual ~transformer()
virtual shared_ptr<image::decoded> transform(std::shared_ptr<image::params>, std::shared_ptr<image::decoded>)

Private Members

image::transformer _crop_transformer
std::vector<float> _crop_scales
std::vector<bool> _orientations
std::vector<cv::Point2f> _offsets
class transformer
#include <etl_depthmap.hpp>

Inherits from nervana::interface::transformer< image::decoded, image::params >

Public Functions

transformer(const image::config &config)
virtual ~transformer()
std::shared_ptr<image::decoded> transform(std::shared_ptr<image::params> txs, std::shared_ptr<image::decoded> mp)
class transformer
#include <etl_pixel_mask.hpp>

Inherits from nervana::interface::transformer< image::decoded, image::params >

Public Functions

transformer(const image::config &config)
virtual ~transformer()
std::shared_ptr<image::decoded> transform(std::shared_ptr<image::params> txs, std::shared_ptr<image::decoded> mp)
class transformer
#include <etl_video.hpp>

Inherits from nervana::interface::transformer< image::decoded, image::params >

Public Functions

transformer(const video::config &config)
virtual ~transformer()
virtual std::shared_ptr<image::decoded> transform(std::shared_ptr<image::params> img_xform, std::shared_ptr<image::decoded> img)

Protected Functions

transformer()

Protected Attributes

image::transformer frame_transformer
uint32_t max_frame_count
template <typename T, typename S>
class transformer
#include <interface.hpp>

Public Functions

virtual ~transformer()
virtual std::shared_ptr<T> transform(std::shared_ptr<S>, std::shared_ptr<T>) = 0
class transformer
#include <etl_localization.hpp>

Inherits from nervana::interface::transformer< localization::decoded, image::params >

Public Functions

transformer(const localization::config &_cfg)
virtual ~transformer()
shared_ptr<localization::decoded> transform(std::shared_ptr<image::params> txs, std::shared_ptr<localization::decoded> mp)

Private Functions

transformer()
cv::Mat bbox_overlaps(const std::vector<box> &boxes, const std::vector<boundingbox::box> &query_boxes)
vector<int> sample_anchors(const std::vector<int> &labels, bool debug = false)

Private Members

const localization::config &cfg
std::minstd_rand0 random
const std::vector<box> all_anchors

Private Static Functions

vector<localization::target> compute_targets(const std::vector<box> &gt_bb, const std::vector<box> &anchors)
class transformer
#include <etl_label_map.hpp>

Inherits from nervana::interface::transformer< label_map::decoded, label_map::params >

Public Functions

transformer()
virtual ~transformer()
virtual std::shared_ptr<label_map::decoded> transform(std::shared_ptr<label_map::params>, std::shared_ptr<label_map::decoded>)
class video_classifier
#include <provider_video_classifier.hpp>

Inherits from nervana::provider_interface

Public Functions

video_classifier(nlohmann::json js)
virtual void provide(int idx, buffer_in_array &in_buf, buffer_out_array &out_buf)

Private Members

video::config video_config
video::extractor video_extractor
video::transformer video_transformer
video::loader video_loader
image::param_factory frame_factory
label::config label_config
label::extractor label_extractor
label::loader label_loader
class video_only
#include <provider_video_only.hpp>

Inherits from nervana::provider_interface

Public Functions

video_only(nlohmann::json js)
virtual void provide(int idx, buffer_in_array &in_buf, buffer_out_array &out_buf)

Private Members

video::config video_config
video::extractor video_extractor
video::transformer video_transformer
video::loader video_loader
image::param_factory frame_factory
class wav_data
#include <wav_data.hpp>

Public Functions

wav_data(const signal_generator &sigptr, int duration_ss, int rate, bool is_stereo)
wav_data(const char *buf, uint32_t bufsize)
void dump(std::ostream &ostr = std::cout)
void write_to_file(std::string filename)
void write_to_buffer(char *buf, uint32_t bufsize)
cv::Mat &get_data()
char **get_raw_data()
uint32_t nbytes()
uint32_t nsamples()
int32_t sample_rate()

Public Static Attributes

constexpr size_t HEADER_SIZE
constexpr int WAVE_FORMAT_PCM
constexpr int WAVE_FORMAT_IEEE_FLOAT
constexpr int WAVE_FORMAT_EXTENSIBLE

Private Functions

void wav_assert(bool cond, const std::string &msg)
void write_header(char *buf, uint32_t bufsize)
void write_data(char *buf, uint32_t bufsize)

Private Members

cv::Mat data
int32_t _sample_rate
class wavefile_exception
#include <wav_data.hpp>

Inherits from runtime_error

Public Functions

wavefile_exception(const std::string &msg)
namespace CryptoPP

Typedefs

typedef uint32_t word32
typedef uint8_t byte

Functions

void ThrowIfInvalidTruncatedSize(size_t size)
template <typename T>
bool IsAligned(const byte *v)

Variables

const word32 CRC32_NEGL
namespace cv
namespace nervana

Typedefs

typedef std::vector<size_t> shape_t

Enums

enum LOG_TYPE

Values:

_LOG_TYPE_ERROR
_LOG_TYPE_WARNING
_LOG_TYPE_INFO
enum endian

Values:

LITTLE
BIG

Functions

int CV_FOURCC(char c1, char c2, char c3, char c4)
string fourccToString(uint32_t fourcc)
template <typename T>
void read_single_value(istream &ifs, T *data)
void readPadding(istream &ifs, uint32_t length)
template <typename T>
void write_single_value(ostream &ofs, T *data)
void writePadding(ostream &ofs, uint32_t length)
std::string dump_default(const std::string &s)
std::string dump_default(int v)
std::string dump_default(uint32_t v)
std::string dump_default(size_t v)
std::string dump_default(float v)
std::string dump_default(const std::vector<float> &v)
std::string dump_default(const std::vector<std::string> &v)
std::string dump_default(const std::uniform_real_distribution<float> &v)
std::string dump_default(const std::uniform_int_distribution<int> &v)
std::string dump_default(const std::normal_distribution<float> &v)
std::string dump_default(const std::bernoulli_distribution &v)
template <class T>
std::string type_name()
constexpr const char *find_last(conststring s, size_t offset, char ch)
constexpr const char *find_last(conststring s, char ch)
constexpr const char *get_file_name(conststring s)
template <typename T>
T unpack(const char *data, int offset = 0, endian e = endian::LITTLE)
template <typename T>
void pack(char *data, T value, int offset = 0, endian e = endian::LITTLE)
template <typename T>
std::string join(const T &v, const std::string &sep)
void dump(std::ostream &out, const void *, size_t)
std::string to_lower(const std::string &s)
std::vector<std::string> split(const std::string &s, char delimiter)
size_t unbiased_round(float f)
int LevenshteinDistance(const std::string &s1, const std::string &s2)
void affirm(bool cond, const std::string &msg)
void set_global_random_seed(uint32_t newval)
uint32_t get_global_random_seed()
cv::Mat read_audio_from_mem(const char *item, int itemSize)
constexpr uint32_t FOURCC(char a, char b, char c, char d)

Variables

const uint32_t RIFF_CC
const uint32_t LIST_CC
const uint32_t HDRL_CC
const uint32_t AVIH_CC
const uint32_t STRL_CC
const uint32_t STRH_CC
const uint32_t VIDS_CC
const uint32_t MJPG_CC
const uint32_t MOVI_CC
const uint32_t IDX1_CC
const uint32_t AVI_CC
const uint32_t AVIX_CC
const uint32_t JUNK_CC
const uint32_t INFO_CC
const std::map<std::string, std::tuple<int, int, size_t>> all_outputs
uint32_t global_random_seed
namespace audio
namespace blob
namespace boundingbox
namespace char_map
namespace cpio
namespace depthmap
namespace image

Functions

void resize(const cv::Mat &input, cv::Mat &output, const cv::Size2i &size, bool interpolate = true)
void rotate(const cv::Mat &input, cv::Mat &output, int angle, bool interpolate = true, const cv::Scalar &border = cv::Scalar())
void convert_mix_channels(std::vector<cv::Mat> &source, std::vector<cv::Mat> &target, std::vector<int> &from_to)
float calculate_scale(const cv::Size &size, int output_width, int output_height)
cv::Size2f cropbox_max_proportional(const cv::Size2f &in_size, const cv::Size2f &out_size)
cv::Size2f cropbox_linear_scale(const cv::Size2f &in_size, float scale)
cv::Size2f cropbox_area_scale(const cv::Size2f &in_size, const cv::Size2f &cropbox_size, float scale)
cv::Point2f cropbox_shift(const cv::Size2f &in_size, const cv::Size2f &crop_box, float xoff, float yoff)
namespace interface
namespace label
namespace label_map
namespace localization
namespace multicrop
namespace pixel_mask
namespace video
namespace nlohmann
namespace std
file api.cpp
#include “api.hpp”#include <algorithm>#include <array>#include <cassert>#include <cerrno>#include <ciso646>#include <cmath>#include <cstddef>#include <cstdio>#include <cstdlib>#include <functional>#include <initializer_list>#include <iomanip>#include <iostream>#include <iterator>#include <limits>#include <map>#include <memory>#include <sstream>#include <stdexcept>#include <string>#include <type_traits>#include <utility>#include <vector>

Functions

const char *get_error_message()
void *start(const char *loaderConfigString, PyObject *pbackend)
int error()
PyObject *next(loader *data_loader, int bufIdx)
PyObject *shapes(loader *data_loader)
int itemCount(loader *data_loader)
int reset(loader *data_loader)
int stop(loader *data_loader)
file api.hpp
#include “cpio.hpp”#include “loader.hpp”

Functions

const char *get_error_message()
int error()
void *start(const char *loaderConfigString, PyObject *pbackend)
PyObject *next(nervana::loader *data_loader, int bufIdx)
int reset(nervana::loader *data_loader)
int stop(nervana::loader *data_loader)
int itemCount(nervana::loader *data_loader)
PyObject *shapes(nervana::loader *data_loader)

Variables

std::string last_error_message
file avi.cpp
#include “avi.hpp”

Functions

std::istream &operator>>(std::istream &is, nervana::AviMainHeader &avih)
std::istream &operator>>(std::istream &is, nervana::AviStreamHeader &strh)
std::istream &operator>>(std::istream &is, nervana::BitmapInfoHeader &bmph)
std::istream &operator>>(std::istream &is, nervana::RiffList &riff_list)
std::istream &operator>>(std::istream &is, nervana::RiffChunk &riff_chunk)
std::istream &operator>>(std::istream &is, nervana::AviIndex &idx1)
file avi.hpp
#include <deque>#include <string>#include <fstream>#include <sstream>#include <cinttypes>#include “util.hpp”

Defines

CV_FOURCC_MACRO(c1, c2, c3, c4)

Typedefs

typedef std::deque<std::pair<uint64_t, uint32_t>> frame_list
typedef frame_list::iterator frame_iterator

Functions

std::istream &operator>>(std::istream &is, nervana::AviMainHeader &avih)
std::istream &operator>>(std::istream &is, nervana::AviStreamHeader &strh)
std::istream &operator>>(std::istream &is, nervana::BitmapInfoHeader &bmph)
std::istream &operator>>(std::istream &is, nervana::RiffList &riff_list)
std::istream &operator>>(std::istream &is, nervana::RiffChunk &riff_chunk)
std::istream &operator>>(std::istream &is, nervana::AviIndex &idx1)
file batch_iterator.cpp
#include “batch_iterator.hpp”
file batch_iterator.hpp
#include <memory>#include “buffer_in.hpp”#include “block_iterator.hpp”
file block_iterator.hpp
#include “buffer_in.hpp”
file block_iterator_sequential.cpp
#include “block_iterator_sequential.hpp”
file block_iterator_sequential.hpp
#include “block_loader.hpp”#include “block_iterator.hpp”
file block_iterator_shuffled.cpp
#include <vector>#include <algorithm>#include <random>#include “util.hpp”#include “block_iterator_shuffled.hpp”
file block_iterator_shuffled.hpp
#include <random>#include “block_loader.hpp”#include “block_iterator.hpp”
file block_loader.cpp
#include <math.h>#include <sstream>#include “block_loader.hpp”#include “util.hpp”
file block_loader.hpp
#include <random>#include “buffer_in.hpp”
file block_loader_cpio_cache.cpp
#include <errno.h>#include <dirent.h>#include <stdlib.h>#include <stdio.h>#include “cpio.hpp”#include “block_loader_cpio_cache.hpp”#include “file_util.hpp”
file block_loader_cpio_cache.hpp
#include <string>#include “block_loader_file.hpp”
file block_loader_file.cpp
#include <sstream>#include <fstream>#include <iomanip>#include <unistd.h>#include “block_loader_file.hpp”#include “util.hpp”#include “file_util.hpp”
file block_loader_file.hpp
#include “manifest_csv.hpp”#include “buffer_in.hpp”#include “block_loader.hpp”#include “util.hpp”
file block_loader_nds.cpp
#include <curl/curl.h>#include <curl/easy.h>#include <curl/curlbuild.h>#include “json.hpp”#include “block_loader_nds.hpp”#include “interface.hpp”

Functions

size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
file block_loader_nds.hpp
#include <sstream>#include <string>#include “buffer_in.hpp”#include “cpio.hpp”#include “block_loader.hpp”#include “util.hpp”
file box.cpp
#include “box.hpp”

Functions

ostream &operator<<(ostream &out, const nervana::box &b)
ostream &operator<<(ostream &out, const vector<nervana::box> &list)
file box.hpp
#include <ostream>#include <opencv2/core/core.hpp>

Functions

std::ostream &operator<<(std::ostream &out, const nervana::box &b)
std::ostream &operator<<(std::ostream &out, const std::vector<nervana::box> &list)
file buffer_in.cpp
#include <random>#include <algorithm>#include <vector>#include <thread>#include <mutex>#include <condition_variable>#include <fstream>#include “buffer_in.hpp”
file buffer_in.hpp
#include <vector>#include <thread>#include <mutex>#include <condition_variable>#include <cstring>#include <iostream>#include <map>
file buffer_out.cpp
#include <random>#include <algorithm>#include <vector>#include <thread>#include <mutex>#include <condition_variable>#include <fstream>#include “buffer_out.hpp”
file buffer_out.hpp
#include <vector>#include <cstring>#include <initializer_list>
file buffer_pool.cpp
#include “buffer_pool.hpp”
file buffer_pool.hpp
#include <vector>
file buffer_pool_in.cpp
#include <random>#include <algorithm>#include <vector>#include <thread>#include <mutex>#include <condition_variable>#include <fstream>#include “buffer_pool_in.hpp”#include “util.hpp”
file buffer_pool_in.hpp
#include <vector>#include <mutex>#include <condition_variable>#include <cstring>#include “buffer_pool.hpp”#include “buffer_in.hpp”
file buffer_pool_out.cpp
#include <random>#include <algorithm>#include <vector>#include <thread>#include <mutex>#include <condition_variable>#include <fstream>#include “buffer_pool_out.hpp”#include “util.hpp”
file buffer_pool_out.hpp
#include <vector>#include <mutex>#include <condition_variable>#include <cstring>#include “buffer_pool.hpp”#include “buffer_out.hpp”
file cap_mjpeg_decoder.cpp
#include “cap_mjpeg_decoder.hpp”#include “avi.hpp”#include “log.hpp”
file cap_mjpeg_decoder.hpp
#include <cinttypes>#include <string>#include <sstream>#include <vector>#include <deque>#include <fstream>#include <memory>#include <opencv2/core/core.hpp>#include <opencv2/imgproc/imgproc.hpp>#include <opencv2/highgui/highgui.hpp>#include “opencv2/imgproc/imgproc_c.h”#include <opencv2/highgui/highgui_c.h>#include “util.hpp”#include “avi.hpp”
file cpio.cpp
#include “cpio.hpp”#include “util.hpp”
file cpio.hpp
#include <time.h>#include <iostream>#include <fstream>#include <string>#include <vector>#include <memory>#include <algorithm>#include <cassert>#include <cstring>#include <sstream>#include “buffer_in.hpp”

Defines

FORMAT_VERSION
WRITER_VERSION
MAGIC_STRING
file crc.cpp
#include “crc.hpp”
file crc.hpp
#include <cinttypes>#include <cstdio>#include <string>

Classes for CRC-32 and CRC-32C checksum algorithm.

Defines

CRYPTOPP_CONSTEXPR
CRYPTOPP_CONSTANT(a)
IS_LITTLE_ENDIAN
CRC32_INDEX(c)
CRC32_SHIFTED(c)
file etl_audio.cpp
#include “etl_audio.hpp”
file etl_audio.hpp
#include <vector>#include <chrono>#include “interface.hpp”#include “specgram.hpp”#include “util.hpp”#include “noise_clips.hpp”
file etl_blob.hpp
#include <sstream>#include “interface.hpp”#include “util.hpp”
file etl_boundingbox.cpp
#include <sstream>#include “etl_boundingbox.hpp”#include “log.hpp”

Functions

ostream &operator<<(ostream &out, const boundingbox::box &b)
file etl_boundingbox.hpp
#include <string>#include <unordered_map>#include “interface.hpp”#include “etl_image.hpp”#include “json.hpp”#include “box.hpp”

Functions

std::ostream &operator<<(std::ostream&, const nervana::boundingbox::box&)
file etl_char_map.cpp
#include “etl_char_map.hpp”
file etl_char_map.hpp
#include <string>#include <vector>#include <istream>#include <unordered_map>#include <cstdint>#include “interface.hpp”
file etl_depthmap.cpp
#include “etl_depthmap.hpp”
file etl_depthmap.hpp
#include “interface.hpp”#include “etl_image.hpp”#include “util.hpp”
file etl_image.cpp
#include “etl_image.hpp”
file etl_image.hpp
#include <opencv2/core/core.hpp>#include <opencv2/imgproc/imgproc.hpp>#include <opencv2/highgui/highgui.hpp>#include <chrono>#include “interface.hpp”#include “image.hpp”#include “util.hpp”
file etl_label.hpp
#include <sstream>#include “interface.hpp”#include “util.hpp”
file etl_label_map.cpp
#include <sstream>#include <iostream>#include “etl_label_map.hpp”
file etl_label_map.hpp
#include <string>#include <vector>#include <istream>#include <unordered_map>#include <opencv2/core/core.hpp>#include “interface.hpp”
file etl_localization.cpp
#include “etl_localization.hpp”#include “box.hpp”
file etl_localization.hpp
#include <vector>#include <tuple>#include <random>#include “interface.hpp”#include “etl_boundingbox.hpp”#include “etl_image.hpp”#include “util.hpp”#include “box.hpp”
file etl_multicrop.cpp
#include <memory>#include <vector>#include “etl_multicrop.hpp”
file etl_multicrop.hpp
#include <opencv2/core/core.hpp>#include <opencv2/imgproc/imgproc.hpp>#include <opencv2/highgui/highgui.hpp>#include “interface.hpp”#include “etl_image.hpp”
file etl_pixel_mask.cpp
#include “etl_pixel_mask.hpp”
file etl_pixel_mask.hpp
#include “interface.hpp”#include “etl_image.hpp”#include “util.hpp”
file etl_video.cpp
#include “etl_video.hpp”#include “log.hpp”
file etl_video.hpp
#include “etl_image.hpp”#include “cap_mjpeg_decoder.hpp”
file file_util.cpp
#include <sys/stat.h>#include <stdexcept>#include <ftw.h>#include <unistd.h>#include <sstream>#include <string.h>#include <vector>#include <fstream>#include <dirent.h>#include <fcntl.h>#include <cassert>#include <sys/time.h>#include <sys/types.h>#include <sys/file.h>#include <iostream>#include “file_util.hpp”

Defines

OPEN_MAX
file file_util.hpp
#include <string>#include <vector>#include <functional>
file image.cpp
#include <iostream>#include “image.hpp”#include “util.hpp”
file image.hpp
#include <tuple>#include <opencv2/core/core.hpp>#include <opencv2/imgproc/imgproc.hpp>
file interface.cpp
#include <iostream>#include <sstream>#include “interface.hpp”#include “util.hpp”
file interface.hpp
#include <memory>#include <vector>#include <numeric>#include <functional>#include <exception>#include <string>#include <sstream>#include <cxxabi.h>#include “typemap.hpp”#include “util.hpp”#include “json.hpp”

Defines

ADD_SCALAR(var, mode, ...)
ADD_IGNORE(var)
ADD_DISTRIBUTION(var, mode, ...)

Variables

int IGNORE_VALUE
file loader.cpp
#include <vector>#include <cstdio>#include <iostream>#include <chrono>#include <utility>#include <algorithm>#include <sox.h>#include “loader.hpp”#include “block_loader_cpio_cache.hpp”#include “block_iterator_sequential.hpp”#include “block_iterator_shuffled.hpp”#include “batch_iterator.hpp”#include “manifest_nds.hpp”#include “block_loader_nds.hpp”
file loader.hpp
#include <vector>#include <cstdio>#include <iostream>#include <chrono>#include <utility>#include <algorithm>#include “python_backend.hpp”#include “thread_pool.hpp”#include “block_loader.hpp”#include “block_iterator.hpp”#include “batch_iterator.hpp”#include “manifest.hpp”#include “provider_factory.hpp”#include “buffer_pool_in.hpp”#include “buffer_pool_out.hpp”#include “util.hpp”
file log.cpp
#include <chrono>#include <iomanip>#include <iostream>#include <ctime>#include <thread>#include <mutex>#include <condition_variable>#include “log.hpp”

Variables

mutex queue_mutex
condition_variable queue_condition
unique_ptr<thread> queue_thread
bool active
nervana::thread_starter _starter
file log.hpp
#include <sstream>#include <stdexcept>#include <deque>

Defines

ERR
WARN
INFO
file manifest.hpp
#include <string>
file manifest_csv.cpp
#include <sys/stat.h>#include <algorithm>#include <iostream>#include <iterator>#include <fstream>#include <string>#include <sstream>#include <iomanip>#include “manifest_csv.hpp”#include “util.hpp”#include “file_util.hpp”
file manifest_csv.hpp
#include <vector>#include <string>#include <random>#include “manifest.hpp”#include “crc.hpp”
file manifest_nds.cpp
#include <fstream>#include <sstream>#include “json.hpp”#include “manifest_nds.hpp”#include “interface.hpp”
file manifest_nds.hpp
#include <string>#include “manifest.hpp”
file noise_clips.cpp
#include <sstream>#include <fstream>#include <sys/stat.h>#include “noise_clips.hpp”#include “file_util.hpp”
file noise_clips.hpp
#include <opencv2/core/core.hpp>#include “util.hpp”
file provider_audio_classifier.cpp
#include “provider_audio_classifier.hpp”
file provider_audio_classifier.hpp
#include “provider_interface.hpp”#include “etl_label.hpp”#include “etl_audio.hpp”
file provider_audio_only.cpp
#include “provider_audio_only.hpp”
file provider_audio_only.hpp
#include “provider_interface.hpp”#include “etl_audio.hpp”
file provider_audio_transcriber.cpp
#include “provider_audio_transcriber.hpp”
file provider_audio_transcriber.hpp
#include “provider_interface.hpp”#include “etl_char_map.hpp”#include “etl_audio.hpp”
file provider_factory.cpp
#include “provider_factory.hpp”#include “provider_image_boundingbox.hpp”#include “provider_image_classifier.hpp”#include “provider_image_localization.hpp”#include “provider_image_only.hpp”#include “provider_image_pixelmask.hpp”#include “provider_audio_classifier.hpp”#include “provider_audio_only.hpp”#include “provider_audio_transcriber.hpp”#include “provider_video_classifier.hpp”#include “provider_video_only.hpp”#include “provider_image_stereo.hpp”#include <sstream>
file provider_factory.hpp
#include <memory>#include “provider_interface.hpp”
file provider_image_boundingbox.cpp
#include “provider_image_boundingbox.hpp”
file provider_image_boundingbox.hpp
#include “provider_interface.hpp”#include “etl_boundingbox.hpp”#include “etl_image.hpp”
file provider_image_classifier.cpp
#include “provider_image_classifier.hpp”
file provider_image_classifier.hpp
#include “provider_interface.hpp”#include “etl_label.hpp”#include “etl_image.hpp”
file provider_image_localization.cpp
#include “provider_image_localization.hpp”
file provider_image_localization.hpp
#include “provider_interface.hpp”#include “etl_image.hpp”#include “etl_localization.hpp”
file provider_image_only.cpp
#include “provider_image_only.hpp”
file provider_image_only.hpp
#include “provider_interface.hpp”#include “etl_image.hpp”
file provider_image_pixelmask.cpp
#include “provider_image_pixelmask.hpp”
file provider_image_pixelmask.hpp
#include “provider_interface.hpp”#include “etl_image.hpp”#include “etl_pixel_mask.hpp”
file provider_image_stereo.cpp
#include “provider_image_stereo.hpp”
file provider_image_stereo.hpp
#include “provider_interface.hpp”#include “etl_image.hpp”#include “etl_blob.hpp”
file provider_interface.hpp
#include <memory>#include “util.hpp”#include “interface.hpp”#include “buffer_in.hpp”#include “buffer_out.hpp”
file provider_video_classifier.cpp
#include “provider_video_classifier.hpp”
file provider_video_classifier.hpp
#include “provider_interface.hpp”#include “etl_label.hpp”#include “etl_video.hpp”
file provider_video_only.cpp
#include “provider_video_only.hpp”
file provider_video_only.hpp
#include “provider_interface.hpp”#include “etl_video.hpp”
file python_backend.cpp
#include “python_backend.hpp”#include <numpy/arrayobject.h>

Defines

NPY_NO_DEPRECATED_API
file python_backend.hpp
#include <map>#include “interface.hpp”#include <Python.h>#include “buffer_in.hpp”#include “util.hpp”#include “buffer_out.hpp”
file specgram.cpp
#include “specgram.hpp”#include “util.hpp”
file specgram.hpp
#include <sstream>#include <math.h>#include <memory>#include <opencv2/core/core.hpp>#include <opencv2/imgproc/imgproc.hpp>#include <cmath>
file test_tiff.cpp
#include <sys/stat.h>#include <sstream>#include <fstream>#include <iostream>#include <string>#include <vector>#include <opencv2/core/core.hpp>#include <opencv2/highgui/highgui.hpp>

Functions

std::vector<char> load_file(const string &filename)
int main(int argc, char **argv)
file thread_pool.hpp
#include <vector>#include <thread>#include <mutex>#include <condition_variable>#include <cstdio>#include <iostream>#include <chrono>#include <utility>#include <algorithm>
file typemap.hpp
#include <map>#include <opencv2/core/core.hpp>#include <Python.h>#include <numpy/ndarraytypes.h>

Defines

NPY_NO_DEPRECATED_API
file util.cpp
#include <algorithm>#include <string>#include <cmath>#include <cassert>#include <iomanip>#include “util.hpp”#include <sox.h>#include “log.hpp”
file util.hpp
#include <iostream>#include <sstream>#include <vector>#include <stdexcept>#include <random>#include <opencv2/core/core.hpp>#include <sox.h>#include <thread>

Defines

BYTEIDX(idx, width, endianess)
DUMP_VALUE(a)
file wav_data.cpp
#include “wav_data.hpp”
file wav_data.hpp
#include <fstream>#include <string>#include <vector>#include <memory>#include <iostream>#include <opencv2/core/core.hpp>#include “util.hpp”
group Required
dir /home/users/alex/Code/aeon/loader
dir /home/users/alex/Code/aeon/loader/src