TensorFlow implementation of AlexNet and its training and testing on ImageNet ILSVRC 2012 dataset

Overview

AlexNet training on ImageNet LSVRC 2012

alt text

This repository contains an implementation of AlexNet convolutional neural network and its training and testing procedures on the ILSVRC 2012 dataset, all using TensorFlow.

Folder tf contains code in the "classic TensorFlow" framework whereas code in the tf_eager directory has been developed with TensorFlow's new impearative style, TensorFlow eager.

The two implementations are independent and refer to the READMEs inside the folders for specific instruction on how to train and to test.

References

  • Alex Krizhevsky, Ilya Sutskever and Geoffrey E. Hinton. ImageNet Classification with Deep Convolutional Neural Networks. Advances in Neural Inforamtion Processing Systems 25, 2012.
  • Olga Russakovsky°, Jia Deng°, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg and Li Fei-Fei. (° = equal contribution) ImageNet Large Scale Visual Recognition Challenge. IJCV, 2015
Comments
  • model testing

    model testing

    Hi, I have trained my model using ILSVRC2012 dataset, after 10 epochs , I have tested the model with provided image I have got the following output with probabilities

    python classify.py ./lussari.jpg

    alp - score: 0.32444486022 valley, vale - score: 0.176716804504 monastery - score: 0.0272926297039 castle - score: 0.0269635356963 radio telescope, radio reflector - score: 0.0263287965208 stone wall - score: 0.0236576907337 dam, dike, dyke - score: 0.0211586020887 cliff, drop, drop-off - score: 0.0195624642074 church, church building - score: 0.0162345394492 ox - score: 0.0147680761293 mountain tent - score: 0.014573732391 oxcart - score: 0.013046768494 solar dish, solar collector, solar furnace - score: 0.0118312025443 bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky Mountain sheep, Ovis canadensis - score: 0.0116224717349 megalith, megalithic structure - score: 0.0104170087725 volcano - score: 0.0089854830876 Siberian husky - score: 0.0086589967832 king penguin, Aptenodytes patagonica - score: 0.00850845314562 fountain - score: 0.00850336998701 dalmatian, coach dog, carriage dog - score: 0.00831394083798

    when I am comparing with calrifai I am not getting the results same as like in clarifai. How will I get same as like clarifai tags

    opened by rakashi 13
  • loss progress

    loss progress

    Hi Matteo,

    I was wondering how was the loss progress during your training? For example, after 3 epochs loss didnt change at all for me. It is around 8.1 and not dropping. I was wondering how much loss was for you when you finished training, and how much we can expect to be after 49 epochs?

    All the best.

    opened by Sh0lim 9
  • Estimate Training Time

    Estimate Training Time

    Hi, I have successfully started training using ILSVRC2012 Train and Validation datasets. The training dataset contains 12,81,167 images and Validation dataset contains 50,000 images. I am running this code on Intel i5 Processor with 16GB RAM and 2TB HDD. I have kept default 90 epochs. How much time it will take to complete 90 epochs. I am expecting for one epoch may be it will take one and half day time. Can we reduce the time to complete training faster ?

    opened by rakashi 4
  • Can PIL be replaced with 'pillow' ?

    Can PIL be replaced with 'pillow' ?

    There is no PIL import for Python 3.6.3, according to this post, PIL is abandoned and shouldn't be used.

    https://www.reddit.com/r/Python/comments/5mph2q/how_do_you_install_pil_to_python_360/

    opened by jefflomax 2
  • Please Upload ILSVRC2012 meta.mat,ILSVRC2012_validation_ground_truth.txt

    Please Upload ILSVRC2012 meta.mat,ILSVRC2012_validation_ground_truth.txt

    Hi I am training ILSVRC2012 data using Alexnet Architecture, Here I am having train and validation data but I am not having the ILSVRC2012 meta.mat, ILSVRC2012_validation_ground_truth.txt. So I am using at meta.mat place I kept ILSVRC2014 meta.mat file and also I kept meta.mat ILSVRC2014_validation_ground_truth.txt

    So here I am using 2012 dataset with 2014 meta.mat,ILSVRC2014_validation_ground_truth.txt. I am thinking due to this files I am not getting image tags accurately ?

    Please can any one upload ILSVRC2012 meta.mat and ILSVRC2012_validation_ground_truth.txt files, I have tried but I didn't get

    opened by rakashi 2
  • IOError: cannot identify image file u'/home/ImageNet/ILSVRC2012/train/n01688243/n01688243_9115.JPEG'

    IOError: cannot identify image file u'/home/ImageNet/ILSVRC2012/train/n01688243/n01688243_9115.JPEG'

    I am getting following error while running your code: IOError: cannot identify image file u'/home/ImageNet/ILSVRC2012/train/n01688243/n01688243_9115.JPEG' I got to know that some files are already corrupt in imageNet dataset. Could you please tell me how to resolve this issue. Thanks

    opened by sakshi404 1
  • Wonder about lrn parameters.

    Wonder about lrn parameters.

    Hi. I am curious about the 'local response normalization' layer parameters you set. The paper case is a little bit different from what you set except 'beta'.

    What does it mean to be different from the actual setting?

    opened by sicnarf1a 1
  • Upload Imagenet text files (provide links to get the text files)

    Upload Imagenet text files (provide links to get the text files)

    Hi While I am training Imagenet data I didn't found the below two files meta.mat ILSVRC2012_validation_ground_truth.txt Can any one provide the above files

    opened by rakashi 1
  • test model get very low accuracy

    test model get very low accuracy

    hi,i had try my model use 90 epochs.here is my result: image but when i run test.py,i get very low accuracy, image

    i am so confused.i wonder know is something wrong?

    opened by iodncookie 8
  • loss didn't get down

    loss didn't get down

    Hi, I am using your code on both VGG and your original alexnet networks. The way I manage my data is exact following your instructions, and I tried to use np_util.to_categorial() function instead, but the loss is always around 8 even after 100+ epochs, and 16 on the original code. Do you have any idea what's the probable problem of it? Any help is appreciated, thanks a lot!

    opened by chutongz 2
  • TF eager version training and testing

    TF eager version training and testing

    To try the new TensorFlow Eager style, I decided to implement the old scripts using it. They are contained in the tf_eager folder whereas the old code (unchanged) was moved to the tf folder.

    Unfortunately, I do not have the time and the resources to train and test the new scripts on ImageNet. Anyone would like to take this? Only to check the constistency with the old ones. Thank you!

    help wanted 
    opened by matteo-dunnhofer 1
