https://github.com/broadinstitute/keras-rcnn

Keras package for region-based convolutional neural networks (RCNNs)

https://github.com/broadinstitute/keras-rcnn

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    4 of 21 committers (19.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.7%) to scientific vocabulary

Keywords

cntk deep-learning image-segmentation object-detection tensorflow theano

Keywords from Contributors

distributed deep-neural-networks
Last synced: 5 months ago · JSON representation

Repository

Keras package for region-based convolutional neural networks (RCNNs)

Basic Info
  • Host: GitHub
  • Owner: broadinstitute
  • License: other
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 5.07 MB
Statistics
  • Stars: 556
  • Watchers: 38
  • Forks: 220
  • Open Issues: 71
  • Releases: 0
Topics
cntk deep-learning image-segmentation object-detection tensorflow theano
Created almost 9 years ago · Last pushed almost 6 years ago
Metadata Files
Readme License

README.rst

Keras-RCNN
==========

.. image:: https://travis-ci.org/broadinstitute/keras-rcnn.svg?branch=master
    :target: https://travis-ci.org/broadinstitute/keras-rcnn

.. image:: https://codecov.io/gh/broadinstitute/keras-rcnn/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/broadinstitute/keras-rcnn

keras-rcnn is *the* Keras package for region-based convolutional
neural networks.

Requirements
---------------
Python 3

keras-resnet==0.2.0

numpy==1.16.2

tensorflow==1.13.1

Keras==2.2.4

scikit-image==0.15.0


Getting Started
---------------

Let’s read and inspect some data:

.. code:: python

    training_dictionary, test_dictionary = keras_rcnn.datasets.shape.load_data()

    categories = {"circle": 1, "rectangle": 2, "triangle": 3}

    generator = keras_rcnn.preprocessing.ObjectDetectionGenerator()

    generator = generator.flow_from_dictionary(
        dictionary=training_dictionary,
        categories=categories,
        target_size=(224, 224)
    )

    validation_data = keras_rcnn.preprocessing.ObjectDetectionGenerator()

    validation_data = validation_data.flow_from_dictionary(
        dictionary=test_dictionary,
        categories=categories,
        target_size=(224, 224)
    )

    target, _ = generator.next()
    
    target_bounding_boxes, target_categories, target_images, target_masks, target_metadata = target

    target_bounding_boxes = numpy.squeeze(target_bounding_boxes)

    target_images = numpy.squeeze(target_images)

    target_categories = numpy.argmax(target_categories, -1)

    target_categories = numpy.squeeze(target_categories)

    keras_rcnn.utils.show_bounding_boxes(target_images, target_bounding_boxes, target_categories)


Let’s create an RCNN instance:

.. code:: python

    model = keras_rcnn.models.RCNN((224, 224, 3), ["circle", "rectangle", "triangle"])

and pass our preferred optimizer to the `compile` method:

.. code:: python

    optimizer = keras.optimizers.Adam(0.0001)

    model.compile(optimizer)

Finally, let’s use the `fit_generator` method to train our network:

.. code:: python

    model.fit_generator(    
        epochs=10,
        generator=generator,
        validation_data=validation_data
    )

External Data
-------------

The data is made up of a list of dictionaries corresponding to images. 

* For each image, add a dictionary with keys 'image', 'objects'
    * 'image' is a dictionary, which contains keys 'checksum', 'pathname', and 'shape'
        * 'checksum' is the md5 checksum of the image
        * 'pathname' is the pathname of the image, put in full pathname
        * 'shape' is a dictionary with keys 'r', 'c', and 'channels'
            * 'c': number of columns
            * 'r': number of rows
            * 'channels': number of channels
    * 'objects' is a list of dictionaries, where each dictionary has keys 'bounding_box', 'category'
        * 'bounding_box' is a dictionary with keys 'minimum' and 'maximum'
            * 'minimum': dictionary with keys 'r' and 'c'
                * 'r': smallest bounding box row
                * 'c': smallest bounding box column
            * 'maximum': dictionary with keys 'r' and 'c'
                * 'r': largest bounding box row
                * 'c': largest bounding box column
        * 'category' is a string denoting the class name

