• Stars
    star
    215
  • Rank 183,925 (Top 4 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Image classification for everyone.

Image ATM (Automated Tagging Machine)

Build Status License

Image ATM is a one-click tool that automates the workflow of a typical image classification pipeline in an opinionated way, this includes:

  • Preprocessing and validating input images and labels
  • Starting/terminating cloud instance with GPU support
  • Training
  • Model evaluation

Read the documentation at: https://idealo.github.io/imageatm/

Image ATM is compatible with Python 3.6 and is distributed under the Apache 2.0 license.

Installation

There are two ways to install Image ATM:

  • Install Image ATM from PyPI (recommended):
pip install imageatm
  • Install Image ATM from the GitHub source:
git clone https://github.com/idealo/imageatm.git
cd imageatm
python setup.py install

Usage

Train with CLI

Run this in your terminal

imageatm pipeline config/config_file.yml

Train without CLI

Run the data preparation:

from imageatm.components import DataPrep

dp = DataPrep(
    samples_file = 'sample_configfile.json',
    image_dir = 'sample_dataset/',
    job_dir='sample_jobdir/'
)
dp.run(resize=True)

Run the training:

from imageatm.components import Training

trainer = Training(image_dir=dp.image_dir, job_dir=dp.job_dir)
trainer.run()

Run the evaluation:

from imageatm.components import Evaluation

evaluator = Evaluation(image_dir=dp.image_dir, job_dir=dp.job_dir)
evaluator.run()

Test

Test execution is triggered by these commands:

pip install -e ".[tests, docs]"
pytest -vs --cov=imageatm --show-capture=no --disable-pytest-warnings tests/

Transfer learning

The following pretrained CNNs from Keras can be used for transfer learning in Image-ATM:

  • Xception
  • VGG16
  • VGG19
  • ResNet50, ResNet101, ResNet152
  • ResNet50V2, ResNet101V2, ResNet152V2
  • ResNeXt50, ResNeXt101
  • InceptionV3
  • InceptionResNetV2
  • MobileNet
  • MobileNetV2
  • DenseNet121, DenseNet169, DenseNet201
  • NASNetLarge, NASNetMobile

Training is split into two phases, at first only the last dense layer gets trained, and then all layers are trained.

For each phase the learning rate is reduced after a patience period if no improvement in validation accuracy has been observed. The patience period depends on the average number of samples per class (n_per_class):

  • if n_per_class < 200: patience = 5 epochs
  • if n_per_class >= 200 and < 500: patience = 4 epochs
  • if n_per_class >= 500: patience = 2 epochs

Training is stopped early after a patience period that is three times the learning rate patience to allow for two learning rate adjustments before stopping training.

Contribute

We welcome all kinds of contributions. See the Contribution guide for more details.

Bump version

To bump up the version, use

bumpversion {part} setup.py

Cite this work

Please cite Image ATM in your publications if this is useful for your research. Here is an example BibTeX entry:

@misc{idealods2019imageatm,
  title={Image ATM},
  author={Christopher Lennan and Malgorzata Adamczyk and Gunar Maiwald and Dat Tran},
  year={2019},
  howpublished={\url{https://github.com/idealo/imageatm}},
}

Maintainers

Copyright

See LICENSE for details.

TO-DOs:

  • We are currently using Keras 2.2. The plan is to use tf.keras once TF 2.0 is out. Currently tf.keras is buggy, especially with model saving/loading (tensorflow/tensorflow#22697)

More Repositories

1

imagededup

😎 Finding duplicate images made easy!
Python
5,072
star
2

image-super-resolution

🔎 Super-scale your images and run experiments with Residual Dense and Adversarial Networks.
Python
4,595
star
3

image-quality-assessment

Convolutional Neural Networks to predict the aesthetic and technical quality of images.
Python
2,059
star
4

mongodb-slow-operations-profiler

This java web application collects slow operations from one or multiple mongoDB system(s) in order to visualize and analyze them.
Java
192
star
5

cnn-exposed

🕵️‍♂️ Interpreting Convolutional Neural Network (CNN) Results.
Jupyter Notebook
175
star
6

mongodb-performance-test

multithreaded test tool to test mongodb performances, such as throughput and latency
Java
85
star
7

php-rdkafka-ffi

PHP Kafka client - binding librdkafka via FFI
PHP
76
star
8

terraform-aws-opensearch

Terraform module to provision an OpenSearch cluster with SAML authentication.
HCL
67
star
9

nvidia-docker-keras

Workflow that shows how to train neural networks on EC2 instances with GPU support and compares training times to CPUs
Python
60
star
10

falcon-prediction-app

Simple Machine Learning Web API Example with Falcon
Jupyter Notebook
50
star
11

terraform-emr-pyspark

Quickstart PySpark with Anaconda on AWS/EMR using Terraform
HCL
47
star
12

cloudwatch-alarm-to-ms-teams

Send CloudWatch Alarms to Microsoft Teams via an SNS topic.
TypeScript
33
star
13

terraform-aws-mwaa

Terraform module to setup Managed Workflows with Apache Airflow. (Airflow as managed service by AWS)
HCL
32
star
14

php-middleware-stack

Lightweight PHP 7+ middleware stack based on PSR-15 spec
PHP
29
star
15

jenkins-ci

Minimal example to setup a Jenkins-CI pipeline for data science projects on OpenShift in a couple of minutes.
Dockerfile
27
star
16

logback-redis

Logback Redis Appender with Pipeline-Support for maximum throughput
Java
24
star
17

spring-cloud-stream-binder-sqs

Amazon SQS for Spring Cloud Stream
Java
23
star
18

terraform-provider-controltower

Use AWS Control Tower from Terraform
Go
21
star
19

deckard

Easy-to-use Spring Kafka Producers
Java
16
star
20

flask-openshift-example

Simple Flask example using Docker to deploy on OpenShift 3.
Dockerfile
15
star
21

aws-signing-proxy

Golang HTTP Reverse Proxy to transparently sign requests to AWS endpoints
Go
10
star
22

idealo-orders-api-php-sdk

idealo Direktkauf PHP SDK
PHP
9
star
23

spring-cloud-stream-binder-sns

Amazon SNS for Spring Cloud Stream
Java
9
star
24

logstash-logback-http

Logstash Logback HTTP/HTTPS Appender
Java
8
star
25

idealo.design

idealo Design System Catalog hosted on https://idealo.design
JavaScript
6
star
26

spring-endpoint-exporter

A command-line utility that allows you to export all Endpoints of your Spring Boot Application in OpenAPI 3 format by scanning for specific classes in a jar file or on the file system without actually loading them.
Kotlin
6
star
27

aiven-metadata-prometheus-exporter

A prometheus exporter that provides metadata metrics on Aiven's "service" level
Go
5
star
28

idealo.github.io

Landing page for idealo.
JavaScript
3
star
29

setup-aaga-credentials-action

Securely access AWS from GitHub Actions
TypeScript
3
star
30

terraform-provider-csd

Terraform provider for the common domain product
Go
3
star
31

wheelwright

🎡 Automated build repo for Python wheels (based on spaCy's wheelwright repo)
Python
3
star
32

ds-example-project

Simple Python web application using Anaconda as the package manager. It is intended to be used along Jenkins-CI which is deployed on OpenShift.
Python
3
star
33

test-logger

Junit rule to silence logging for specific tests
Java
1
star
34

offerpage-pairing-task

Java
1
star
35

cctray-hub

github actions to cctray proxy
Kotlin
1
star
36

kafka-ex1

Java
1
star
37

spring-endpoint-exporter-action

An action for the Spring Endpoint Exporter that allows you to export all Endpoints of your Spring Boot Application in OpenAPI 3 format by scanning for specific classes in a jar file or on the file system without actually loading them.
Dockerfile
1
star