Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to make this setup and running at Google Colab? #25

Open
SamuelChih opened this issue Sep 3, 2020 · 12 comments
Open

Possible to make this setup and running at Google Colab? #25

SamuelChih opened this issue Sep 3, 2020 · 12 comments

Comments

@SamuelChih
Copy link

Hi, thanks for making this great model!

With the recent meme "dame da ne" using deep fake to create face swap video, and someone set it up on Google Colab to make it easy to use for people like who have little to no coding experience. I wonder is possible for FALdetector to achieve the same thing?

@hirusnov
Copy link

hirusnov commented Sep 6, 2020

It is very easy to install and use on colab.
Step by step:
1: open new notebook and set runtime is GPU
2: connect to google drive for storage
3: " %cd " cd to drive folder
4: !git clone https://github.com/PeterWang512/FALdetector.git
5: %cd to folder FALdetector
6: Follow (2) Run our models on FALdetector github
Goodluck to u

@burninglay
Copy link

Hi,when I trying to use on colab in step5:
%cd it shows: /root
I have already connect to my google drive
how to chance to folder FALdetector?

@hirusnov
Copy link

hirusnov commented Oct 19, 2020

Hi,when I trying to use on colab in step5:
%cd it shows: /root
I have already connect to my google drive
how to chance to folder FALdetector?

Type that code:
import os
os.chdir('/content/drive/My Drive/folder name')
after that, you can confirm it worked with the pwd command like this: !pwd

in step 3: use %cd /content/drive/MyDrive/ and start to clone github
after clone: use %cd FALdetector to go to folder

@burninglay
Copy link

Hi,when I trying to use on colab in step5:
%cd it shows: /root
I have already connect to my google drive
how to chance to folder FALdetector?

Type that code:
import os
os.chdir('/content/drive/My Drive/folder name')
after that, you can confirm it worked with the pwd command like this: !pwd

in step 3: use %cd /content/drive/My\ Drive/ and start to clone github
after clone: use %cd FALdetector to go to folder

thx for helping. I have run the model successfully:
Probability being modified by Photoshop FAL: 5.25%
But how can I save the Process picture(like Suggest undo ) as the demo shows?

@hirusnov
Copy link

Hi,when I trying to use on colab in step5:
%cd it shows: /root
I have already connect to my google drive
how to chance to folder FALdetector?

Type that code:
import os
os.chdir('/content/drive/My Drive/folder name')
after that, you can confirm it worked with the pwd command like this: !pwd
in step 3: use %cd /content/drive/My\ Drive/ and start to clone github
after clone: use %cd FALdetector to go to folder

thx for helping. I have run the model successfully:
Probability being modified by Photoshop FAL: 5.25%
But how can I save the Process picture(like Suggest undo ) as the demo shows?

I dont know how to save result too. I think we can change the code, but i dont know.

@SamuelChih
Copy link
Author

Hi,when I trying to use on colab in step5:
%cd it shows: /root
I have already connect to my google drive
how to chance to folder FALdetector?

Type that code:
import os
os.chdir('/content/drive/My Drive/folder name')
after that, you can confirm it worked with the pwd command like this: !pwd
in step 3: use %cd /content/drive/My\ Drive/ and start to clone github
after clone: use %cd FALdetector to go to folder

thx for helping. I have run the model successfully:
Probability being modified by Photoshop FAL: 5.25%
But how can I save the Process picture(like Suggest undo ) as the demo shows?

Hi, can you share the link to your colab model?
I have trouble install the valset to the colab, plus there is no point to reinvent the wheel.

@hirusnov
Copy link

Hi,when I trying to use on colab in step5:
%cd it shows: /root
I have already connect to my google drive
how to chance to folder FALdetector?

Type that code:
import os
os.chdir('/content/drive/My Drive/folder name')
after that, you can confirm it worked with the pwd command like this: !pwd
in step 3: use %cd /content/drive/My\ Drive/ and start to clone github
after clone: use %cd FALdetector to go to folder

