multi-image-deepNet-SVBRDF-acquisition icon indicating copy to clipboard operation
multi-image-deepNet-SVBRDF-acquisition copied to clipboard

Can't run testModel or trainNetwork

Open MikeZski opened this issue 1 year ago • 1 comments

Hi,

First of all I wanted to say that this is an amazing project and I see huge potential to use it in cultural heritage fields. A lot of museums are not digitising properly paintings because of lack of funds. Your work is something that can give amazing possibilities to popularise art in the internet. Thanks for doing it!

As my knowledge about coding is quite limited there may be a stupid errors I'm making so I will explain everything I have done.

  1. Machine I'm trying to use is using Windows and Nvidia 3070 mobile
  2. I installed python 3.7, tensorflow 1.15 cuda toolkit 10.0.313, numpy, imageio and opencv.
  3. I have created a folder on desktop with cloned repository from github. C:\Users\Pan\Desktop\deep_brdf\multi-image-deepNet-SVBRDF-acquisition
  4. I have placed one tiff photo with dimentions of 256x256 in "testImagesExamples". Later on I added "test" folder and copied same image (It is only one but even if I put multiple errors are the same)
  5. I have downloaded pretrained weights adn put in main folder in "checkpointTrained" folder.
  6. I run ./testModel.sh --mode eval
  7. I got this error:

2023-03-31 15:20:03.432947: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll WARNING:tensorflow:From pixes2Material.py:138: The name tf.set_random_seed is deprecated. Please use tf.compat.v1.set_random_seed instead.

WARNING:tensorflow:From pixes2Material.py:166: The name tf.reset_default_graph is deprecated. Please use tf.compat.v1.reset_default_graph instead.

loaded NoMaxPooling = False loaded includeDiffuse = True loaded loss = mixed loaded nbTargets = 4 loaded ngf = 64 loaded useCoordConv = True loaded useLog = True loaded which_direction = AtoB NoAugmentationInRenderings = False NoMaxPooling = False batch_size = 1 checkpoint = checkpointTrained feedMethod = files firstAsGuide = False fixImageNb = True imageFormat = png includeDiffuse = True inputMode = folder input_dir = testImagesExamples/ input_size = 256 jitterLightPos = False jitterRenderings = False jitterViewPos = False l1_weight = 100.0 logOutputAlbedos = False loss = mixed lr = 2e-05 maxImages = 5 max_epochs = None max_steps = None mode = test nbDiffuseRendering = 3 nbInputs = 10 nbSpecularRendering = 6 nbTargets = 4 ngf = 64 output_dir = OutputDirectory poolingtype = max progress_freq = 50 renderingScene = staticViewPlaneLight save_freq = 5000 seed = 178845285 summary_freq = 50 testFolder = test test_freq = 20000 trace_freq = 0 trainFolder = train useAmbientLight = False useCoordConv = True useLog = True which_direction = AtoB Traceback (most recent call last): File "pixes2Material.py", line 391, in main() File "pixes2Material.py", line 180, in main data.loadPathList(a.inputMode, a.mode, a.mode == "train") File "C:\Users\Pan\Desktop\deep_brdf\multi-image-deepNet-SVBRDF-acquisition\dataReader.py", line 74, in loadPathList self.__loadFromDirectory(runMode, randomizeOrder) File "C:\Users\Pan\Desktop\deep_brdf\multi-image-deepNet-SVBRDF-acquisition\dataReader.py", line 92, in __loadFromDirectory raise ValueError("The list of filepaths is empty :( : " + path) ValueError: The list of filepaths is empty :( : testImagesExamples/test

I tried to retrain the network.

  1. I have downloaded dataset and put in another folder. C:\Users\Pan\Desktop\deep_brdf\materialsData_multi_image
  2. I try to run ./trainNetwork.sh "/c/Users/Pan/Desktop/deep_brdf/materialsData_multi_image/train"
  3. I got this message "2023-03-31 15:18:41.929123: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll WARNING:tensorflow:From pixes2Material.py:138: The name tf.set_random_seed is deprecated. Please use tf.compat.v1.set_random_seed instead.

NoAugmentationInRenderings = False NoMaxPooling = False batch_size = 8 checkpoint = None feedMethod = render firstAsGuide = False fixImageNb = False imageFormat = png includeDiffuse = True inputMode = folder input_dir = myInputDir input_size = 512 jitterLightPos = True jitterRenderings = False jitterViewPos = True l1_weight = 100.0 logOutputAlbedos = True loss = mixed lr = 2e-05 maxImages = 5 max_epochs = None max_steps = 400000 mode = train nbDiffuseRendering = 3 nbInputs = 1 nbSpecularRendering = 6 nbTargets = 4 ngf = 64 output_dir = trainedModel/ poolingtype = max progress_freq = 500 renderingScene = movingViewHemiSpotLightOneSurface save_freq = 10000 seed = 2020137482 summary_freq = 1000 testFolder = test test_freq = 20000 trace_freq = 0 trainFolder = train useAmbientLight = True useCoordConv = True useLog = True which_direction = AtoB Traceback (most recent call last): File "pixes2Material.py", line 391, in main() File "pixes2Material.py", line 180, in main data.loadPathList(a.inputMode, a.mode, a.mode == "train") File "C:\Users\Pan\Desktop\deep_brdf\multi-image-deepNet-SVBRDF-acquisition\dataReader.py", line 71, in loadPathList raise ValueError("The input path doesn't exist :(!") ValueError: The input path doesn't exist :(! " I assume that an error is on my side but I'm lacking skills to find where. I'm trying to solve this issue on my own but it is already second day of trying everything and I got still no results. I would appreciate a lot if you can take a look and tell me where is the problem.

Best regards, Mike.

MikeZski avatar Mar 31 '23 13:03 MikeZski

Hello,

Thanks for your message, it looks like it's a problem with finding the image you are trying to run. I don't think the current version of this code supports tiff images. Could you try converting it to PNG just for the test?

Valentin

valentin-deschaintre avatar Apr 05 '23 13:04 valentin-deschaintre