Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A package to analyse a directory full of images

Project description

imdir

PyPI page Actions Status

a simple python package to analyse a directory full of images

Installation

stable version from pypi

pip install imdir

or latest from master branch

pip install git+https://github.com/dhananjayraut/imdir

Dependencies

  • matplotlib
  • pillow

Usage / example

# give path to class
im_dir = image_dir(path="../input/train/",recursive=True, nthreads=4)

imdir.sc_plot(alpha=0.5) # plot height and width as scatter plot

imdir.width_plot() # plot width as histogram using matplotlib

imdir.height_plot() # plot height as histogram using matplotlib

Documentation

class image_dir(builtins.object)
image_dir(path, recursive=False, nthreads=-1)

image directory class

Methods of this class

__init__(self, path, recursive=False, nthreads=-1)
    Args:
        path (str): path for the directory
        recursive (Boolean): whether to discover all sub directories
                             default False
        nthreads (int): Number of threads used
                        -1 (default) means use all cpu cores
                         0  means do it in main thread (slow)
    Returns:
        a image_dir object
exten_plot(self, **kwds)
    bar plot for the image extensions
    Args:
        **kwds: Additional keyword arguments to
                matplotlib.pyplot 's bar function
height_plot(self, **kwds)
    histogram plot for the image height.
    Args:
        **kwds: Additional keyword arguments to
                matplotlib.pyplot 's hist function
sc_plot(self, **kwds)
    Scatter plot for the image dimensions
    Args:
        **kwds: Additional keyword arguments to
                matplotlib.pyplot 's scatter function
width_plot(self, **kwds)
    histogram plot for the image width.
    Args:
        **kwds: Additional keyword arguments to
                matplotlib.pyplot 's hist function

or see help for the image_dir class

help(imdir.image_dir)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for imdir, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size imdir-0.1-py3-none-any.whl (3.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size imdir-0.1.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page