Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Style Transfer

Implementation of Our Bachelor's in Computer Engineering Minor Project Paper.
Arbitrary Style Transfer for Nepali Landscapes and Sites using Transformers

Team Members

Aaditya Joshi
Abhijeet K.C.
Ankit Neupane
Lijan Shrestha

Usage

Inference/Testing on Local Machine

1. Clone the Repository

git clone https://github.com/AadityaX86/StyleTransfer.git
cd StyleTransfer

2. Set Up a Virtual Environment

It 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

3. Install Requirements

Ensure you have Python installed (Python 3.11.* preferred).
Then, install dependencies from requirements.txt:

pip install -r requirements.txt

Make sure you have the Checkpoint downloaded if you are not using your Trained Model

4. Prepare Input Images

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: .jpg or .png

5. Run the Code

Execute the following command in your terminal:

python main.py

Training on Local Machine

  • Make a Directory .\Data\train\content and .\Data\train\style and put respective Content Images and Style Images there.
  • Make a Directory .\.models\models_scratch for Training from Scratch or .\.models\models_checkpoint for Training from Checkpoint
  • Make a Directory .\.logs\logs_scratch or .\.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

More Info

  • You can Download the Checkpoint At: Checkpoint
    • The Checkpoint should be At: .\.models\models_checkpoint
  • 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

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages