ayoolaolafenwa / PixelLib

Visit PixelLib's official documentation https://pixellib.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when loading a pretrained model

bekhzod-olimov opened this issue · comments

I have downloaded a pretrained "xception_pascalvoc.pb" model and put it to my directory with the python code. But when I run the script it results in OSEerror:

OSError: Unable to open file (file signature not found)

Here is my code:

import pixellib
from pixellib.tune_bg import alter_bg

change_bg = alter_bg()
# change_bg.load_pascalvoc_model("deeplabv3_xception_tf_dim_ordering_tf_kernels.h5")
change_bg.load_pascalvoc_model("./xception_pascalvoc.pb")
change_bg.color_bg("test.jpg", colors = (0,128,0), output_image_name="colored_bg.jpg")