Comments (19)
Thank you for your interest in this work. It should be possible to run on CPU, although it might be quite slow. The calls that you have made i.e. remove net.cuda() and loading onto the cpu would have been my suggestion, but they appear not to have worked for you. Can you provide more detail please on the batch size 0 issue? Does this mean you getting back no data from the data loader?
from curl.
Sure, The error is that one:
2022-02-09 14:19:26,374 INFO ##############################
2022-02-09 14:19:26,374 INFO Loading Adobe5k dataset ...
/home/francescadigiacomo/anaconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py:478: UserWarning: This DataLoader will create 10 worker processes in total. Our suggested max number of worker in current system is 8, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.
warnings.warn(_create_warning_msg(
2022-02-09 14:19:26,375 INFO Performing inference with images in directory: ./adobe5k_dpe/
0
0
Traceback (most recent call last):
File "main.py", line 352, in
main()
File "main.py", line 128, in main
inference_evaluator.evaluate(net, epoch=0)
File "path/CURL/metric.py", line 153, in evaluate
psnr_avg = psnr_avg / num_batches
ZeroDivisionError: float division by zero
from curl.
I don't think this is an issue with running on the CPU. I believe it is to do with the structure of the inference directory. Can you please show the directory structure you have.
from curl.
from curl.
from curl.
Thanks, can you also share the command you enter at the command line?
from curl.
python3 main.py --inference_img_dirpath=./adobe5k_dpe/ --checkpoint_filepath=./pretrained_models/adobe_dpe/curl_validpsnr_23.073045286204017_validloss_0.0701291635632515_testpsnr_23.584083321292365_testloss_0.061363041400909424_epoch_510_model.pt
the difference with your suggestion is :/pretrained_models/adobe_dpe, because from git clone there are not the models inside pretrained_models
from curl.
Got it, so I suspect I know the problem here. The code will look in curl_example_test_input for the images. It does this as in line 298 of data.py it is looking for a directory with "input" in the name - see here. The images listed in images_inference.txt are not those in curl_example_test_input. To get this to work you should add into images_inference.txt those image file names that are in curl_example_test_input, removing the extensions.
from curl.
Good, I will try you suggestions, thank you so much. Another questions, please. From you point of view, is it possible to use your model and apply them with a cpp implementation? Do you know if could be some issue moving from python to cpp for your implementation?
from curl.
Sorry, I followed your suggestion but it seems to not work with the same result
from curl.
Change this to img_id = file.split(".")[0]
from curl.
Thank you so much, but another problem occurred:
What do you think can be the issue?
from curl.
What is the contents of img_filepath? Try and print it out to debug: print(img_filepath)
from curl.
it seems correct, but it returns the same issue
from curl.
input_img_filepath has no root directory or path attached to it, so the loading function is unable to find the image
from curl.
Good, I will try you suggestions, thank you so much. Another questions, please. From you point of view, is it possible to use your model and apply them with a cpp implementation? Do you know if could be some issue moving from python to cpp for your implementation?
Yes, my suggested approach is to compile the model to Onnx and that will allow you to inference it from a cpp application. More detail here.
from curl.
Hi,
thank you so much for your suggestions about Cpp implementation, for the path problem, I tried this command, forcing the directory from the command but it is not able to find the image, where can I include the directory?
python3 main.py --inference_img_dirpath=/home/francescadigiacomo/inventia-image-tools/TEST_IMAGE_ENHANCEMENT/linux_inventia/CURL/adobe5k_dpe/ --checkpoint_filepath=/home/francescadigiacomo/inventia-image-tools/TEST_IMAGE_ENHANCEMENT/linux_inventia/CURL/pretrained_models/curl_validpsnr_23.073045286204017_validloss_0.0701291635632515_testpsnr_23.584083321292365_testloss_0.061363041400909424_epoch_510_model.pt
from curl.
I will need a little more debug info from you to help. What are the contents of this?
from curl.
Closing due to inactivity
from curl.
Related Issues (20)
- how to train the raw data(unit16) to jpg without quality loss HOT 1
- FileNotFoundError: [Errno 2] No such file or directory: './pretrained_models/curl_validpsnr_23.073045286204017_validloss_0.0701291635632515_testpsnr_23.584083321292365_testloss_0.061363041400909424_epoch_510_model.pt' HOT 2
- it seems the batch size must be 1? HOT 1
- Problems when using images of size 256x256 HOT 2
- Lightroom image exporting HOT 2
- hi,is it normal for loss HOT 1
- RuntimeError: Given groups=1, weight of size [16, 3, 3, 3], expected input[1, 4, 343, 514] to have 3 channels, but got 4 channels instead HOT 1
- ZeroDivisionError: float division by zero HOT 2
- The weights and the architecture are not the same HOT 1
- Batch size > 1 version HOT 2
- Inference Pretrained Model with CPP scratch HOT 1
- inference of test images HOT 1
- Bigger Batch size HOT 1
- Can't reproduce results HOT 1
- Training/Validation/Test splits link is down HOT 1
- Doubt about results HOT 4
- 请教一下这块实现的原理 HOT 2
- dim HOT 1
- Pretrained model results
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curl.