Suppose this data is save in a file called training.json. To load data,

.. code:: python

    import json

    with open('training.json') as f:
        d = json.load(f)


Slack
-----

We’ve been meeting in the #keras-rcnn channel on the keras.io Slack
server. 

You can join the server by inviting yourself from the following website:

https://keras-slack-autojoin.herokuapp.com/

Owner

  • Name: Broad Institute
  • Login: broadinstitute
  • Kind: organization
  • Location: Cambridge, MA

Broad Institute of MIT and Harvard

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 705
  • Total Committers: 21
  • Avg Commits per committer: 33.571
  • Development Distribution Score (DDS): 0.513
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Allen Goodman a****n@i****m 343
jhung0 j****g@b****g 175
Matthieu Broisin m****n@w****g 66
Matthieu Broisin m****n@b****g 58
JihongJu j****n@g****m 19
lee yeong khang y****e@v****m 12
jihongju d****u@g****m 7
Mihai Morariu m****u@d****m 6
JihongJu J****u 4
Morteza Milani m****i@g****m 2
Yann Henon y****n@g****m 2
Hans Gaiser j****r@d****m 2
Branden Murray b****y@g****m 1
Christopher Akroyd c****s@c****m 1
Devin R Waltman d****n@g****m 1
Guilherme Campos g****s@g****m 1
Allen Goodman a****n@w****g 1
Hanna Rudakouskaya h****a@g****m 1
Yanfeng Liu y****x@g****m 1
akshaybapat04 a****4@g****m 1
imparkss i****s@n****m 1

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 64
  • Total pull requests: 36
  • Average time to close issues: 27 days
  • Average time to close pull requests: 5 months
  • Total issue authors: 39
  • Total pull request authors: 12
  • Average comments per issue: 2.22
  • Average comments per pull request: 1.28
  • Merged pull requests: 29
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • 0x00b1 (10)
  • jhung0 (9)
  • milani (2)
  • zzdang (2)
  • mmiisskk (2)
  • Genie-Liu (2)
  • brandenkmurray (2)
  • willowxh (2)
  • JihongJu (2)
  • dberma15 (2)
  • aseylys (1)
  • worldmovers (1)
  • stylishsam (1)
  • yhenon (1)
  • shobhitpuri (1)
Pull Request Authors
  • jhung0 (14)
  • 0x00b1 (10)
  • drwaltman (2)
  • mbroisinBI (2)
  • brandenkmurray (1)
  • chrisakroyd (1)
  • GuilhermeFSCampos (1)
  • mihaimorariu (1)
  • akshaybapat04 (1)
  • imparkss (1)
  • milani (1)
  • hannarud (1)
Top Labels
Issue Labels
enhancement (10) help wanted (8) bug (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 11 last-month
  • Total docker downloads: 29
  • Total dependent packages: 0
  • Total dependent repositories: 20
  • Total versions: 1
  • Total maintainers: 1
pypi.org: keras-rcnn
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 20
  • Downloads: 11 Last month
  • Docker Downloads: 29
Rankings
Stargazers count: 2.7%
Docker downloads count: 3.0%
Dependent repos count: 3.3%
Forks count: 3.4%
Dependent packages count: 7.3%
Average: 8.8%
Downloads: 33.4%
Maintainers (1)
Last synced: 6 months ago

Dependencies

docs/requirements.txt pypi
  • jsonschema *
  • keras *
  • keras-resnet *
  • numpydoc *
  • scikit-image *
  • sphinx-gallery *
  • tensorflow *
setup.py pypi
  • jsonschema >=3.2.0
  • keras >=2.3.1
  • keras-resnet >=0.2.0
  • scikit-image >=0.17.2