Giter VIP home page Giter VIP logo

Comments (15)

RachelCmy avatar RachelCmy commented on June 23, 2024 1

Hi,

in our code, we only load the HR files and the LR files are generated on the fly.
To load both the LR and HR, you can change the function loadHR() in dataloader.py

Best regards.

from tecogan.

zzhan127 avatar zzhan127 commented on June 23, 2024 1

I really appreciated that. It works for me with some modification.

Have a nice day,
Zeyu

from tecogan.

zzhan127 avatar zzhan127 commented on June 23, 2024 1

from tecogan.

zzhan127 avatar zzhan127 commented on June 23, 2024

Thanks.

from tecogan.

zzhan127 avatar zzhan127 commented on June 23, 2024

Do you have any suggestions on how to load the LR data? I tried to use loadHR() with different tar_size to load my LR images inside frvsr_gpu_data_loader() and replaced the tf_data_gaussDownby4(curHR, 1.5) with curLR, curLR = LR_images[frame_t] , but the results is weird.

LR_batch_list, LR_num_image_list_HR_t_cur = loadHRfunc(LRFLAGS, 32)
LR_images = list(LR_batch_list[FLAGS.RNN_N::])
def getLR():
    return LR_images[frame_t]
curLR = getLR()
input_images.append( curLR )

Thank you

from tecogan.

RachelCmy avatar RachelCmy commented on June 23, 2024

LR should be loaded at the same time with the HR and they should be preprocessed in the same way consistently. Otherwise, you will get randomly shuffled LR and HR that mismatches.

Hope this file is helpful (not tested!):
loadLRHR.py.txt
line 22 should be changed according to LR paths.
line 34 & 96 makes sure that LR and HR are consistent.

Since LR is pre-generated, it is important that the relationship between LR and HR is invariant to data augmentation methods such as flipping and cropping.
For example, if LR_1 = tf.image.resize_images(HR_1, LRsize), LR_1 and HR_1 are sensitive to flipping,
because tf.image.flip_left_right( LR_1 ) != tf.image.resize_images( tf.image.flip_left_right( HR_1 ), LRsize).

from tecogan.

caijie0620 avatar caijie0620 commented on June 23, 2024

@zzhan127 Hello! I am using this code. Can you tell me where did you make the change? Thanks.

from tecogan.

zzhan127 avatar zzhan127 commented on June 23, 2024

from tecogan.

alessiapacca avatar alessiapacca commented on June 23, 2024

@zzhan127 @RachelCmy so basically in the code we don't have to call
(main.py, row 280) rdata = frvsr_gpu_data_loader(FLAGS, useValidat) anymore, but
rdata = frvsr_data_loader(FLAGS, useValidat)
?

from tecogan.

alessiapacca avatar alessiapacca commented on June 23, 2024

Hey @zzhan127
can I ask you if it worked for you? I am using that script, and it doesn't give me any error, but once I train with my own images I obtain a super strange result as output. Did you have the chance to retrain it and then test it to see if it worked?

@RachelCmy could you please answer me? I have some questions about this that I would like to discuss with the author of the code

from tecogan.

zzhan127 avatar zzhan127 commented on June 23, 2024

from tecogan.

alessiapacca avatar alessiapacca commented on June 23, 2024

Hi, I don't have any problem using it. This model takes several days for training, the results looks reasonable to me after 3 days of training.

On Sat, Oct 24, 2020 at 5:20 AM Alessia Paccagnella < @.***> wrote: Hey @zzhan127 https://github.com/zzhan127 can I ask you if it worked for you? I am using that script, and it doesn't give me any error, but once I train with my own images I obtain a super strange result as output. Did you have the chance to retrain it and then test it to see if it worked? @RachelCmy https://github.com/RachelCmy could you please answer me? I have some questions about this that I would like to discuss with the author of the code — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#17 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGF5GYJCZ7TMNSI3FN5SPXLSMKL33ANCNFSM4H4IGFQQ .

@zzhan127 Thank you very much for your reply. In your case, how did you obtained your own pairs of HR and LR images?

from tecogan.

zzhan127 avatar zzhan127 commented on June 23, 2024

from tecogan.

alessiapacca avatar alessiapacca commented on June 23, 2024

@zzhan127 thank you very much for your answer, again!
alright, I will try.
Just one last question, that I do not understand. What should tar_size be? In the original code, they wrote

tar_size = (FLAGS.crop_size * 4 ) + int(1.5 * 3.0) * 2 # crop_size * 4, and Gaussian blur margin
k_w_border = int(1.5 * 3.0)

while in the new script, tar_size is only FLAGS.crop_size * 4

do you have any idea of the reason?

from tecogan.

alessiapacca avatar alessiapacca commented on June 23, 2024

@zzhan127 thank you very much for your answers, you were helpful!

May I ask one last thing?
When you trained, if you remember, did you start training from the pretrained model FRVSR or from scratch?

from tecogan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.