Code Monkey home page Code Monkey logo

cid's Introduction

Kaggle competition: IEEE's Signal Processing Society - Camera Model Identification

This code provides a simple solution based on transfer learning (ResNet50) for the camera model identification kaggle competion. The solution:

  • achieves 50% accuracy on public leaderboard
  • achieves 90% validation accuracy for training set and 95% accuracy for manipulated training set.
  • takes about 16 hours to run on a macbook pro (no GPUs) -- most of the time is for one time computation
  • the data files created by the code will take about 30 GB of space on the hard disk

The code has been tested, but there is no guarantee of correctness. If you do find bugs, please let me know.

How to use the code:

  1. This code uses keras/tensorflow with python 3.5 -- see the conda environment file
  2. Place the training data in folder data/train, place testing data in the folder data/test. The folder data/train should have 10 subdirectories corresponding to 10 camera models.
  3. Generate manipulated training data by running data/create_manip_data_py - this should take about one hour to run
  4. Extract patches and compute resnet features by running data/create_resnet.py -- this should take about 12 hours to run
  5. Run training and make predictions by running Network/run_network.py -- this should take about an hour

The overall solution simply computes resnet features for patches extracted from close to center of the image. We train two models, one for unaltered image and one for manipulated images and use the corresponding model to make predictions.

Hat tip to IgorMuniz (https://www.kaggle.com/igormunizims/pre-processing-for-data-augmentation) for the code for generating manipulated images.

cid's People

Contributors

yuanqing811 avatar

Watchers

James Cloos avatar MiliasV avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.