Giter Site home page Giter Site logo

skopy's Introduction

skopy

Skopy is an application for image analysis. It’s a lightweight version of CellProfiler.

$ skopy measure skopy/data/metadata.csv --output features.csv

Installation

$ pip install skopy

skopy's People

Contributors

0x00b1 avatar cells2numbers avatar shntnu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

shntnu emilroz

skopy's Issues

Skopy crashes with IndexError when no ORB features could be detected

wm80f-1a4:label tbecker$ time skopy measure 2014_07_08.csv
  [------------------------------------]    1%
Traceback (most recent call last):
  File "/usr/local/bin/skopy", line 11, in <module>
    load_entry_point('skopy', 'console_scripts', 'skopy')()
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/tbecker/repos/skopy/skopy/commands/command_measure.py", line 51, in command
    image = skopy.feature.extract(pathname, mask)
  File "/Users/tbecker/repos/skopy/skopy/feature/__init__.py", line 40, in extract
    image.descriptions = describe(x_data)
  File "/Users/tbecker/repos/skopy/skopy/feature/__init__.py", line 27, in describe
    description = Description.measure(index, descriptor)
  File "/Users/tbecker/repos/skopy/skopy/feature/_description.py", line 28, in measure
    "keypoint_x": descriptor.keypoints[index][0],
IndexError: index 2 is out of bounds for axis 0 with size 2

Area value in boxes table has constant value area = 267289

When skopy is used to process / analyze image, the area values are not calculated correctly. The area feature in the "boxes" table has a constant value of 267289.

R code used to read the skopy db

## specify sqlite file 
backend_path <- '/Users/tbecker/Documents/2017_05_22_neutros_sp/workspace/analysis/2014_07_08/measurements.sqlite'

## create db connection 
db <- src_sqlite(path = backend_path)

## table names used by skopy
tbl_name <- list( "boxes", "correlations", "descriptions", "images", "instances", "intensities", "moments", "shapes")

## function to read all tables using lapply
db2table <- function(tbl_name,db){
  tbl(db,tbl_name) %>% collect( n = Inf)
}

## collect data
skopy_db <- lapply(tbl_name, FUN = db2table, db = db) 

min / max values for area

> skopy_db[[1]] %>% summarise(min_area = min(area), max_area = max(area))
# A tibble: 1 x 2
  min_area max_area
     <int>    <int>
1   267289   267289
> 

ImportError: No module named psycopg2.extensions

The call skopy measure skopy/data/metadata.csv results in an InputError

wm80f-1a4:skopy tbecker$ skopy measure skopy/data/metadata.csv
Traceback (most recent call last):
  File "/usr/local/bin/skopy", line 11, in <module>
    load_entry_point('skopy', 'console_scripts', 'skopy')()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 561, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2291, in load
    return self.resolve()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2297, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/tbecker/repos/skopy/skopy/__init__.py", line 2, in <module>
    import psycopg2.extensions
ImportError: No module named psycopg2.extensions

After installing psycopg2 using pip (pip install psycopg2) it works

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.