SMQTKPython 社交媒體查詢工具包
SMQTK (Social Multimedia Query ToolKit) 是一個(gè) Python 工具包,用于基于多媒體的機(jī)器學(xué)習(xí)中可插入式的算法和數(shù)據(jù)結(jié)構(gòu)。
SMQTK 的 API 提供:
-
可伸縮的數(shù)據(jù)結(jié)構(gòu)接口和實(shí)現(xiàn),側(cè)重于機(jī)器學(xué)習(xí)相關(guān)內(nèi)容.
-
機(jī)器學(xué)習(xí)的算法接口和實(shí)現(xiàn)
-
帶算法和數(shù)據(jù)結(jié)構(gòu)支持的高級(jí)應(yīng)用和工具
通過(guò)這些特性,用戶和開發(fā)者可以使用不同的機(jī)器學(xué)習(xí)算法和技術(shù)來(lái)使用不同類型的數(shù)據(jù)。適用場(chǎng)景包括基于語(yǔ)料庫(kù)的媒體搜索來(lái)查找相似內(nèi)容;或者提供基于內(nèi)容的相關(guān)反饋接口。
示例代碼:
import abc from smqtk.representation import SmqtkRepresentation from smqtk.utils.plugin import Pluggable, get_plugins class FooBar (SmqtkRepresentation, Pluggable): """ Some documentation on what this does. """ # Interface methods and/or abstract functionality here. # -> See the abc module on how to decorate abstract methods. @abc.abstractmethod def do_something(self): """ Does Something """ def get_foo_bar_impls(reload_modules=False): import os.path as osp from smqtk.utils.plugin import get_plugins this_dir = osp.abspath(osp.dirname(__file__)) env_var = 'FOO_BAR_PATH' helper_var = 'FOO_BAR_CLASS' return get_plugins(__name__, this_dir, env_var, helper_var, FooBar, reload_modules)
評(píng)論
圖片
表情
