You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have develop a solution for the optimization part with cython.
I will share you the file to paste in folder where the trimap module is located. You need to dezip it.
And in trimap_module.py add theses lines :
from trimap.faster_remake import set_value
And replace (in trimap function) this :
for i in range(0,row):
for j in range (0,col):
if (remake[i,j] != 0 and remake[i,j] != 255):
remake[i,j] = 127
by this :
remake = np.array(set_value(remake, 127))
Hello,
Thank you for your work, it's very useful.
I have develop a solution for the optimization part with cython.
I will share you the file to paste in folder where the trimap module is located. You need to dezip it.
And in trimap_module.py add theses lines :
from trimap.faster_remake import set_value
And replace (in trimap function) this :
for i in range(0,row):
for j in range (0,col):
if (remake[i,j] != 0 and remake[i,j] != 255):
remake[i,j] = 127
by this :
remake = np.array(set_value(remake, 127))
You can change the value if you want.
Hope that's help.
Have a good day and enjoy :)
faster_remake.cpython-36m-x86_64-linux-gnu.zip
The text was updated successfully, but these errors were encountered: