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

Several problem fixes #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
models
Params
__pycache__
6 changes: 3 additions & 3 deletions Input_mouse_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def __init__(self, mode_list, paint_size, up_sketch_view , parent=None):
self.model[key] = AE_Model()
self.model[key].initialize(self.opt)
self.model[key].eval()

self.mask[key] = cv2.cvtColor(cv2.imread('heat/' + key + '.jpg'), cv2.COLOR_RGB2GRAY).astype(np.float) / 255
mask_filename = "heat/{0}.jpg".format(key) if (key != '') else "heat/bg.jpg"
self.mask[key] = cv2.cvtColor(cv2.imread(mask_filename), cv2.COLOR_RGB2GRAY).astype(np.float) / 255
self.mask[key] = np.expand_dims(self.mask[key], axis=2)

#for input and refine weight
Expand Down Expand Up @@ -301,4 +301,4 @@ def start_Shadow(self):

def thread_shadow(self):
while True:
self.start_Shadow();
self.start_Shadow();
31 changes: 25 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
# install necessary library
pip install pyqt5
pip install Pillow
pip install scipy
pip install dominate
pip install opencv-python
# install necessary library
pip install pyqt5
pip install Pillow
pip install scipy
pip install dominate

# On many systems Qt for the desktop does not correspond to the
# libraries that OpenCV was compiled against.
#
# In particular those libraries are
#
# libQtDBus
# libQtCore
# libQtGui
#
# This will cause a segmentation fault when the program is run
#
# see https://github.com/skvark/opencv-python/issues/46
#
# In that case, uncomment the following to force pip to build opencv-python
# from source.
#
# pip install --no-binary opencv-python opencv-python
#
pip install opencv-python