-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
How to convert a cunet model in .t7 format to a caffe model #360
Comments
waifu2x-caffe requires 3 types of files to run the model. waifu2x side: convert *.t7 format to *.json format. See https://github.com/nagadomi/waifu2x/blob/master/tools/export_all.sh th tools/export_model.lua -i models/my_cunet/noise3_model.t7 -o models/my_cunet/noise3_model.json waifu2x-caffe side: cd ~/waifu2x-caffe/
# Copy cunet to my_cunet
cp -r ./bin/models/cunet ./bin/models/my_cunet
# If *.protobin(cache) exists, delete it.
rm ./bin/models/my_cunet/*.protobin
# Replace the original json file with the converted json file
cp ~/waifu2x/models/my_cunet/noise3_model.json ./bin/models/my_cunet/ test run.
If you want to use GUI, you need to replace the original |
.caffemodel is probably .protobin in waifu2x-caffe. |
Thanks, it works |
I trained the cunet noise level2 model and added an additional Training command line: Conversion command line: |
Did you delete |
Yes, I tried adding the |
As I recall, waifu2x and waifu2x-caffe have different definitions of crop_size. Another possibility is that waifu2x retains ICC Profile and PNG Gamma metadata, which is discarded by waifu2x-caffe. ffmpeg sometimes embeds Gamma parameter in PNG images, make sure that Gamma of the input image is not other than 0.454545.
If it is still different, there may be some implementation differences... |
Thanks a lot! Setting the |
With the help of waifu2x-caffe, I want to use the trained cunet model on other platforms. I saw make_cnet.py, but I didn’t understand the processing method, how to convert a .t7 file to a .caffemodel file
The text was updated successfully, but these errors were encountered: