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/
tomadenn2/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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for madenntools-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4f94576839522116af6da374d4f8cac8164e3098b2ef455204a943c1d529c0f |
|
MD5 | 04e2e48d9abae953768e1b130edca589 |
|
BLAKE2b-256 | 79a5576dc0d7ba56055bb4a713ffd830987409592ab8f49d821f657ce7349b03 |