Coder Social home page Coder Social logo

fitrialif / adapting-c3d-keras Goto Github PK

View Code? Open in Web Editor NEW

This project forked from texastony/adapting-c3d-keras

0.0 2.0 0.0 3.7 MB

An example of how to adapt the C3D CNN for another problem. Really a fork of https://github.com/axon-research/c3d-keras

C++ 1.69% Makefile 0.84% Python 96.36% Shell 1.11%

adapting-c3d-keras's Introduction

This project is still a work in progress. Please follow this repo for updates

What is this project?

C3D was released in 2015, and it is not difficult to recreate the network in Tensorflow or Keras. I was able to use C3D for a activity recognition project with moderate success. During that process, I encountered many challenges, several of which I am still addressing. I wish to share my solutions to these challenges.

C3D

C3D is a deep neural network developed by CS deparment at Dartmouth and Facebook’s AI lab. Its main website is here, the repo for is here, and the paper is available here. It was developed and released in Caffe, but others have recreated it in Tensorflow and Keras. Caffe looks brilliant, but I am not about to try and learn every ML/NN/Analytic library/framework out there. (Frankly that would be an awesome Job).

C3D is a very popular model for video classification and activity recognition. It has appeared in many papers responding to the ActivityNet Challenge for Action proposal regions, held by CVPR. There are certantily other models for video classifcation. If you are looking for a list of papers with open source code, may I direct you to: This Repo of Papers, which I have found very useful.

What I used C3D for:

I had 9 hours of 1080 by 1920 video in which I needed to detect the activity of 21 different tools. At first, I used C3D as a feature extracture. I took the output of layer 13, the last pooling layer, and fit my own relu dense net to it with categorical cross entropy and dropout. My results were terrible, but I think that I will see better results with this method if I better pre-process the videos or re-scale C3D to match the ratio of my videos. More on this later.

I then attempted to fine tune the entire network. This network, if my understanding is correct, has 80 million trainable parameters. Fine tuning the whole network is somewhat of memory and multi-processing challenge as compared to a straight forward modeling challenge. However, I had decent results, with an accuracy of %71 on my top 4 classes. And that was only with a few epochs of training. Granted, an epoch took 4 hours. But I think that this is the better route for the problem I was working on.

What of this porject is currently useful?

None, but I will release a stable product in the comming weeks. I am in the process of generalizing my code so that it can work on novel datasets. I am also working on optimizations that take advantage of gpus every step of the process instead of just in Tensorflow. For that, I may have to switch to mxnet instead of numpy…

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.