Implementation of Our Bachelor's in Computer Engineering Minor Project Paper.
Arbitrary Style Transfer for Nepali Landscapes and Sites using Transformers
Aaditya Joshi
Abhijeet K.C.
Ankit Neupane
Lijan Shrestha
git clone https://github.com/AadityaX86/StyleTransfer.git
cd StyleTransferIt is recommended to use a virtual environment to manage dependencies.
-
For Windows
python -m venv venv venv\Scripts\activate
-
For macOS/Linux
python -m venv venv source venv/bin/activate
Ensure you have Python installed (Python 3.11.* preferred).
Then, install dependencies from requirements.txt:
pip install -r requirements.txtMake sure you have the Checkpoint downloaded if you are not using your Trained Model
Place your content and style images in the ./Evaluation directory and rename them as follows:
- Content Image →
image_content.* - Style Image →
image_style.* - Preferred formats:
.jpgor.png
Execute the following command in your terminal:
python main.py- Make a Directory
.\Data\train\contentand.\Data\train\styleand put respective Content Images and Style Images there. - Make a Directory
.\.models\models_scratchfor Training from Scratch or.\.models\models_checkpointfor Training from Checkpoint - Make a Directory
.\.logs\logs_scratchor.\.logs\logs_checkpoint - Run the Following Python Command in Your Terminal for Training from Scratch
python .\train_scratch.py
- Run the Following Python Command in Your Terminal for Training from Checkpoint
python .\train_checkpoint.py
- You can Download the Checkpoint At: Checkpoint
- The Checkpoint should be At:
.\.models\models_checkpoint
- The Checkpoint should be At:
- You can run high resolution images (HD/UHD) in Google Colaboratory.
Recommendation - Choose the highest RAM available on GPU. - You can also Check Out the Repository to Run Through the Website At: https://github.com/Abhijeet-KC/StyleTransferFrontEnd