|
SOMHunter Core
|
Namespaces | |
| LOGGING_STRINGS | |
| sconfig | |
| tests | |
| utils | |
Classes | |
| class | NotLoggedInEx |
| struct | DebugLogStreamPtrs |
| struct | UsedTools |
| struct | SubmitData |
| struct | FiltersData |
| class | BitmapImage |
| Basic abstraction for images. More... | |
| class | ImageManipulator |
| Provides utilities for image manipulation and processing. More... | |
| class | Http |
| class | Extractor |
| class | NetworkApi |
| Class responsible for listening for HTTP requests and for handlling them using the core. More... | |
| class | FrameFeatures |
| Represents one set of features for the given dataset. More... | |
| class | DatasetFeatures |
| Represents all available feature sets. More... | |
| struct | VideoFrame |
| struct | FrameRange |
| Represents CONTINOUS range of frames. More... | |
| class | FramePointerRange |
| Represents CONTINOUS range of const frame pointers. More... | |
| class | DatasetFrames |
| class | IServerClient |
| Unified interface for all remote evaluation servers. More... | |
| class | ClientDres |
| Specific DRES server implementation. More... | |
| class | EvalServerClient |
| class | TaskTargetHelper |
| Represents a real competition task and for the given timestamp responds with the target. More... | |
| class | Logger |
Class responsible for all the logging for the given user (each user have it's own Logger.) More... | |
| class | WeekDaysFilter |
| Container for information about days filtering. More... | |
| struct | TimeFilter |
| Container for information about time filtering. More... | |
| struct | YearFilter |
| Container for information about time filtering. More... | |
| struct | Filters |
| Container for all the available filters for the rescore. More... | |
| struct | RescoreMetadata |
| struct | RelativeRect |
| class | CanvasSubqueryBase |
| class | CanvasSubqueryBitmap |
| class | CanvasSubqueryText |
| class | CanvasQuery |
| Type representing query related to the canvas (atm text & bitmap) rectangles. More... | |
| struct | TemporalQuery |
| struct | Query |
| The type representing the whole query. More... | |
| struct | BaseBenchmarkQuery |
| struct | PlainTextBenchmarkQuery |
| struct | CanvasBenchmarkQuery |
| class | CanvasQueryRanker |
| class | EmbeddingRanker |
| class | KeywordClipRanker |
| struct | Keyword |
| class | KeywordRanker |
| class | RelocationRanker |
| class | ScoreModel |
| struct | SearchContext |
| Represents exactly one momentary state of a search session. More... | |
| class | UserContext |
| Represents exactly one state of ONE user that uses this core. More... | |
| struct | GetDisplayResult |
Result type get_display returns. More... | |
| struct | RescoreResult |
Result type rescore returns. More... | |
| struct | TestsSettings |
| Config needed by the Submitter instance. More... | |
| struct | PresentationViewsSettings |
| struct | LoggerSettings |
| struct | ApiConfig |
| struct | EvalServerSettings |
| struct | RemoteServicesSettings |
| struct | ModelsSettings |
| struct | DatasetsSettings |
| struct | Settings |
| Parsed current config of the core. More... | |
| class | Somhunter |
| The main C++ API of the SOMHunter Core. More... | |
| class | AsyncSom |
| struct | dist_id |
Typedefs | |
| using | UnixTimestamp = std::int64_t |
| using | LogHash = std::string |
| using | KeywordId = size_t |
| using | KeywordIds = std::vector< KeywordId > |
| using | KwSearchId = std::pair< KeywordId, size_t > |
| using | KwSearchIds = std::vector< KwSearchId > |
| using | KwDescription = std::string |
| using | SynsetId = size_t |
| using | SynsetStrings = std::vector< std::string > |
| using | SynsetIds = std::vector< SynsetId > |
| using | VideoId = unsigned |
| using | FrameNum = unsigned |
| using | ShotId = unsigned |
| using | FrameId = unsigned long |
| using | ScreenImgsCont = std::vector< FrameId > |
| using | FeatureMatrix = std::vector< std::vector< float > > |
| using | FeatureVector = std::vector< float > |
| template<typename T_ = float> | |
| using | StdMatrix = std::vector< std::vector< T_ > > |
| template<typename T_ = float> | |
| using | StdVector = std::vector< T_ > |
| using | LikesCont = std::set< FrameId > |
| using | BookmarksCont = std::set< FrameId > |
| using | ShownFramesCont = std::set< FrameId > |
| using | ScreenVideosCont = std::set< VideoId > |
| using | PageId = unsigned |
| using | Weekday = uint8_t |
| using | Hour = uint8_t |
| using | Year = uint16_t |
| using | LscId = std::string |
| using | ReqCode = std::size_t |
| using | PrimaryFrameFeatures = FrameFeatures< DatasetsSettings::PrimaryFeaturesSettings > |
| using | SecondaryFrameFeatures = FrameFeatures< DatasetsSettings::SecondaryFeaturesSettings > |
| using | VideoFramePointer = const VideoFrame * |
| using | ImageKeywords = KeywordRanker |
| using | RelevanceFeedbackQuery = LikesCont |
| using | TextualQuery = std::string |
| using | RelocationQuery = FrameId |
| using | CanvasSubquery = std::variant< CanvasSubqueryBitmap, CanvasSubqueryText > |
| using | BenchmarkQuery = std::variant< PlainTextBenchmarkQuery > |
Enumerations | |
| enum class | SubmitResult { CORRECT , INCORRECT , NOT_LOGGED_IN } |
| enum class | DisplayType { DNull , DTopKNN , DLoading , DSom , DEmbed , DTopN , DTopNContext , DRand , DVideoDetail , DVideoReplay , DRelocation , NumItems } |
| enum class | RequestType { GET , POST } |
Functions | |
| template<typename T_ > | |
| constexpr T_ | ERR_VAL () |
| Value indicating error/invalid/"NULL" value for the given type. More... | |
| DisplayType | str_to_disp_type (const std::string &type_str) |
| std::string | disp_type_to_str (DisplayType type) |
| constexpr size_t | operator""_z (unsigned long long int x) |
| User defined size literal. More... | |
| void | require_value (const json &json, const std::string &msg="Missing JSON value") |
Makes sure that the given json is defined (not null and not undefined). More... | |
| void | require_key (const json &json, const std::string &key) |
Makes sure that the given json has the given key and the key is not null. More... | |
| template<typename T_ > | |
| T_ | optional_value_or (const json &j, const std::string &key, const T_ &or_val) |
Parses the (potentialy null) value from the given key in JSON structure and if not defined or null uses the or_val value. More... | |
| template<> | |
| std::string | optional_value_or (const json &j, const std::string &key, const std::string &or_val) |
Parses the (potentialy null) value from the given key in JSON structure and if not defined or null uses the or_val value. More... | |
| template<typename T_ > | |
| std::optional< T_ > | optional_value (const json &j, const std::string &key) |
| Parses the (potentialy null) value from the given key in JSON structure. More... | |
| template<> | |
| std::optional< std::string > | optional_value (const json &j, const std::string &key) |
| Parses the (potentialy null or empty) string from the given key in JSON structure. More... | |
| json | wrap_and_parse (std::stringstream &in_stream) |
| std::ostream & | operator<< (std::ofstream &os, CanvasSubqueryBitmap x) |
| std::ostream & | operator<< (std::ofstream &os, CanvasSubqueryText x) |
| template<typename DType > | |
| std::vector< std::vector< DType > > | to_std_matrix (const at::Tensor &tensor_features) |
| template<c10::ScalarType TensorDType_ = at::kFloat, typename OrigDType_ = float> | |
| at::Tensor | to_tensor (std::vector< OrigDType_ > &orig_vec) |
| template<c10::ScalarType TensorDType_ = at::kFloat, typename OrigDType_ = float> | |
| at::Tensor | to_tensor (std::vector< std::vector< OrigDType_ >> &orig_mat) |
| void | fit_SOM (size_t, size_t k, size_t dim, size_t niter, const std::vector< float > &points, std::vector< float > &koho, const std::vector< float > &nhbrdist, const float alphasA[2], const float radiiA[2], const float alphasB[2], const float radiiB[2], const std::vector< float > &scores, const std::vector< bool > &, std::mt19937 &rng) |
| void | map_points_to_kohos (size_t start, size_t end, size_t k, size_t dim, const std::vector< float > &points, const std::vector< float > &koho, std::vector< size_t > &mapping, const std::vector< bool > &present_mask) |
Variables | |
| constexpr int | TOP_N_SELECTED_FRAME_POSITION = 2 |
| constexpr float | RANDOM_DISPLAY_WEIGHT = 3.0f |
| constexpr size_t | SOM_DISPLAY_GRID_WIDTH = 8 |
| SOM window image grid width. More... | |
| constexpr size_t | SOM_DISPLAY_GRID_HEIGHT = 8 |
| SOM window image grid height. More... | |
| constexpr size_t | RELOCATION_GRID_WIDTH = 5 |
| SOM relocation grid width. More... | |
| constexpr size_t | RELOCATION_GRID_HEIGHT = 5 |
| SOM relocation grid height. More... | |
| constexpr int | MAX_TEMPORAL_SIZE = 2 |
| Maximal size of temporal query. More... | |
| using sh::BenchmarkQuery = typedef std::variant<PlainTextBenchmarkQuery> |
| using sh::BookmarksCont = typedef std::set<FrameId> |
| using sh::CanvasSubquery = typedef std::variant<CanvasSubqueryBitmap, CanvasSubqueryText> |
| using sh::FeatureMatrix = typedef std::vector<std::vector<float> > |
| using sh::FeatureVector = typedef std::vector<float> |
| using sh::FrameId = typedef unsigned long |
| using sh::FrameNum = typedef unsigned |
| using sh::Hour = typedef uint8_t |
| using sh::ImageKeywords = typedef KeywordRanker |
| using sh::KeywordId = typedef size_t |
| using sh::KeywordIds = typedef std::vector<KeywordId> |
| using sh::KwDescription = typedef std::string |
| using sh::KwSearchId = typedef std::pair<KeywordId, size_t> |
| using sh::KwSearchIds = typedef std::vector<KwSearchId> |
| using sh::LikesCont = typedef std::set<FrameId> |
| using sh::LogHash = typedef std::string |
| using sh::LscId = typedef std::string |
| using sh::PageId = typedef unsigned |
| using sh::RelevanceFeedbackQuery = typedef LikesCont |
| using sh::RelocationQuery = typedef FrameId |
| using sh::ReqCode = typedef std::size_t |
| using sh::ScreenImgsCont = typedef std::vector<FrameId> |
| using sh::ScreenVideosCont = typedef std::set<VideoId> |
| using sh::SecondaryFrameFeatures = typedef FrameFeatures<DatasetsSettings::SecondaryFeaturesSettings> |
| using sh::ShotId = typedef unsigned |
| using sh::ShownFramesCont = typedef std::set<FrameId> |
| using sh::StdMatrix = typedef std::vector<std::vector<T_> > |
| using sh::StdVector = typedef std::vector<T_> |
| using sh::SynsetId = typedef size_t |
| using sh::SynsetIds = typedef std::vector<SynsetId> |
| using sh::SynsetStrings = typedef std::vector<std::string> |
| using sh::TextualQuery = typedef std::string |
| using sh::UnixTimestamp = typedef std::int64_t |
| using sh::VideoFramePointer = typedef const VideoFrame* |
| using sh::VideoId = typedef unsigned |
| using sh::Weekday = typedef uint8_t |
| using sh::Year = typedef uint16_t |
|
strong |
|
strong |
|
strong |
|
inline |
|
constexpr |
Value indicating error/invalid/"NULL" value for the given type.
| void sh::fit_SOM | ( | size_t | , |
| size_t | k, | ||
| size_t | dim, | ||
| size_t | niter, | ||
| const std::vector< float > & | points, | ||
| std::vector< float > & | koho, | ||
| const std::vector< float > & | nhbrdist, | ||
| const float | alphasA[2], | ||
| const float | radiiA[2], | ||
| const float | alphasB[2], | ||
| const float | radiiB[2], | ||
| const std::vector< float > & | scores, | ||
| const std::vector< bool > & | , | ||
| std::mt19937 & | rng | ||
| ) |
| void sh::map_points_to_kohos | ( | size_t | start, |
| size_t | end, | ||
| size_t | k, | ||
| size_t | dim, | ||
| const std::vector< float > & | points, | ||
| const std::vector< float > & | koho, | ||
| std::vector< size_t > & | mapping, | ||
| const std::vector< bool > & | present_mask | ||
| ) |
|
constexpr |
User defined size literal.
|
inline |
|
inline |
|
inline |
Parses the (potentialy null) value from the given key in JSON structure.
|
inline |
Parses the (potentialy null or empty) string from the given key in JSON structure.
Partial specialization of optional_value.
|
inline |
Parses the (potentialy null) value from the given key in JSON structure and if not defined or null uses the or_val value.
Partial specialization of optional_value_or.
|
inline |
Parses the (potentialy null) value from the given key in JSON structure and if not defined or null uses the or_val value.
|
inline |
Makes sure that the given json has the given key and the key is not null.

|
inline |
Makes sure that the given json is defined (not null and not undefined).
Parses the REQUIRED value of type T_ from the gien key in JSON.
|
inline |
| std::vector<std::vector<DType> > sh::to_std_matrix | ( | const at::Tensor & | tensor_features | ) |
| at::Tensor sh::to_tensor | ( | std::vector< OrigDType_ > & | orig_vec | ) |
| at::Tensor sh::to_tensor | ( | std::vector< std::vector< OrigDType_ >> & | orig_mat | ) |
|
inline |
|
constexpr |
Maximal size of temporal query.
|
constexpr |
|
constexpr |
SOM relocation grid height.
|
constexpr |
SOM relocation grid width.
|
constexpr |
SOM window image grid height.
|
constexpr |
SOM window image grid width.
|
constexpr |