Пример #1
0
    def run(self, args):
        data = dataset.DataSet(args.dataset)
        queryImages = None
        if (args.localize):
            localizeDir = os.path.join(args.dataset, "localize")
            print("Localization - creating tracks: ")
            queryImages = [x for x in os.listdir(localizeDir)]
            [print(os.path.join(localizeDir, str(x))) for x in queryImages]

        else:
            queryImages = data.images()

        start = timer()
        features, colors = tracking.load_features(data, data.images(
        ))  #TODO: Just get those images for which matches have been computed.
        features_end = timer()
        matches = tracking.load_matches(data, data.images(
        ))  #TODO: Just get those images for which matches have been computed.
        matches_end = timer()
        tracks_manager = tracking.create_tracks_manager(
            features, colors, matches, data.config)
        tracks_end = timer()
        data.save_tracks_manager(tracks_manager)
        end = timer()

        with open(data.profile_log(), 'a') as fout:
            fout.write('create_tracks: {0}\n'.format(end - start))

        self.write_report(data, tracks_manager, features_end - start,
                          matches_end - features_end, tracks_end - matches_end)
Пример #2
0
def run_dataset(data):
    """ Link matches pair-wise matches into tracks. """

    start = timer()
    features, colors, segmentations, instances = tracking.load_features(
        data, data.images())
    features_end = timer()
    matches = tracking.load_matches(data, data.images())
    matches_end = timer()
    tracks_manager = tracking.create_tracks_manager(
        features,
        colors,
        segmentations,
        instances,
        matches,
        data.config,
    )
    tracks_end = timer()
    data.save_tracks_manager(tracks_manager)
    write_report(
        data,
        tracks_manager,
        features_end - start,
        matches_end - features_end,
        tracks_end - matches_end,
    )
Пример #3
0
    def run(self, args):
        data = dataset.DataSet(args.dataset)

        start = timer()
        features, colors = tracking.load_features(data, data.images())
        features_end = timer()
        matches = tracking.load_matches(data, data.images())
        matches_end = timer()
        tracks_manager = tracking.create_tracks_manager(
            features, colors, matches, data.config)
        tracks_end = timer()
        data.save_tracks_manager(tracks_manager)
        end = timer()

        with open(data.profile_log(), 'a') as fout:
            fout.write('create_tracks: {0}\n'.format(end - start))

        self.write_report(data, tracks_manager, features_end - start,
                          matches_end - features_end, tracks_end - matches_end)