Giter Site home page Giter Site logo

hannaro / nideep Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nigroup/nideep

0.0 1.0 0.0 376 KB

collection of utilities to use with deep learning libraries (e.g. caffe)

License: BSD 2-Clause "Simplified" License

Python 93.35% Shell 0.40% Jupyter Notebook 1.77% MATLAB 4.49%

nideep's Introduction

NI Deep - Deep Learning Tools from the NI Group at TU-Berlin

Build Status Coverage Status License

This is a collection of scripts, utilities and examples to use with caffe. These are either too use case specific and are therefore kept outside of the Caffe framework. They may also be considered completely independent and potentially useful in combination with other frameworks.

Use cases include:

  • i/o of custom data to/from lmdb
  • generating lmdb for select benchmark datasets (adding support for more is welcome)
  • parsing caffe logs (incomplete, wraps around existing parser from Caffe)
  • editing caffe protobuf messages for network definitions

Disclaimer:

Some automated testing is in place. However, do not assume the functionality is free of bugs. Feel free to inspect them, scrutinize them. Feedback on making them more usable for others is welcome.

Beware: The documentation is pretty scarce. We're working on it.

Getting Started:

Dependencies:

  • Caffe with python support (pycaffe)
  • LMDB (apt-get and pip install)
  • cv2 (you probably already have this if you've built caffe)
  • PIL (pip install)
  • h5py

Examples:

PASCAL-Context to LMDB

Download val_59.txt from here.

Download 59_labels.txt from here.

from nideep.datasets.pascal_context_to_lmdb import pascal_context_to_lmdb
val_list_path = os.path.expanduser('~/data/PASCAL-Context/val_59.txt')
with open(val_list_path, 'r') as f:
    val_list = f.readlines()
    val_list = [l.translate(None, ''.join('\n')) for l in val_list if len(l) > 0]

nt, nv, fpath_imgs_train, fpath_labels_train, fpath_imgs_val, fpath_labels_val = \
pascal_context_to_lmdb(os.path.expanduser('~/data/VOCdevkit/VOC2012/JPEGImages'),
                       os.path.expanduser('~/data/PASCAL-Context/trainval'),
                       os.path.expanduser('~/data/PASCAL-Context/labels.txt'),
                       os.path.expanduser('~/data/PASCAL-Context/59_labels.txt'),
                       '',
                       os.path.expanduser('~/data/PASCAL-Context/'),
                       val_list=val_list
                       )

print "size: %d" % nt, nv, fpath_imgs_train, fpath_labels_train, fpath_imgs_val, fpath_labels_val

nideep's People

Contributors

kashefy avatar marcenacp avatar

Watchers

 avatar

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.