-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented core modules, CI/CD and basic test.
- Loading branch information
Showing
13 changed files
with
71 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Python CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Run tests | ||
run: | | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
artify.egg-info | ||
src/__pycache__ | ||
test | ||
test | ||
.pytest_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,2 @@ | ||
# Artify | ||
**Artify** is an AI-powered image style transfer bot that transforms ordinary photos into unique artworks inspired by famous artists. This project aims to provide a seamless, user-friendly experience for converting images into stylized renditions with a choice of well-known art styles. | ||
|
||
## Project Features: | ||
1. **Core Functionality**: | ||
- **Famous Art Styles**: Apply styles from famous artists (e.g., Van Gogh, Picasso). | ||
- **Image Upload and Download**: Users can easily upload images and download the stylized results. | ||
- **Style Selection**: Choose from a variety of art styles for each transformation. | ||
- **High-Quality Output**: Produces high-resolution, stylized images. | ||
|
||
2. **Additional Capabilities** (Future Phases): | ||
- **Custom Style Upload**: Allows users to upload and apply their own custom styles. | ||
- **Style Recommendations**: Suggest styles based on the characteristics of the uploaded image. | ||
|
||
## Technical Structure: | ||
- **Backend**: Built using FastAPI or Flask to handle image processing and style application. | ||
- **Frontend**: A simple, intuitive interface (HTML/CSS or React) for image uploads, style selection, and result previews. | ||
- **Deployment**: Includes Docker setup and GitHub Actions for continuous integration and deployment. | ||
- **Comprehensive Documentation**: User guidelines, sample images, and troubleshooting support. | ||
|
||
3. **Future Enhancements**: | ||
- Expanding the style library and custom user options. | ||
- Real-time processing for faster, optimized results. | ||
- A mobile-friendly interface or dedicated app for broader accessibility. | ||
|
||
Artify is a modular AI-powered project to apply artistic styles to images. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from PIL import Image | ||
|
||
class ImageProcessor: | ||
@staticmethod | ||
def preprocess_image(image_path, size=512): | ||
image = Image.open(image_path).convert("RGB") | ||
image = image.resize((size, size)) | ||
return image | ||
|
||
@staticmethod | ||
def save_image(image, output_path): | ||
image.save(output_path) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import torch | ||
import torchvision.transforms as transforms | ||
from PIL import Image | ||
|
||
class StyleTransferModel: | ||
def __init__(self, model_path): | ||
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu") | ||
self.model = torch.load(model_path).to(self.device) | ||
|
||
def apply_style(self, content_image, style_image): | ||
'''Style transfer logic''' | ||
... | ||
|
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
fastapi | ||
uvicorn | ||
torch | ||
pillow | ||
python-multipart | ||
torch | ||
torchvision | ||
numpy | ||
pillow | ||
matplotlib | ||
streamlit | ||
pytest |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def test_example(): | ||
assert 2 + 2 == 4 |