-
Notifications
You must be signed in to change notification settings - Fork 2
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 create simulated training datasets? #2
Comments
Hi, you need to add the option to generate a synthetic sample from the BioSR dataset. Using the generate_syntetic_sample function, you need to change the part of the code that says to load image net data. There you need to change the file read from imagenet to biosr (load the npz and load one image of the array). This function will generate the psf for the widefield image and the confocal image.
this is the code you need to change. As for the parameters, n_batches is how many folders of n_samples you want to have, shape_img is the size of your image, and kernel_shape is the size of the kernel, for the case of biosr is 256x256 for both, although the kernel can be smaller. Store all data as you need it for training, as the training script will also run the forward convolution model to train the model. Once you have the generated PSFs, run the training script. As you can see from the trainer the code will read the biosr npz obtain the 'y' tensor (your GT) apply the forward model to obtain the inputs and run the physics-informed optimization. |
I tried to generate a psf from the code. I used: generate_training_set(10,1,(256,256,1),(256,256),None) & tried to visualize PSF generated from it. But it says that some value is too large. How to fix this ? How to actually give values to generate a psf? I get the same " too large try a small one" even if I mention a the path of the biosr test.npz generate_training_set(10680,100,(256,256),(256,256),paths="/data/BioSR/npz_folder/") |
I have downloaded BioSR train & test .npz from the links you provided.
Can you please provide examples to generate training datasets using :
generate_training_set(n_samples, n_batches, sample_shape, kernel_shape, paths=None)
and
generate_synthetic_sample()
how to define n_batches, sample_shape, shape_img & kernel_shapes for BioSR please?
The text was updated successfully, but these errors were encountered: