All Projects → svenski → Duckgoose

svenski / Duckgoose

Licence: mit
Utils for fast.ai course

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Duckgoose

Food 101 Keras
Food Classification with Deep Learning in Keras / Tensorflow
Stars: ✭ 646 (+1600%)
Mutual labels:  image-classification
Image classification cifar 10
Image Classification on CIFAR-10 Dataset using Multi Layer Perceptrons in Python from Scratch.
Stars: ✭ 18 (-52.63%)
Mutual labels:  image-classification
Pytorch Toolbelt
PyTorch extensions for fast R&D prototyping and Kaggle farming
Stars: ✭ 942 (+2378.95%)
Mutual labels:  image-classification
Cvpr2021 Paper Code Interpretation
cvpr2021/cvpr2020/cvpr2019/cvpr2018/cvpr2017 论文/代码/解读/直播合集,极市团队整理
Stars: ✭ 8,075 (+21150%)
Mutual labels:  image-classification
Isic2018 Part3
Source code for 'ISIC 2018: Skin Lesion Analysis Towards Melanoma Detection' - Task 3 (Classification)
Stars: ✭ 17 (-55.26%)
Mutual labels:  image-classification
Grocery Product Classification
Implementation of the paper "A Hierarchical Grocery Store Image Dataset with Visual and Semantic Labels"
Stars: ✭ 23 (-39.47%)
Mutual labels:  image-classification
Paddleclas
A treasure chest for image classification powered by PaddlePaddle
Stars: ✭ 625 (+1544.74%)
Mutual labels:  image-classification
Albumentations
Fast image augmentation library and an easy-to-use wrapper around other libraries. Documentation: https://albumentations.ai/docs/ Paper about the library: https://www.mdpi.com/2078-2489/11/2/125
Stars: ✭ 9,353 (+24513.16%)
Mutual labels:  image-classification
Dmsmsgrcg
A photo OCR project aims to output DMS messages contained in sign structure images.
Stars: ✭ 18 (-52.63%)
Mutual labels:  image-classification
Retrained Inceptionv3
Retrained InceptionV3 image classification model
Stars: ✭ 15 (-60.53%)
Mutual labels:  image-classification
Ailab
Experience, Learn and Code the latest breakthrough innovations with Microsoft AI
Stars: ✭ 6,896 (+18047.37%)
Mutual labels:  image-classification
Eccv2020 Code
ECCV 2020 论文开源项目合集,同时欢迎各位大佬提交issue,分享ECCV 2020开源项目
Stars: ✭ 827 (+2076.32%)
Mutual labels:  image-classification
Concise Ipython Notebooks For Deep Learning
Ipython Notebooks for solving problems like classification, segmentation, generation using latest Deep learning algorithms on different publicly available text and image data-sets.
Stars: ✭ 23 (-39.47%)
Mutual labels:  image-classification
Awesome Project Ideas
Curated list of Machine Learning, NLP, Vision, Recommender Systems Project Ideas
Stars: ✭ 6,114 (+15989.47%)
Mutual labels:  image-classification
Deep learning projects
Stars: ✭ 28 (-26.32%)
Mutual labels:  image-classification
Hrnet Image Classification
Train the HRNet model on ImageNet
Stars: ✭ 633 (+1565.79%)
Mutual labels:  image-classification
Node Image Classification
A simple example on Image Classification in Node.js with TensorFlow.js
Stars: ✭ 23 (-39.47%)
Mutual labels:  image-classification
Channel Pruning
Channel Pruning for Accelerating Very Deep Neural Networks (ICCV'17)
Stars: ✭ 979 (+2476.32%)
Mutual labels:  image-classification
Deepmodels
TensorFlow Implementation of state-of-the-art models since 2012
Stars: ✭ 33 (-13.16%)
Mutual labels:  image-classification
Orange3 Imageanalytics
🍊 🎑 Orange3 add-on for dealing with image related tasks
Stars: ✭ 24 (-36.84%)
Mutual labels:  image-classification

duckgoose

Utility scripts for the online fast.ai course. There are two main parts: one to download and organise arbitrary image classes, and one to highlight what parts of an image is activating the decision for a classification.

  1. Utility for Lesson 1 experimentation with external image classes. The script:
  • Downloads images from google images for specific classes
  • Sanity checks that images can be opened and have three channels
  • Organises the images into separate folders (train/valid/test + classes) as expected by the fast.ai library
  1. Utility for creating Class Activation Maps for both classifications.

Prerequisites

  • chromedriver is required. On ubuntu/debian: sudo apt-get chromium-chromedriver

Installation

pip install duckgoose

Usage

Fetching, sanity checking and organising images

from duckgoose import fetchImagesAndPrepForClassification

# dictionary structure `class_name => search term`
image_classes = { 'ducks' : 'ducks -rubber' , 'geese' : 'geese' }
download_path = '/home/myuser/data/downloaded_from_google'
output_path = '/home/myuser/data/ducksgeese/'
number_of_images = 100

fetchImagesAndPrepForClassification(image_classes, download_path, output_path, number_of_images)

Create Class Activation Maps (CAM)

Note: This was implemented for fastai v2 part 1. Here is a full example of creating a class activation maps for ducks and geese using fast ai.

from fastai.imports import *
from fastai.transforms import *
from fastai.conv_learner import *
from fastai.model import *
from fastai.dataset import *
from fastai.sgdr import *
from fastai.plots import *

from duckgoose.cam import calculateAndChartHeatZoneFor

PATH = "data/ducksgeese/"
sz=224
arch = resnet34
bs = 64

m = arch(True)
m = nn.Sequential(*children(m)[:-2], 
                  nn.Conv2d(512, 2, 3, padding=1), 
                  nn.AdaptiveAvgPool2d(1),
                  Flatten(), 
                  nn.LogSoftmax())

tfms = tfms_from_model(arch, sz, aug_tfms=transforms_side_on, max_zoom=1.1)
data = ImageClassifierData.from_paths(PATH, tfms=tfms, bs=bs)
learn = ConvLearner.from_model_data(m, data)

learn.freeze_to(-4)

_, val_tfms = tfms_from_model(learn.model, sz)

learn.fit(0.01, 2)

calculateAndChartHeatZoneFor('./data/ducksgeese/test/ducks/ducks_427.jpg', val_tfms, learn)

Duck and goose heatmap

License

The MIT License (MIT)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].