當前位置: 首頁>>代碼示例>>Python>>正文


Python features.Features方法代碼示例

本文整理匯總了Python中features.Features方法的典型用法代碼示例。如果您正苦於以下問題:Python features.Features方法的具體用法?Python features.Features怎麽用?Python features.Features使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在features的用法示例。


在下文中一共展示了features.Features方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: import features [as 別名]
# 或者: from features import Features [as 別名]
def __init__(self):
        # initialise config
        self.config_provider = ConfigProvider()

        # initialise robots
        self.rocky_robot = RockyRobot()
        self.sporty_robot = SportyRobot()

        # initialise webcam
        self.webcam = Webcam()

        # initialise markers
        self.markers = Markers()
        self.markers_cache = None

        # initialise features
        self.features = Features(self.config_provider)

        # initialise texture
        self.texture_background = None 
開發者ID:rdmilligan,項目名稱:SaltwashAR,代碼行數:22,代碼來源:main.py

示例2: __init__

# 需要導入模塊: import features [as 別名]
# 或者: from features import Features [as 別名]
def __init__(self, exchanges, logger, db_prices, db_other, db_client):
        self.exchanges = exchanges
        self.logger = logger
        self.db_prices = db_prices
        self.db_other = db_other
        self.db_client = db_client
        self.db_collections_price = {
            i.get_name(): db_prices[i.get_name()] for i in self.exchanges}

        # Save-later queue.
        self.signals_save_to_db = queue.Queue(0)

        # DataFrame container: data[exchange][symbol][timeframe].
        self.data = {}
        self.init_dataframes(empty=True)

        # Strategy models.
        self.models = self.load_models(self.logger)

        # Signal container: signals[exchange][symbol][timeframe].
        self.signals = {}

        # persistent reference to features library.
        self.feature_ref = Features() 
開發者ID:s-brez,項目名稱:trading-server,代碼行數:26,代碼來源:strategy.py

示例3: hierarchical_segmentation

# 需要導入模塊: import features [as 別名]
# 或者: from features import Features [as 別名]
def hierarchical_segmentation(I, k = 100, feature_mask = features.SimilarityMask(1, 1, 1, 1)):
    F0, n_region = segment.segment_label(I, 0.8, k, 100)
    adj_mat, A0 = _calc_adjacency_matrix(F0, n_region)
    feature_extractor = features.Features(I, F0, n_region)

    # stores list of regions sorted by their similarity
    S = _build_initial_similarity_set(A0, feature_extractor)

    # stores region label and its parent (empty if initial).
    R = {i : () for i in range(n_region)}

    A = [A0]    # stores adjacency relation for each step
    F = [F0]    # stores label image for each step

    # greedy hierarchical grouping loop
    while len(S):
        (s, (i, j)) = S.pop()
        t = feature_extractor.merge(i, j)

        # record merged region (larger region should come first)
        R[t] = (i, j) if feature_extractor.size[j] < feature_extractor.size[i] else (j, i)

        Ak = _new_adjacency_dict(A[-1], i, j, t)
        A.append(Ak)

        S = _merge_similarity_set(feature_extractor, Ak, S, i, j, t)

        F.append(_new_label_image(F[-1], i, j, t))

    # bounding boxes for each hierarchy
    L = feature_extractor.bbox

    return (R, F, L) 
開發者ID:belltailjp,項目名稱:selective_search_py,代碼行數:35,代碼來源:selective_search.py

示例4: setup_method

# 需要導入模塊: import features [as 別名]
# 或者: from features import Features [as 別名]
def setup_method(self, method = None, w = 10, h = 10):
        self.h, self.w = h, w
        image = numpy.zeros((self.h, self.w, 3), dtype=numpy.uint8)
        label = numpy.zeros((self.h, self.w), dtype=int)
        self.f = features.Features(image, label, 1) 
開發者ID:belltailjp,項目名稱:selective_search_py,代碼行數:7,代碼來源:test_features.py


注:本文中的features.Features方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。