thx for helping. I have run the model successfully:
Probability being modified by Photoshop FAL: 5.25%
But how can I save the Process picture(like Suggest undo ) as the demo shows?

Hi, can you share the link to your colab model?
I have trouble install the valset to the colab, plus there is no point to reinvent the wheel.

What wrong with you guys?
Can you explain more?

@SamuelChih
Copy link
Author

Hi,when I trying to use on colab in step5:
%cd it shows: /root
I have already connect to my google drive
how to chance to folder FALdetector?

Type that code:
import os
os.chdir('/content/drive/My Drive/folder name')
after that, you can confirm it worked with the pwd command like this: !pwd
in step 3: use %cd /content/drive/My\ Drive/ and start to clone github
after clone: use %cd FALdetector to go to folder

thx for helping. I have run the model successfully:
Probability being modified by Photoshop FAL: 5.25%
But how can I save the Process picture(like Suggest undo ) as the demo shows?

Hi, can you share the link to your colab model?
I have trouble install the valset to the colab, plus there is no point to reinvent the wheel.

What wrong with you guys?
Can you explain more?

image
https://colab.research.google.com/drive/1qbZ53V3Lzwe5f_nRRJi2LaXXCV_Iw1Ij?usp=sharing
Idk where did I do wrong, but it keep showing invalid syntax, after like 2 hr of trial and error this is where I gave up last time...

@hirusnov
Copy link

Hi,when I trying to use on colab in step5:
%cd it shows: /root
I have already connect to my google drive
how to chance to folder FALdetector?

Type that code:
import os
os.chdir('/content/drive/My Drive/folder name')
after that, you can confirm it worked with the pwd command like this: !pwd
in step 3: use %cd /content/drive/My\ Drive/ and start to clone github
after clone: use %cd FALdetector to go to folder

thx for helping. I have run the model successfully:
Probability being modified by Photoshop FAL: 5.25%
But how can I save the Process picture(like Suggest undo ) as the demo shows?

Hi, can you share the link to your colab model?
I have trouble install the valset to the colab, plus there is no point to reinvent the wheel.

What wrong with you guys?
Can you explain more?

image
https://colab.research.google.com/drive/1qbZ53V3Lzwe5f_nRRJi2LaXXCV_Iw1Ij?usp=sharing
Idk where did I do wrong, but it keep showing invalid syntax, after like 2 hr of trial and error this is where I gave up last time...

Ohhh I see
you must use !python instead of python on colab
Goodluck guy

@hirusnov
Copy link

Hi,when I trying to use on colab in step5:
%cd it shows: /root
I have already connect to my google drive
how to chance to folder FALdetector?

Type that code:
import os
os.chdir('/content/drive/My Drive/folder name')
after that, you can confirm it worked with the pwd command like this: !pwd
in step 3: use %cd /content/drive/My\ Drive/ and start to clone github
after clone: use %cd FALdetector to go to folder

thx for helping. I have run the model successfully:
Probability being modified by Photoshop FAL: 5.25%
But how can I save the Process picture(like Suggest undo ) as the demo shows?

Hi, can you share the link to your colab model?
I have trouble install the valset to the colab, plus there is no point to reinvent the wheel.

What wrong with you guys?
Can you explain more?

image
https://colab.research.google.com/drive/1qbZ53V3Lzwe5f_nRRJi2LaXXCV_Iw1Ij?usp=sharing
Idk where did I do wrong, but it keep showing invalid syntax, after like 2 hr of trial and error this is where I gave up last time...

you don't need to download valset, it is only used to validate the model's accuracy

@hirusnov
Copy link

hirusnov commented Dec 29, 2020

Download the dataset

cd data
!bash download_valset.sh
cd ..

Run evaluation script. Model weights need to be downloaded.

!python eval.py --dataroot data --global_pth weights/global.pth --local_pth weights/local.pth --gpu_id 0
This is true code for download valset and test

@konsumer
Copy link

konsumer commented Apr 20, 2021

I made one you can fork, see #31 In the issue I have some notes on more efficient file stuff (via Drive) including saving the files in a Drive dir, and several ways to collect input images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants