Code Monkey home page Code Monkey logo

nucleus's Introduction

nucleus

A lightweight library for importing, manipulating and visualizing images and datasets.

nucleus's People

Contributors

jalabort avatar jinyeom avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nucleus's Issues

Update master

Commit to master:

  • The object detection workshop work
  • The spare time improvements.

Fix model saving issues

Models seem to be unable to be loaded up when using a lambda Layer for dealing with the backbone specific preprocessing.

Replace export for public

Replace the custom export function for the public python package. Functionality is very similar, but public can also be used for variables.

Set up evaluation

Need to think about model evaluation. Detection is usually evaluated using mAP and it would be good to have something very well stablished. Also MODA has worked well for us in the past. Come up with a plan of action in this regard.

Find a better way to load saved datasets

At the moment loading saved datasets is cumbersome, e.g. we need to know their cache and name in advance... This process should be easier and should work in a similar way as it work for model via ModelManager.

Find a better way to pass custom objects

At the moment we have to manually pass our custom objects to the ModelManager loading functions in order for our models to be loaded correctly. Can we do better and automatically pass them when required automatically?

Update package structure

Separate package in two high level modules:

  • core
  • detection

This might end up being two different packages in the future. However, for the time being, it seems development will be easier this way.

Exposing intermediate features from a Backbone

def create_model(
self,
input_shape: Tuple = (None, None, 3),
weights: Optional[Union[str, Path]] = 'imagenet',
trainable: Union[bool, Sequence[bool]] = True,
**kwargs
) -> tf.keras.Model:
r"""
Creates a backbone model.
Parameters
----------
input_shape
alpha
weights
trainable
kwargs
Returns
-------
The backbone model.
"""
# Input layer
inputs = tf.keras.Input(input_shape)
# Define the backbone specific pre-processing layer
x = self._preprocessing_layer(inputs)
# Define the backbone network
backbone: tf.keras.Model = self._backbone_fn(
# layers=self._patch_keras_layers(),
include_top=False,
input_shape=input_shape,
input_tensor=x,
weights=weights,
**kwargs
)
# Determine which layers should be trainable
n_layers = len(backbone.layers)
if isinstance(trainable, bool):
trainable = [trainable for _ in range(n_layers)]
elif isinstance(trainable, Sequence):
trainable = list(trainable)
trainable_length = len(trainable)
assert trainable_length <= n_layers
if trainable_length < n_layers:
trainable = (
[False for _ in range(n_layers - trainable_length)]
+
trainable
)
# Set the appropriate layers to trainable
for layer, t in zip(backbone.layers, trainable):
layer.trainable = t
return tf.keras.Model(
inputs=inputs,
outputs=backbone.outputs,
name=self.model_name
)

In some circumstances, I think it would be useful to pass lower-level (higher-resolution) features to a head network through keras.Model's outputs kwarg. Selecting the ones you want to expose could probably use something like the current trainable kwarg pattern.

I don't think we would need to worry about gradient control here, as the head can be configured to pass gradients through to the lower-level weights if needed or not.

Commit relevant notebooks

Notebooks are difficult to manage with github. However, for lack of a better solution commit the most relevant ones directly to this repo. This will help keeping development overhead to a minimum.

Add keras applications backbones

Add the following Keras applications backbones:

  • MobileNetV2
  • NASNetMobile
  • DenseNet121
  • DenseNet169
  • DenseNet201
  • Xception
  • InceptionV3
  • ResNetXt50

General pass through the docs

Have a general pass through fixing, amending and adding docstrings. Give priority to the current detection module.

Set up Polyaxon

Execute the necessary first steps to set up the project to be used with Polyaxon.

Bounding box scores

Think about a more accurate way of representing the relationship between a bounding box score (the score associated to the bounding box being present) and the score associated to the bounding box labels (the scores to the class of object that the bounding box represents).

Revisit transform module

The transform module is, currently, a bit of a mess. Come up with a good plan for it going forward.

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.