Package: ife
Image Feature Extractor(IFE)What is thisIFEis a package to get an image feature more easily for Python. It contains many kinds of feature extract algorithms.InsatallFor the latest version are available using pip install.pipinstallife1. FeaturesColor MomentMean, Median, Variance, Skewness, Kurtosis ofRGB, HSV, HSL, CMYColourfulnessColourfulness measure of the image2. ExamplesImport the basic image reader of IFE.fromife.io.ioimportImageReader2.1 Get MomentAdd a image file path toread_from_single_file(). This will return basic features class.And now! You can get a RGB color moment feature from image!!Sample>>>features=ImageReader.read_from_single_file("ife/data/small_rgb.jpg")>>>features.moment()array([[0.57745098,0.52156863,0.55980392],[0.58823529,0.48823529,0.54901961],[0.15220588,0.12136101,0.12380911],[-0.01944425,0.18416571,0.04508015],[-1.94196824,-1.55209335,-1.75586748]])Also, you can get anflatten vector, dictionary, or pandas>>>features.moment(output_type="one_col")array([0.57745098,0.52156863,0.55980392,0.58823529,0.48823529,0.54901961,0.15220588,0.12136101,0.12380911,-0.01944425,0.18416571,0.04508015,-1.94196824,-1.55209335,-1.75586748])>>>features.moment(output_type="dict")defaultdict(<class'dict'>, {'mean': {'R': 0.57745098039215681, 'G': 0.52156862745098043, 'B': 0.55980392156862746}, 'median': {'R': 0.58823529411764708, 'G': 0.48823529411764705, 'B': 0.5490196078431373}, 'var': {'R': 0.15220588235294119, 'G': 0.12136101499423299, 'B': 0.12380911188004615}, 'skew': {'R': -0.019444250980856902, 'G': 0.18416570783012232, 'B': 0.045080152334687214}, 'kurtosis': {'R': -1.9419682406751135, 'G': -1.5520933544103905, 'B': -1.7558674751807395}})>>>features.moment(output_type="pandas")meanmedianvarskewkurtosisR0.5774510.5882350.152206-0.019444-1.941968G0.5215690.4882350.1213610.184166-1.552093B0.5598040.5490200.1238090.045080-1.755867No! I want a HSV Color space feature :(It can set another color space! Default will be RGB.>>>features.moment(output_type="one_col",color_space="CMY")array([0.42254902,0.47843137,0.44019608,0.41176471,0.51176471,0.45098039,0.15220588,0.12136101,0.12380911,0.01944425,-0.18416571,-0.04508015,-1.94196824,-1.55209335,-1.75586748])>>>features.moment(output_type="dict",color_space="HSL")defaultdict(<class'dict'>, {'mean': {'H': 0.50798329143793874, 'S': 0.52775831413836383, 'L': 0.61421568627450984}, 'median': {'H': 0.51915637553935423, 'S': 0.62898601603182969, 'L': 0.52156862745098043}, 'var': {'H': 0.13290200013401141, 'S': 0.10239897927552907, 'L': 0.051550124951941563}, 'skew': {'H': -0.078898095002588917, 'S': -0.83203104238315984, 'L': 1.0202366337483093}, 'kurtosis': {'H': -1.2599104562470791, 'S': -0.87111810912637022, 'L': -0.7502836585891588}})>>>features.moment(output_type="pandas",color_space="HSV")meanmedianvarskewkurtosisH0.5079830.5191560.132902-0.078898-1.259910S0.5952360.7495430.122723-1.028366-0.768867V0.8558820.8647060.013867-0.155656-1.4981792.2 ColourfulnessReferenceD. Hasler and S.E.Suesstrunk, ``Measuring colorfulness in natural images," Human
Vision andElectronicImagingVIII, Proceedings of the SPIE, 5007:87-95, 2003.Sample>>>features=ImageReader.read_from_single_file("ife/data/strawberry.jpg")>>>features.colourfulness()0.184417003666247143. Future workIORead from URL linksRead from Base64Sliding windowVideo filesColor spaceCMYKCIE LabXYZFeaturesValue normalizeAverage GradientLBPHistogramColor harmonyEntropyBrightness measureContrast measureSaturation measureNaturalnessColor fidelity metricSaliency mapFisher vectorVGG16, 19 layer featureand more...4. Author@Collonville5. LicenceBSD-3-Clause