Owner
Matteo Dunnhofer
A bear experimenting AI.
Matteo Dunnhofer
PyTorch implementation of CVPR 2020 paper (Reference-Based Sketch Image Colorization using Augmented-Self Reference and Dense Semantic Correspondence) and pre-trained model on ImageNet dataset

Reference-Based-Sketch-Image-Colorization-ImageNet This is a PyTorch implementation of CVPR 2020 paper (Reference-Based Sketch Image Colorization usin

Yuzhi ZHAO 11 Jul 28, 2022
Base pretrained models and datasets in pytorch (MNIST, SVHN, CIFAR10, CIFAR100, STL10, AlexNet, VGG16, VGG19, ResNet, Inception, SqueezeNet)

This is a playground for pytorch beginners, which contains predefined models on popular dataset. Currently we support mnist, svhn cifar10, cifar100 st

Aaron Chen 2.4k Dec 28, 2022
A PyTorch Image-Classification With AlexNet And ResNet50.

PyTorch 图像分类 依赖库的下载与安装 在终端中执行 pip install -r -requirements.txt 完成项目依赖库的安装 使用方式 数据集的准备 STL10 数据集 下载:STL-10 Dataset 存储位置:将下载后的数据集中 train_X.bin,train_y.b

FYH 4 Feb 22, 2022
NFT-Price-Prediction-CNN - Using visual feature extraction, prices of NFTs are predicted via CNN (Alexnet and Resnet) architectures.

NFT-Price-Prediction-CNN - Using visual feature extraction, prices of NFTs are predicted via CNN (Alexnet and Resnet) architectures.

null 5 Nov 3, 2022
Reproduction process of AlexNet

PaddlePaddle论文复现杂谈 背景 注:该repo基于PaddlePaddle,对AlexNet进行复现。时间仓促,难免有所疏漏,如果问题或者想法,欢迎随时提issue一块交流。 飞桨论文复现赛地址:https://aistudio.baidu.com/aistudio/competitio

null 19 Nov 29, 2022
Pytorch implementation of "Training a 85.4% Top-1 Accuracy Vision Transformer with 56M Parameters on ImageNet"

Token Labeling: Training an 85.4% Top-1 Accuracy Vision Transformer with 56M Parameters on ImageNet (arxiv) This is a Pytorch implementation of our te

蒋子航 383 Dec 27, 2022
Neural Magic Eye: Learning to See and Understand the Scene Behind an Autostereogram, arXiv:2012.15692.

Neural Magic Eye Preprint | Project Page | Colab Runtime Official PyTorch implementation of the preprint paper "NeuralMagicEye: Learning to See and Un

Zhengxia Zou 56 Jul 15, 2022
Source Code for DialogBERT: Discourse-Aware Response Generation via Learning to Recover and Rank Utterances (https://arxiv.org/pdf/2012.01775.pdf)

DialogBERT This is a PyTorch implementation of the DialogBERT model described in DialogBERT: Neural Response Generation via Hierarchical BERT with Dis

Xiaodong Gu 67 Jan 6, 2023
My personal code and solution to the Synacor Challenge from 2012 OSCON.

Synacor OSCON Challenge Solution (2012) This repository contains my code and solution to solve the Synacor OSCON 2012 Challenge. If you are interested

null 2 Mar 20, 2022
Code for our method RePRI for Few-Shot Segmentation. Paper at http://arxiv.org/abs/2012.06166

Region Proportion Regularized Inference (RePRI) for Few-Shot Segmentation In this repo, we provide the code for our paper : "Few-Shot Segmentation Wit

Malik Boudiaf 138 Dec 12, 2022
Third party Pytorch implement of Image Processing Transformer (Pre-Trained Image Processing Transformer arXiv:2012.00364v2)

ImageProcessingTransformer Third party Pytorch implement of Image Processing Transformer (Pre-Trained Image Processing Transformer arXiv:2012.00364v2)

null 61 Jan 1, 2023
A set of simple scripts to process the Imagenet-1K dataset as TFRecords and make index files for NVIDIA DALI.

Overview This is a set of simple scripts to process the Imagenet-1K dataset as TFRecords and make index files for NVIDIA DALI. Make TFRecords To run t

null 8 Nov 1, 2022
Python scripts for performing object detection with the 1000 labels of the ImageNet dataset in ONNX.

Python scripts for performing object detection with the 1000 labels of the ImageNet dataset in ONNX. The repository combines a class agnostic object localizer to first detect the objects in the image, and next a ResNet50 model trained on ImageNet is used to label each box.

Ibai Gorordo 24 Nov 14, 2022
Code of PVTv2 is released! PVTv2 largely improves PVTv1 and works better than Swin Transformer with ImageNet-1K pre-training.

Updates (2020/06/21) Code of PVTv2 is released! PVTv2 largely improves PVTv1 and works better than Swin Transformer with ImageNet-1K pre-training. Pyr

null 1.3k Jan 4, 2023
A complete, self-contained example for training ImageNet at state-of-the-art speed with FFCV

ffcv ImageNet Training A minimal, single-file PyTorch ImageNet training script designed for hackability. Run train_imagenet.py to get... ...high accur

FFCV 92 Dec 31, 2022
CIFAR-10_train-test - training and testing codes for dataset CIFAR-10

CIFAR-10_train-test - training and testing codes for dataset CIFAR-10

Frederick Wang 3 Apr 26, 2022
Implementation of Restricted Boltzmann Machine (RBM) and its variants in Tensorflow

xRBM Library Implementation of Restricted Boltzmann Machine (RBM) and its variants in Tensorflow Installation Using pip: pip install xrbm Examples Tut

Omid Alemi 55 Dec 29, 2022
This is the official source code for SLATE. We provide the code for the model, the training code, and a dataset loader for the 3D Shapes dataset. This code is implemented in Pytorch.

SLATE This is the official source code for SLATE. We provide the code for the model, the training code and a dataset loader for the 3D Shapes dataset.

Gautam Singh 66 Dec 26, 2022