Commit c0a92e2e authored by Kelvin Rodriguez's avatar Kelvin Rodriguez Committed by GitHub
Browse files

Merge pull request #175 from jlaura/master

Adds a number of items
parents 96c46195 14987fd7
Loading
Loading
Loading
Loading
+2 −12
Original line number Diff line number Diff line
@@ -2,19 +2,9 @@
source = autocnet
[report]
omit =
    autocnet/fileio/ControlNetFileV0002_pb2.py
    autocnet/vis/graph_view.py
    autocnet/fileio/sqlalchemy_json/*
    autocnet/fileio/io_multibandimager.py
    autocnet/fileio/io_moon_minerology_mapper.py
    autocnet/fileio/header_parser.py
    autocnet/fileio/io_ccs.py
    autocnet/fileio/io_jsc.py
    autocnet/fileio/io_edr.py
    autocnet/fileio/lookup.py
    autocnet/fileio/utils.py
    autocnet/utils/folds.py
    autocnet/spectral/*
    autocnet/__init__.py
    autocnet/matcher/cuda_*
    bin/*
    */tests/*
exclude_lines =
+0 −1
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ install:
  # Development installation
  - conda install pytest pytest-cov coverage sh anaconda-client
  - pip install coveralls
  - python runipynbs.py

    # Straight from the menpo team
  - if [["$TRAVIS_OS_NAME" == "osx"]]; then
+44 −8
Original line number Diff line number Diff line
import os
import autocnet

__version__ = "0.1.0"
import warnings

def get_data(filename):
    packagdir = autocnet.__path__[0]
    dirname = os.path.join(os.path.dirname(packagdir), 'data')
    fullname = os.path.join(dirname, filename)
    return fullname
import autocnet

import autocnet.examples
import autocnet.camera
@@ -18,3 +12,45 @@ import autocnet.matcher
import autocnet.transformation
import autocnet.utils
import autocnet.utils

__version__ = "0.1.0"

def get_data(filename):
    packagdir = autocnet.__path__[0]
    dirname = os.path.join(os.path.dirname(packagdir), 'data')
    fullname = os.path.join(dirname, filename)
    return fullname

def cuda(enable=False, gpu=0):
    # Classes/Methods that can vary if GPU is available
    from autocnet.graph.node import Node
    from autocnet.graph.edge import Edge
    if enable:
        try:
            import cudasift as cs
            cs.PyInitCuda(gpu)

            # Here is where the GPU methods get patched into the class
            from autocnet.matcher.cuda_extractor import extract_features
            Node._extract_features = staticmethod(extract_features)

            from autocnet.matcher.cuda_matcher import match
            Edge.match = match

            from autocnet.matcher.cuda_decompose import decompose_and_match
            Edge.decompose_and_match = decompose_and_match
        except Exception:
            warning.warn('Failed to enable Cuda')
        return

    # Here is where the CPU methods get patched into the class
    from autocnet.matcher.feature_extractor import extract_features
    Node._extract_features = staticmethod(extract_features)

    from autocnet.matcher.feature_matcher import match
    Edge.match = match

    from autocnet.matcher.cpu_decompose import decompose_and_match
    Edge.decompose_and_match = decompose_and_match

cuda()
+3 −1
Original line number Diff line number Diff line
@@ -153,8 +153,10 @@ class CorrespondenceNetwork(object):

        # Load the correspondence to point data structure
        for k, source_idx in df['source_idx'].items():
            source_idx = int(source_idx)
            p = Point(self.point_id)
            destination_idx = df['destination_idx'][k]

            destination_idx = int(df['destination_idx'][k])

            sidx = Correspondence(source_idx, *s_kps[int(source_idx)], serial=edge.source.isis_serial)
            didx = Correspondence(destination_idx, *d_kps[int(destination_idx)], serial=edge.destination.isis_serial)
−47.1 KiB

File deleted.

Loading