Skip to content
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

error while running U-Net_3D_ZeroCostDL4Mic.ipynb version 7 #325

Open
jazberna1 opened this issue Aug 28, 2024 · 1 comment
Open

error while running U-Net_3D_ZeroCostDL4Mic.ipynb version 7 #325

jazberna1 opened this issue Aug 28, 2024 · 1 comment
Assignees

Comments

@jazberna1
Copy link

Hi,

I just run the U-Net_3D_ZeroCostDL4Mic.ipynb notebook:

In section 3.1. Choosing parameters this line fails:

tgt_sample = tifffile.imread(training_target_sample).astype(np.bool)

the error is:
AttributeError: module 'numpy' has no attribute 'bool'.

I believe it works by changing np.bool to bool

In class SampleImageCallback(Callback) in the init method the code fails with:
AttributeError: can't set attribute 'model'

I believe it works by changing self.model = model to self.set_model(model)

Also this line in the dice_coefficient function fails due to type differences:
y_true_f = K.flatten(y_true)

I believe if works by replacing it by y_true_f = tf.cast(y_true_f, tf.float32)

The notebook I am using is:

7. Version log
v2.1.3:

Changed default voxel size for Bioimage Model Zoo format export
v2.1.2:

Prediction results should now correctly be saved as volumes
Updated deprecated code for saving BigTIFF volumes
v2.1.1:

Replaced all absolute pathing with relative pathing
v2.1:

Updated notebook to use with TensorFlow 2.11

The full requirements file is exported to replicate the environment

Bug in the preprocessing to be compatible with the BioImage Model Zoo is solved.

Installs fpdf2, curates the format of the pdf and fixes bugs in keras versioning writting.
@jazberna1 jazberna1 changed the title erroes while running U-Net_3D_ZeroCostDL4Mic.ipynb version 7 error while running U-Net_3D_ZeroCostDL4Mic.ipynb version 7 Sep 6, 2024
@IvanHCenalmor IvanHCenalmor self-assigned this Dec 17, 2024
@IvanHCenalmor
Copy link
Collaborator

Hi @jazberna1,

First of all, sorry for the delay 😞 Thanks a lot for finding these bugs and suggesting the solutions for them.

I made different changes to the U-Net 3D notebook, between those changes there are almost all the changes that you have proposed. The self.model = model I didn't change it because for me there was no problem with it. But if you continue finding errors with it I will work on it and change it.

While it's under testing the new version of the notebook it's on a different branch. You can find the updated notebook here:
U-Net_3D_ZeroCostDL4Mic.ipynb Open In Colab

Please feel free to test it and let us know if you encounter any further issues or if this resolves the problem.

Thanks again for your valuable feedback!

Iván

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants