Saravanan666/pypi-org huggingface dataset:
Package: image-classifier
ImageClassifierImageClassifier is a python package for creating Image classifiers with the help of CNNs.InstallationUse the package managerpipto install ImageClassifier.pipinstallimage-classifierData formatFirst you need to create or download the images and save them in a folder in their corresponding label folders.example folder structure:data-->apple-->(imagesrelatedtoapple)banana-->(imagesrealatedtobanana)here "data" is the main folder, "apple" and "banana" are the label folders which have their corresponding images related to them.[NOTE]: You can create as many label folders as you want but they should have their corresponding images.UsageTo create a Image classifier :-Creating the data and model.fromImageClassifierimportCreateDataAndModelmain=CreateDataAndModel(file_path="./data/",model_file_name_to_save="model.hdf5",init_lr=0.0001,epochs=100,batch_size=32)# Here "./data/" is the data folder where we have the label folder- "apple" and "banana" (Remember to include a "/" after the folder like "./data/" ). Basically, you have to give the data folder path where you have the label folders, it can also be like "./seg_pred/seg_pred/".main.create()# This will create the data and the model for you.Running the image classifier to predict a single image.fromImageClassifierimportRunr=Run(model_file_name="model.hdf5")# The model file in your current directoryimg_to_predict="./example_dir/example.jpg"pred=r.run(img_to_predict)print(pred)OutputappleRunning the image classifier to predict multiple images.importosr=Run("model.hdf5")file_path="./seg_pred/seg_pred/"forfileinos.listdir(file_path):pred=r.run(file_path+file)print(pred)Outputapple
banana
banana
apple
bananaContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.See the source code here/image-classifier/ImageClassifier/Data typesYou can use any type of images for creating data like- jpeg, png etc. Even mixed!!!LicenseMIT License
Package: image-classifier-3d
Image Classifier 3DPython package for building 3d image classifier using deep neural networksInstallationStable Release:pip install image_classifier_3dDevelopment Head:pip install git+https://github.com/aics-int/image_classifier_3d.gitDevelopmentSeeCONTRIBUTING.mdfor information related to developing the code.Free software: Allen Institute Software License
Package: imagecleaner
Remove duplicated images from a path.InstallationYou can install image cleaner using pip.$pipinstallimagecleaner#orinstallmasterbranch$pipinstallgit+git@github.com:Kjwon15/image-cleaner.gitUsageIt’s just simple one command!$image-cleaner<path>Referencehttp://blog.iconfinder.com/detecting-duplicate-images-using-python/LicenseImage Cleaner is following MIT license.
Package: image-cleaner
Remove all metadata from images in a given folder.Images can contain lots of metadata. Most critical to privacy might be GPS
coordinates and date / time. You might consider doing so before you upload them
on public websites.image_cleanerremoves all metadata from all images in a given folder.Installation and DependenciesYou need to installPillow:$pipinstallPillowNow install image cleaner$pipinstallimage_cleanerAnd call it:image_cleaner --help
Package: image-cli
Image CLIUsageInstallationNormal installationpipinstallimage-cliDevelopment installationgitclonehttps://github.com/jpleorx/image-cli.gitcdimage-cli
pipinstall--editable.LinksIn case you’d like to check my other work or contact me:Personal websiteGitHubPyPIDockerHubArticles on MediumLinkedIn (feel free to connect)
Package: imagecodecs-numcodecs
Imagecodecs_numcodecs is a Python package that registers the followingNumcodecsentry points
for theImagecodecspackage:imagecodecs_aec = imagecodecs.numcodecs:Aec
imagecodecs_apng = imagecodecs.numcodecs:Apng
imagecodecs_avif = imagecodecs.numcodecs:Avif
imagecodecs_bitorder = imagecodecs.numcodecs:Bitorder
imagecodecs_bitshuffle = imagecodecs.numcodecs:Bitshuffle
imagecodecs_blosc = imagecodecs.numcodecs:Blosc
imagecodecs_blosc2 = imagecodecs.numcodecs:Blosc2
imagecodecs_bmp = imagecodecs.numcodecs:Bmp
imagecodecs_brotli = imagecodecs.numcodecs:Brotli
imagecodecs_byteshuffle = imagecodecs.numcodecs:Byteshuffle
imagecodecs_bz2 = imagecodecs.numcodecs:Bz2
imagecodecs_checksum = imagecodecs.numcodecs:Checksum
imagecodecs_cms = imagecodecs.numcodecs:Cms
imagecodecs_dds = imagecodecs.numcodecs:Dds
imagecodecs_deflate = imagecodecs.numcodecs:Deflate
imagecodecs_delta = imagecodecs.numcodecs:Delta
imagecodecs_dicomrle = imagecodecs.numcodecs:Dicomrle
imagecodecs_eer = imagecodecs.numcodecs:Eer
imagecodecs_float24 = imagecodecs.numcodecs:Float24
imagecodecs_floatpred = imagecodecs.numcodecs:Floatpred
imagecodecs_gif = imagecodecs.numcodecs:Gif
imagecodecs_heif = imagecodecs.numcodecs:Heif
imagecodecs_jetraw = imagecodecs.numcodecs:Jetraw
imagecodecs_jpeg = imagecodecs.numcodecs:Jpeg
imagecodecs_jpeg2k = imagecodecs.numcodecs:Jpeg2k
imagecodecs_jpegls = imagecodecs.numcodecs:Jpegls
imagecodecs_jpegxl = imagecodecs.numcodecs:Jpegxl
imagecodecs_jpegxr = imagecodecs.numcodecs:Jpegxr
imagecodecs_lerc = imagecodecs.numcodecs:Lerc
imagecodecs_ljpeg = imagecodecs.numcodecs:Ljpeg
imagecodecs_lz4 = imagecodecs.numcodecs:Lz4
imagecodecs_lz4f = imagecodecs.numcodecs:Lz4f
imagecodecs_lz4h5 = imagecodecs.numcodecs:Lz4h5
imagecodecs_lzf = imagecodecs.numcodecs:Lzf
imagecodecs_lzfse = imagecodecs.numcodecs:Lzfse
imagecodecs_lzham = imagecodecs.numcodecs:Lzham
imagecodecs_lzma = imagecodecs.numcodecs:Lzma
imagecodecs_lzo = imagecodecs.numcodecs:Lzo
imagecodecs_lzw = imagecodecs.numcodecs:Lzw
imagecodecs_packbits = imagecodecs.numcodecs:Packbits
imagecodecs_pglz = imagecodecs.numcodecs:Pglz
imagecodecs_png = imagecodecs.numcodecs:Png
imagecodecs_qoi = imagecodecs.numcodecs:Qoi
imagecodecs_quantize = imagecodecs.numcodecs:Quantize
imagecodecs_rcomp = imagecodecs.numcodecs:Rcomp
imagecodecs_rgbe = imagecodecs.numcodecs:Rgbe
imagecodecs_snappy = imagecodecs.numcodecs:Snappy
imagecodecs_sperr = imagecodecs.numcodecs:Sperr
imagecodecs_spng = imagecodecs.numcodecs:Spng
imagecodecs_szip = imagecodecs.numcodecs:Szip
imagecodecs_tiff = imagecodecs.numcodecs:Tiff
imagecodecs_webp = imagecodecs.numcodecs:Webp
imagecodecs_xor = imagecodecs.numcodecs:Xor
imagecodecs_zfp = imagecodecs.numcodecs:Zfp
imagecodecs_zlib = imagecodecs.numcodecs:Zlib
imagecodecs_zlibng = imagecodecs.numcodecs:Zlibng
imagecodecs_zopfli = imagecodecs.numcodecs:Zopfli
imagecodecs_zstd = imagecodecs.numcodecs:Zstd
Package: imagecolor
This module uses PIL (Pillow) to extract colors from imagesAvailable functionsaverage(image, name=None, downsample=True, max_size=100, alpha_threshold=None)Averages a single image into RGB color values. Returns a dictionary with the following keys:name,red,green,blueimage- filename (string), pathlib.Path object or a file object. The file object must implementread(),seek(), andtell()methods, and be opened in binary mode.name-  auto generated from image path by callingimage.split(os.sep)[-1]unless set.downsample- chooses if downsampling is enabled to speed up processing. Enabled by default.max_size- max length of longest side ifdownsampleis Truealpha_threshold- level at which transparent pixels are excluded from the average. Default is 245average_images(dir_in)Averages each individual image in a directory and returns a list with an entry for each image successfully averaged. Returns a list containing a dictionary for each image with the following keys:name,red,green,bluedir_in- path to directorydirectory_average(dir_in, name=None)Averages all images in a directory to a singular RGB directory average. Returns a dictionary with the following keys:name,red,green,bluedir_in- path to directoryname- auto generated from directory path by callingdir_in.split(os.sep)[-1]unless set.nested_directory_average(root_dir)Accepts the path to a directory and walks all the enclosed directories callingaverage_directoryfor each one that contains images. Returns a list containing a dictionary for each directory with the following keys:name,red,green,blueroot_dir- path to starting directoryFuture workadd usage examples to readmeadd information for loadsave functions to readmeTestsTesting is done withpytestRun withpython3 setup.py test
Package: image-combination
IMAGE COMBINATIONDescriÃ§Ã£o.Pacote utilizado para combinar imagens diferentes e gerar uma nova imagem a partir da combinaÃ§Ã£o delasModulos:Processing:
    - Histogram matching
    - Structural similarity
    - Resize image
Utils:
    - Read image
    - Save image
    - Plot image
    - Plot result
    - Plot histogramInstalaÃ§Ã£outilize o gerenciador de pacote pip para instalar o pacotepip install image_combinationUsarfrom image_combination.utils.io import read_image
from image_combination.processing.transformation import resize_image
from image_combination.processing.combination import find_difference, transfer_histogram
from image_combination.utils.plot import plot_result, plot_histogram

img1 = read_image(path)
img2 = read_image(path)

img1 = resize_image(img1, 300, 600)
img2 = resize_image(img2, 300, 600)
find_difference(img1, img2)

plot_histogram(img1)
plot_histogram(img2)

combination1 = transfer_histogram(img1, img2)
combination2 = transfer_histogram(img2, img1)

plot_result(img1, img2, combination1)
plot_result(img2, img1, combination2)AutorEverton Vazpacote criado para fins educacionais
Package: image-comparer
Compares two images usingSiamese Network(Machine Learning) trained from aPytorch ImplementationInstallationTo install, runpipinstallimage-comparerUsageCLIimage-comparewhich wil show the follow help screenusage: image-compare [-h] [--threshold THRESHOLD] Image1-Path Image2-PathFor example, you can compare two images withimage-comparetests/images/kobe.jpgtests/images/kobe2.jpgwhich gives the resultkobe.jpg and kobe2.jpg are not similarProgrammaticallyWith PILimportimage_comparerfromPILimportImageimage=Image.open("test/kobe.jpg")image2=Image.open("test/kobe2.jpg")image_comparer.is_similar(image,image2,threshold=0.5)or with OpenCVimportimage_comparerimportcv2image=cv2.imread("test/kobe.jpg")image2=cv2.imread("test/kobe2.jpg")image_comparer.is_similar(image,image2,threshold=0.5)APIMethodsis_similar(image1: Union[Image.Image, np.ndarray], image2: Union[Image.Image, np.ndarray], threshold=0.5): Checks if the two images are similar based on the reshold passedcalculate_score(image1: Union[Image.Image, np.ndarray], image2: Union[Image.Image, np.ndarray]): Calculates the score between the two images. The higher the score, the more closely the two images are related.DevelopmentInstallationpipinstall-rrequirements-test.txtTestsTo run tests, runpytest
Package: image-compression
Image compression using PythonImage compression is done to reduce the cost of storage and transmission
StepsOpen the file and read itGet the pixel values in RGB formatConvert the tuples into one listRound the pixel values to nearest 10Regroup the pixel values into tuple of 3Create a new image from the tuple list where each pixel value in tuple indicate R,G,B value
E.g. (42,34,67) indicates R=42,G=34,B=67Save the compressed image
Package: image-converters
ImageConverterImageConverter is a Python Packages that provides methods to convert images between different formats, such as bytes and base64 encoding. It uses the OpenCV library for image processing.InstallationTo use the ImageConverter class, you need to have OpenCV installed. You can install it using pip:pipinstallopencv-pythonUsageFirst, import the necessary modules:Then, import and create an instance of the ImageConverter class:converter = ImageConverter()Loading an ImageTo load an image from a file, use the load_image method:converter.load_image('path/to/image.jpg')Converting Image to BytesTo convert the loaded image to bytes, use the image_to_bytes method:image_bytes = converter.image_to_bytes()Converting Bytes to ImageTo convert bytes back to an image, use the bytes_to_image method:image = converter.bytes_to_image(image_bytes)Encoding Image to Base64To encode the image as a base64 string, use the encode_image_to_base64 method:encoded_image = converter.encode_image_to_base64()Decoding Base64 to ImageTo decode a base64-encoded image back to an image, use the decode_base64_to_image method:decoded_image = converter.decode_base64_to_image(encoded_image)Saving Decoded ImageTo save the decoded image to a file, use the save_decoded_image method:converter.save_decoded_image('path/to/output.jpg')ExamplesHere's an example that demonstrates how to use the ImageConverter class:from image_converter import ImageConverter

# Create an instance of the ImageConverter class
converter = ImageConverter()

# Load an image
converter.load_image('path/to/image.jpg')

# Convert the image to bytes
image_bytes = converter.image_to_bytes()

# Convert bytes back to an image
image = converter.bytes_to_image(image_bytes)

# Encode the image as a base64 string
encoded_image = converter.encode_image_to_base64()

# Decode the base64 image back to an image
decoded_image = converter.decode_base64_to_image(encoded_image)

# Save the decoded image
converter.save_decoded_image('path/to/output.jpg')ContributingContributions are welcome! If you find any issues or have suggestions for improvements, please create an issue or submit a pull request.LicenseThis project is open source and licensed under the MIT License.ContactFor any questions or inquiries, please contact:Muhammad Tanveer SultanEmail:engr.tanveersultan53@gmail.com
Package: imagecorruptions
imagecorruptionsThis package provides a set of corruptions that can be applied to images in order to benchmark the robustness of neural networks. These corruptions are not meant to be used as training data augmentation but rather to test the networks against unseen perturbations. For more information have a look at the paper on the original corruption package by Hendrycks and Dietterich:Benchmarking Neural Network Robustness to Common Corruptions and Surface Variations.Installation and UsageThis package is pip installable viapip3 install imagecorruptions. An example of how to use the corruption function is given below:fromimagecorruptionsimportcorrupt...corrupted_image=corrupt(image,corruption_name='gaussian_blur',severity=1)...Looping over all available corruptions can be done either by name or by index:# via namefromimagecorruptionsimportget_corruption_namesforcorruptioninget_corruption_names():forseverityinrange(5):corrupted=corrupt(image,corruption_name=corruption,severity=severity+1)...# via number:foriinrange(15):forseverityinrange(5):corrupted=corrupt(image,corruption_number=i,severity=severity+1)...Note that the first 15 image corruptions are the common corruptions (the ones you get viaget_corruption_names()). If you really wish to use these as data augmentation, there exist four additional validation corruptions which can be accessed viaget_corruption_names('validation')which should then be used to test the corruption robustness of the trained model.CitationIf you use our code or the imagecorruptions package, please consider citing:@article{michaelis2019dragon,
  title={Benchmarking Robustness in Object Detection: 
    Autonomous Driving when Winter is Coming},
  author={Michaelis, Claudio and Mitzkus, Benjamin and 
    Geirhos, Robert and Rusak, Evgenia and 
    Bringmann, Oliver and Ecker, Alexander S. and 
    Bethge, Matthias and Brendel, Wieland},
  journal={arXiv preprint arXiv:1907.07484},
  year={2019}
}Credit and ChangelogThis package is an extension of the image corruption functions provided by Dan Hendrycks in the repositorycorruptions. The image corruptions implemented by Hendrycks are generalized to work on images with arbitrary image dimensions and aspect ratios aswell as on grayscale images. We furthermore removed the dependency tolibmagickwandand the python apiWandand reimplemented themotion_blurin python.
Package: image-create
image_createDescription.
The package image_create is used to:
- create random images automatically
- Requirement package Pillow 9.2InstallationUse the package managerpipto install image_createpipinstall-ihttps://pypi.org/simple/image-create,PillowUsagefromimage_createimportcreate_imagecreate_image.create_background(target_size_px=int,color_background=tuple(R,G,B),padding=int,path=str)AuthorWagner GamaLicenseMIT
Package: imagecrop
Image extraction using a template. Uses homography and feature matching,
storing results in a SQLite database in the user’s home directory for faster reprocessing.Usagefromimage_extract.extractimportExtracterex=Extracter()ex.crop_images(image_directory,crop_template,file_extension[,match_points])Successful crops are extracted to a directory calledsuccessful_crops,
directly underneathimage_directory. Each template used creates a subdirectory, named after its
md5 hash:image_directory
    - img1.jpg
    - …
    - imgn.jpg
    - successful_crops
        - 2a1bdab44c5e81af34f47f3395a3da7e
            - img1_cropped.jpgThe optionalmatch_pointsargument controls the number of matching points which must
be detected in order for a template match to be deemed successful. It’s set to 30 by default.SummariesCallex.summary(path)to see information on extracted crops for a given directory.Deleting Extracted CropsCallex.delete(path[, template_md5])to delete extracted crops for a given template.
If no template md5 value is given, all extracted crops in that directory are removed.AccuracyFor best results, the template image should be of the same (or similar) resolution
as the image from which the crop is to be extracted.
Package: imagedataextractor
imagedataextractoris a Python library for nanoparticle electron microscopy image quantification.Try the onlineDemo.FeaturesAutomatic detection and download of microscopy images from scientific articles.Particle segmentation with uncertainty quantification.Particle localization.Automatic scalebar detection (reading and measurement).Particle size distributions.Locations, sizes and aspect ratios of all particles in an image (in the form of a .csv file).Radial distribution functions of extracted particle systems.Installationimagedataextractorrequires Python 3.7 or above. We strongly recommend the use of avirtual environmentfor installation, asimagedataextractorrequires specific versions of its requirements to be installed in order to function as intended.Install TesseractimagedataextractorrequiresTesseract 4. Installation instructions for Tesseract can be foundhere. On Linux, this is very simple:sudoapt-getinstalltesseract-ocrlibtesseract-devInstallation withpip(recommended)pipinstallimagedataextractorInstallation from sourceClone the repo and move into the directory:gitclonehttps://github.com/by256/imagedataextractor.gitcdimagedataextractorActivate your virtual environment.Install:pythonsetup.pyinstallUsageSimply provide as input a path to an image or a document, or a path to a directory of images and/or documents.importimagedataextractorasideimage_path='<path/to/image>'data=ide.extract(image_path)# view extracted data as a pandas DataFramedf=data.to_pandas()# retrieve extracted scalebar datasb_text=data.scalebar.textconversion=data.scalebar.conversion# pixels to meters# resulting particle segmentationsseg=data.segmentationIf the input image is a figure containing a panel of images, these will be split and extraction will be performed on each sub-image separately.See theexample notebook. A more detailed usage guide can be found in theDocumentation.CitingIf you useimagedataextractorin your work, please cite the following works:B. Yildirim, J. M. Cole, "Bayesian Particle Instance Segmentation for Electron Microscopy Image Quantification",J. Chem. Inf. Model.(2021)https://doi.org/10.1021/acs.jcim.0c01455K. T. Mukaddem, E. J. Beard, B. Yildirim, J. M. Cole, "ImageDataExtractor: A Tool to Extract and Quantify Data from Microscopy Images",J. Chem. Inf. Model.(2019)https://doi.org/10.1021/acs.jcim.9b00734FundingThis project was financially supported by theScience and Technology Facilities Council (STFC)and theRoyal Academy of Engineering(RCSRF1819\7\10).License
Package: imagedata-registration
Helper modules to do
image registration forImagedataSeriesobjects.Available modulesNPregNPregby Erlend Hodneland is implemented in Python,
and available as a self-supported PyPi package.
There are three implementations ofNPreg:Pure Python/NumPy code. Source code will run on any Python platform.Cython code. Binary code compiled for supported platforms.CuPy/CUDA code. Source code which will run on platforms with a workingCuPyand CUDA Toolkit.FSLFSL(https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FSL)
has several methods for image registration.
UsingFSLimage registration from Python requires theFSLinterface from
nipype, as well as a theFSLexecutables.
EachFSLmethod may have different requirements.
The common factor is thatFSLmethods will read and write NIfTI image files.A functionregister_fslis provided here.
This function will register a moving Series to a fixed Series.
The default registration method is fsl.MCFLIRT.
The function will accept other registration methods.ITK ElastixThe popularElastixGUI is based on the C++ITKimage registration routines.
Like theFSLmethods, there are numerousElastixmethods available, all with
different requirements.
TheSimpleElastix(https://simpleelastix.readthedocs.io/index.html)
Python library is one particular interface to theElastix/ITKroutines.PrerequisitesNPreg on CUDA GPUimagedata-registration will benefit from a CUDA GPU. If this is available,
installCuPy(https://docs.cupy.dev).First, install theCUDA Toolkit: seehttps://developer.nvidia.com/cuda-toolkit.There are different options for installingCuPy. See:https://docs.cupy.dev/en/stable/install.htmlFSLThe imagedata-registration FSL module is a wrapper around the official FSL tools.
A native FSL installation is required on the host computer.SimpleElastixSimpleElastix must be installed separately:pip install SimpleITK-SimpleElastixInstallationpip install imagedata-registrationExamplesNPreg examplesFSL examplesSimpleElastix examples
Package: image-dataset-loader
image-dataset-loader: Load image datasets as NumPy arraysInstallationpipinstallimage-dataset-loaderOverviewSuppose you have an image dataset in a directory which looks like this:data/
  train/
    cats/
      cat0001.jpg
      cat0002.jpg
      ...
    dogs/
      dog0001.jpg
      dog0002.jpg
      ...
  test/
    cats/
      cat0001.jpg
      cat0002.jpg
      ...
    dogs/
      dog0001.jpg
      dog0002.jpg
      ...You can use theimage_dataset_loader.loadfunction to load this dataset as NumPy arrays:importimage_dataset_loader(x_train,y_train),(x_test,y_test)=image_dataset_loader.load('./data',['train','test'])The shape of thex_*arrays will be(instances, rows, cols, channels)for color images and(instances, rows, cols)for grayscale images.
Also, the shape of they_*arrays will be(instances,).All images in the dataset must have the same shape.
Also, all data subsets (i.e.,trainandtestin this example) must contain the same set of classes.
Class names will be sorted alphabetically.
So, in this example,catsanddogswill be represented by0and1, respectively.You can also load a single data subset. For example:(x_train,y_train),=image_dataset_loader.load('./data',['train'])Note that the comma after(x_train, y_train)is required, because the function always returns a tuple of tuples.APIload(dataset_path,set_names,shuffle=True,seed=None,x_dtype='uint8',y_dtype='uint32')dataset_path:Path to the dataset directory.set_names:List of the data subsets (subdirectories of the dataset directory).shuffle:Whether to shuffle the samples. If false, instances will be sorted by class name and then by file name.seed:Random seed used for shuffling (see thedocs).x_dtype:NumPy data type for the X arrays (see thedocs).y_dtype:NumPy data type for the Y arrays (see thedocs).Returns a tuple of(x, y)tuples corresponding toset_names.