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

CPU mode without cupy #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion process_stylization.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import torchvision.utils as utils

from photo_smooth import Propagator
from smooth_filter import smooth_filter

# Load Propagator
p_pro = Propagator()
Expand Down Expand Up @@ -70,6 +69,7 @@ def stylization(p_wct, content_image_path, style_image_path, content_seg_path, s
print("NotImplemented: The CPU version of smooth filter has not been implemented currently.")
return

from smooth_filter import smooth_filter
with Timer("Elapsed time in post processing: %f"):
out_img = smooth_filter(output_image_path, content_image_path, f_radius=15, f_edge=1e-1)
out_img.save(output_image_path)