Skip to content

Image feature selection performed by using white and black box algorithms

Notifications You must be signed in to change notification settings

jgoodman8/py-image-features-extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Py Image Feature Extractor

Index

  1. Overview
  2. Requirements
  3. Installation
  4. Tests
  5. Run

This package provides implementations of different methods to perform image feature extraction. These methods are though a Python package and a command line interface. Available feature extraction methods are:

  • Convolutional Neural Networks
    • VGG-19
    • ResNet-50
    • DenseNet-50
    • Custom CNN through .h5 file
  • Linear Binary Patterns Histograms (LBPH)
  • Bag of Features (bag-of-visual-words)
    • SIFT
    • SURF
    • KAZE

At the notebooks folder, some proofs-of-concept related to feature extraction and image classification may be found.

System requirements:

  • python >= 3.7.3
  • pip >= 19.1.1

All the package requirements are listed on the install_requires property within the setup.py.

This project may be installed as a python package using:

pip install .

Or using the PyPI package.

All the test suite has been developed using the pytest framework.

# All tests
pytest

# Unit tests of extractors module
pytest image_feature_extractor/tests/extractors

# Unit tests of models module
pytest image_feature_extractor/tests/models

# Validation tests
pytest image_feature_extractor/tests/validation

Model

The package has a command-line entry point configured. This entry point is built using the library Click. To get all the possible commands, use image_feature_extractor --help.

# Example to perform feature extraction using a pre-trained VGG-19
image_feature_extractor extract --deep --src imgs/train --dst vgg19_train.csv --cnn vgg19 --size 200

# Example to perform feature extraction using LBPs
image_feature_extractor extract --lbp --src imgs/train --dst vgg19_train.csv --detector kaze vgg19 --k 100 --size 200 --export --vocabulary-route vocabulary.npy

# Example to perform feature extraction using bag-of-features with KAZE keypoint detector
image_feature_extractor extract --bow --src imgs/train --dst vgg19_train.csv --points 8 --radius 1 --grid 8 --size 200