GithubHelp home page GithubHelp logo

vinno97 / realtime-pytorch-cyclegan-and-pix2pix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from junyanz/pytorch-cyclegan-and-pix2pix

29.0 29.0 4.0 8.11 MB

Real-time Image-to-image translation in PyTorch using the webcam

License: Other

Python 87.42% TeX 1.00% Shell 2.39% MATLAB 1.05% Jupyter Notebook 8.14%

realtime-pytorch-cyclegan-and-pix2pix's People

Contributors

3288103265 avatar alanyee avatar alexkassil avatar andyli avatar bilal2vec avatar charlesdove avatar cmacho avatar deadmau6 avatar eickenberg avatar guopzhao avatar iver56 avatar jpmerc avatar junyanz avatar kagudkovart avatar lambdawill avatar layumi avatar levirve avatar naruto-sasuke avatar nat-chan avatar orenkatzir avatar ruotianluo avatar salisbury-espinosa avatar simontreu avatar skuldur avatar ssnl avatar taesungp avatar tariqahassan avatar tylercarberry avatar vinno97 avatar yichunk 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

Watchers

 avatar

realtime-pytorch-cyclegan-and-pix2pix's Issues

Allow video files to run in realtime

Background:
Currently the command line option for videosource accepts type int which makes things difficult for using video files. But the VideoCapture() class from opencv can accept integers and the file path for a video source.

TODO:
The simple solution is to change the command line option and then do the type checking for either a valid file or an integer.

self.real_A = input['A' if AtoB else 'B'].to(self.device) KeyError: 'A'

Hi! I was trying to use test_video.py on a file, but i'm using Google Colab so I had to do some modifications to your code...

It read frames but the data it returned didn't look right, for exemple:

`{'Real_A': tensor([[[[-1., -1., -1.],
[-1., -1., -1.],
[-1., -1., -1.],
...,
[-1., -1., -1.],
[-1., -1., -1.],
[-1., -1., -1.]],

     [[-1., -1., -1.],
      [-1., -1., -1.],
      [-1., -1., -1.],
      ...,
      [-1., -1., -1.],
      [-1., -1., -1.],
      [-1., -1., -1.]],

     [[-1., -1., -1.],
      [-1., -1., -1.],
      [-1., -1., -1.],
      ...,
      [-1., -1., -1.],
      [-1., -1., -1.],
      [-1., -1., -1.]],

     ...,

     [[-1., -1., -1.],
      [-1., -1., -1.],
      [-1., -1., -1.],
      ...,
      [-1., -1., -1.],
      [-1., -1., -1.],
      [-1., -1., -1.]],

     [[-1., -1., -1.],
      [-1., -1., -1.],
      [-1., -1., -1.],
      ...,
      [-1., -1., -1.],
      [-1., -1., -1.],
      [-1., -1., -1.]],

     [[-1., -1., -1.],
      [-1., -1., -1.],
      [-1., -1., -1.],
      ...,
      [-1., -1., -1.],
      [-1., -1., -1.],
      [-1., -1., -1.]]]])}

Max value of tensor: tensor(1.)
Min value of tensor: tensor(-1.)`

It isn't returning any more data than this, which means, no B data, or Fake_B data

What could be causing this and how can I fix this?

Thanks, amazing project

Update realtime with the newest changes from CycleGAN

Background:
This is a fork from the original pytorch-CycleGAN-and-pix2pix. The original has a bunch of new updates and improved code so it would be nice to update this fork so that the realtime video can use these new features. Luckily I have already patched the realtime feature into the latest release of pytorch-CycleGAN-and-pix2pix, so it should be pretty easy to bring the latest changes of the original into this fork.

TODO:

  • Sync this fork with the original
  • Change code so that realtime video feature still works

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.