GithubHelp home page GithubHelp logo

rsomani95 / shot-type-classifier Goto Github PK

View Code? Open in Web Editor NEW
177.0 16.0 40.0 11.33 MB

Detecting cinema shot types using a ResNet-50

License: Other

Jupyter Notebook 99.90% Python 0.09% Shell 0.01%
fastai deep-learning convolutional-neural-networks resnet-50 resnet applied-deep-learning applied-machine-learning pytorch heatmaps filmmaking

shot-type-classifier's People

Contributors

rsomani95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shot-type-classifier's Issues

How to adapt the method for a stream?

The examples work well for a fixed set of images, but I'm having trouble trying to adjust them for a stream. I've asked the general question on SO, but I was wondering if there was a cleaner way to do this with model you've got.

I'm not fully understanding why we have to create a data object in the first place -- especially with files in both "train" and "valid"

    data = ImageDataBunch.from_folder(
        path,
        "train",
        "valid",
        size=(375, 666),
        ds_tfms=get_tfms(),
        bs=1,
        resize_method=ResizeMethod.SQUISH,
        num_workers=0,
    ).normalize(imagenet_stats)

couldn't we just load them model, apply the preprocessing, and then output the result?

Thanks for the help, the model looks to be amazing!

Links are not downloadable

Hi Rahul,

I see that the link aren't reachable anymore. Would it be possible to get access to the dataset?
I am a student in the MSc in Machine Learning at KTH Royal Institute of Technology in Sweden. I am very much interested in the computer vision research applied to Movies and TV Series. I stumped into your GitHub project and I find it fascinating. I was wondering if it would be possible to get access to the model and the dataset.

Thank you!

Model usage in the wild and other observations

Thanks again for putting this together. After combing through about a dozen movies, I can say that the models works brilliantly on almost every scene. It struggles with action scenes, but that's an understandable failure, as the shot itself is sometimes dynamic. Amazing work!

I've been experimenting with watching only specific types of shots and seeing how this would alter the expression or dynamic of the film. I've put together a fun video of only the non-speaking medium close shots here

https://www.youtube.com/watch?v=K0_O34eoC68&feature=youtu.be

BEFRAME is an AI-powered project to ONLY keep the scenes where the character is framed and not speaking. They can just "be" in the frame. Explore the characters and director's choices from Legally Blonde, The Exorcist, Fight Club, Pitch Perfect, Die Hard, Pretty Woman, The Princess Bride, and Requiem For a Dream.
Each movie is first clipped by visual content, and then analyzed for shot type. Only the Medium Close-up (MCU) shots are preserved. Google's speech detection is used to filter out any shots with detected words. Finally, the shots are strung back together in sequence.

I think there's a lot more one could do with this! If you've got any feedback let me know, otherwise feel free to close this issue as it's just a comment.

Dependencies failing

After Pytorch 1.14.0 came out, something changed.

After runninng:

pip install http://download.pytorch.org/whl/cpu/torch-1.0.0-cp36-cp36m-linux_x86_64.whl
pip install fastai

I get error ERROR: torchvision 0.5.0 has requirement torch==1.4.0, but you'll have torch 1.0.0 which is incompatible., after which running the predictions will result in: ImportError: cannot import name 'Optional'.

After checking all available versions of fastai, one can see that new version of pip only allows you to install 1.0.60.

Fastai 1.0.60 works with torchvision 0.5.0, which requires torch 1.4.0, but that leads to many bugs.

We would need to make a pull request for fixing that.

EDIT: My bad, the newest pip does provide other version of fastai; yolk only tells the newest version for some reason. I will try to figure out working configuration and let you know if I do.

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.