Code Monkey home page Code Monkey logo

quicklabel's People

Contributors

avlaskin avatar manifes7o avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

napsterinblue

quicklabel's Issues

Still Interested in working on this?

Was actually sitting down to start in on a very similar idea for a library, but instead came across this repository during a cursory scan through PyPI-- love the work you've done with this.

Was hoping to fork and add a few more features, but was wondering if you'd be open to a PR down the road or available to answer questions along the way.

Cheers!

Load Image Dataset interface

Alright, Round 2!

Main reason I wanted to build out this library a few weeks ago was to have a streamlined way to:

  • Quickly label arbitrarily-many images We're killing it here
  • Have a simple interface for loading all of your image data for ML purposes

Proposed Flow

After using the quickLabel CLI and spitting out our resulting labels.csv, we should be able to use that file to create a one-call loader for all of our data.

Maybe something like

>> from quickLabel.data.loader import load_data
>> PATH = '/usr/my_proj/data/labels.csv'
>> X, y = load_data(PATH)
>> X.shape
(NUM_IMAGES, X_DIM, Y_DIM, 3)
>> y.shape
(NUM_IMAGES,)

And then you're off doing whatever keras/pytorch/sklearn/etc implementation you're used to doing.

Particulars

This would essentially mean creating a file under quickLabel/data called loader.py that

  • Creates an X and y of type np.array
  • Iterates through each record of the .csv and per-row:
    • Loads up the image in PIL for X (handling the BGR โ†’ RGB conversion)
    • Appends the label value to y
  • Finally returning the two to the user

One Hangup

How do we want to handle variable-sized images?

For instance, say our data is of all shapes and sizes-- rectangles, squares, similar shapes but different resolutions, etc.

I see three possible solutions, but they both involve a preliminary scan through the data (before loading anything into X or y) to get some max_X, min_X, max_Y, min_Y values, then we use these to:

  1. Upscale all images to the max using the same function you called here
  2. Downscale all images the same way
  3. Determine the max dimensions in both directions and just pad everything to fit the space
    • (This is the one I'm considering most)

Or any other ideas you might have here


I'm happy to knock this out over the next week or so, but want to make sure you think this is a good idea before I dive in.

Global Interface

Had success playing with the UI after cloning the repo locally.

But am I missing some command line functionality that I'd get from pip installing? Got v1.0.2 off PyPI, but couldn't get it to work globally like you would, say, cookiecutter or jupyter notebooks.

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.