This repo contains the code for Python Course that I take for NWPU students.
This ReadMe describes how to use the code.
In the beginning, I assume you are running your code on Windows 10 or 11 Platform.
-
You are required to setup Python environment with version 3.8 or higher. I recommend miniconda package from https://repo.anaconda.com/miniconda/Miniconda3-py38_4.12.0-Windows-x86_64.exe
-
After you have installed Python. Your terminal is assumed to have python and pip in Path environment variable.
-
Clone this repo by
git clone https://github.com/ainrichman/PythonCourseCode-NWPU
- Enter the cloned repo in your local disk. Then you will need to install necessary python packages by:
pip install -r requirements.txt
-
Install Google Chrome explorer. View the version of your Chrome for example :106.0.5249.119.
-
Download Chrome driver corresponding to your Chrome version from
https://chromedriver.chromium.org/downloads
. -
If you have issues with step 5 and 6. I prepared the Chrome offline installer and Chrome Driver in this repo in the folder ‘/chrome’.
-
Copy the Chrome driver to the folder
/crawler
and/test
of this repo. -
(Optional) I strongly recommend you use Jetbrains' Python Development IDE Pycharm from
https://www.jetbrains.com/pycharm/
. You can run Pycharm and import this repo. Then you will be able to run the examples of this repo directly by Pycharm. -
Download Stable diffusion model from https://pan.baidu.com/s/1wSQIH246RL0J-MonXbElTQ code:3auv. Copy the whole folder to /diffstable/. (Running Diffuse stable AI painting model requires you have at least 4G GPU Memory). You have to donwload NVIDIA Driver from https://www.nvidia.com/download/index.aspx according to your GPU card. If you have other issues with the instructions above. Please contact with me.
-
For the first time run Faceswap, you need to download inswapper_128.onnx file and copy it to faceswap/. url: https://huggingface.co/ezioruan/inswapper_128.onnx/blob/main/inswapper_128.onnx