bobbens / sketch_simplification

Models and code related to sketch simplification of rough sketches.
https://esslab.jp/~ess/research/sketch_master/
Other
726 stars 103 forks source link

Migrating to torch 1.x #12

Open ramilmsh opened 5 years ago

ramilmsh commented 5 years ago

I have updated the models to torch native (they are available through link in README.md) and modified the simplify.py accordingly. All models seem to work

liuqk3 commented 5 years ago

@ramilmsh Hi, thanks for your work. Have you validated the converted models? And can you public your models for PyTorch 1.0+? Thanks a lot

ramilmsh commented 5 years ago

Have you validated the converted models?

I have run several images on it and it seemed to work on all models.

And can you public your models for PyTorch 1.0+?

I have uploaded them on Mega, since I have no CDN account.

Trass3r commented 4 years ago

Note that the original models aren't even available anymore, at least atm.

ramilmsh commented 4 years ago

Note that the original models aren't even available anymore, at least atm.

I think I have a copy on my local machine, I will try to upload them to the same mega folder in a few days

imcomking commented 3 years ago

It works well at pytorch 1.5.1 thank you

Xu-Justin commented 2 years ago

I have tried this code. It's working!

junguler commented 1 year ago

just tried this and it works, thanks

junguler commented 1 year ago

just a quick question tho, how can i change the model? i've tried --model model_gan.pth but it throws out an error

Traceback (most recent call last):
  File "C:\git\sketch_simplification\simplify.py", line 15, in <module>
    model_import = __import__(opt.model, fromlist=['model', 'immean', 'imstd'])
ModuleNotFoundError: No module named 'model_gan.pth'; 'model_gan' is not a package

same error with the other 3 models

Xu-Justin commented 1 year ago

just a quick question tho, how can i change the model? i've tried --model model_gan.pth but it throws out an error

Traceback (most recent call last):
  File "C:\git\sketch_simplification\simplify.py", line 15, in <module>
    model_import = __import__(opt.model, fromlist=['model', 'immean', 'imstd'])
ModuleNotFoundError: No module named 'model_gan.pth'; 'model_gan' is not a package

same error with the other 3 models

  1. Have you downloaded the model?
  2. How do you run the code? (i.e. the command you use to run the code)

I have tried changing the model and it's working, could you provide more details to recreate the error?

junguler commented 1 year ago

I have tried changing the model and it's working, could you provide more details to recreate the error?

yes, i've downloaded the 4 .pth models from that mega link, i also have the 4 .t7 models that the download script downloads, both sets of files are at the root of the folder

i'm running this with miniconda on windows 10, here is the command i've tried to run

python simplify.py --img face.jpg --out test.png --model model_gan.pth

the program works fine without specifying model but i can't get it working with any of the 8 model files

Xu-Justin commented 1 year ago

yes, i've downloaded the 4 .pth models from that mega link, i also have the 4 .t7 models that the download script downloads, both sets of files are at the root of the folder

i'm running this with miniconda on windows 10, here is the command i've tried to run

python simplify.py --img face.jpg --out test.png --model model_gan.pth

the program works fine without specifying model but i can't get it working with any of the 8 model files

You shouldn't include .pth in the model arguments.

python simplify.py --img face.jpg --out test.png --model model_gan
junguler commented 1 year ago

You shouldn't include .pth in the model arguments.

worked perfectly, thank you for taking the time to explain this to me