Skip to main content

Madenn Internal tools

Project description

Library documentation

Setup

pip install -i http://madenn2:8000 --trusted-host madenn2 madenntools
# or
pip install git+https://github.com/MaDENN-Machine-Development/madenntools

Usage

example:

from madenntools.cv import blend

if __name__ == '__main__':
    blended_image = blend(image, mask, level=(128, 127, 0))

Update pip package

  • Update the code
  • Update the Dependencies in pyproject.toml, if necessary
  • Build the project
pip install setuptools twine # only once
python -m build
twine check dist/* # optional
  • Copy contents of dist/ to madenn2/packages/ for the LAN hosted package
  • Push changes to github, including the new .whl file for the github package

Contribution practices

  • Pay attention when changing the type of the input/output data inside the function. Avoid if possible
  • scripts will be added to directories (example: cv), and linked the init.py file of that directory.
  • Follow the naming convention and the docstring style. Example
    """   
    Blend a foreground image with a background using the binary mask as the alpha channel.

    Args:
        foreground_image (numpy.ndarray): The BGR image to be blended.
        binary_mask (numpy.ndarray): The binary mask in BGR format.
        level (tuple, optional): The BGR color of the background. Defaults to (128, 128, 128).

    Returns:
        numpy.ndarray: The blended image.
    """
    def blend(foreground_image, binary_mask, level=(128, 128, 128)):

Project details


Download files

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

Source Distribution

madenntools-0.1.tar.gz (10.0 kB view hashes)

Uploaded Source

Built Distribution

madenntools-0.1-py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page