-
Notifications
You must be signed in to change notification settings - Fork 10
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
Request to export bioimage zoo format and transfer into image J #25
Comments
HenriquesLab/ZeroCostDL4Mic#288 I try to use colab but also meet same issue, the issue page link is there |
Hi @jinxsfe
|
Hi, after training. I save that he model on Google Drive, can I go through quality control steps and get LOU for final model from 5.1 to 5.4. |
Whether you were trying to export the model directly after training, from your error message, I can see that you are trying to load "pvol-224-25-0.7-50-0.25.hdf5" which is not the type of checkpoint exported neither in ZeroCostDL4Mic nor in DL4MicEverywhere, did you add any code to the notebook? I don't add anything in the book, the pool-224-25-0.7-50-0.25 just like name for folder, instead of any real means |
The notebook you are using to train, test and export the model. I had trained for long times ago, and I keeped model in my google drive, and I just want to move they into bioimage.IO and go to image J or icy. Whether you were trying to export the model directly after training. From your error message, I can see that you are trying to load "pvol-224-25-0.7-50-0.25.hdf5" which is not the type of checkpoint exported neither in ZeroCostDL4Mic nor in DL4MicEverywhere, did you add any code to the notebook? after finish training, the model will be save the folder, the name is "pvol-224-25-0.7-50-0.25" is name for folder, hdf5 is training record I guess If not, please, try uploading the model following the steps in section 5. Does it compute directly the steps 5.1, 5.2 and 5.3? If not, can you please provide screenshots of all the errors in order? I can run smoothly for 5.1-5.3, but 5.4 |
Can you please indicate what is the notebook and send us screenshots of what you wrote in section 5.1? The notebook is taking the folder name as the name of the model, rather the path to the model (e.g., weights_best.hdf5). It may be that something is missing in the parameters |
notebook is UNET3D, below is 5.0 and 5.1 |
error message is Predicting from checkpoint: high_to_high_288.hdf5
/usr/local/lib/python3.10/dist-packages/keras/src/engine/training.py:3103: UserWarning: You are saving your model as an HDF5 file via `model.save()`. This file format is considered legacy. We recommend using instead the native Keras format, e.g. `model.save('my_model.keras')`.
saving_api.save_model(
WARNING:tensorflow:Compiled the loaded model, but the compiled metrics have yet to be built. `model.compile_metrics` will be empty until you train or evaluate the model.
The model output is not thresholded
WARNING:tensorflow:5 out of the last 13 calls to .predict_function at 0x7a108f6797e0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has reduce_retracing=True option that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/guide/function#controlling_retracing and https://www.tensorflow.org/api_docs/python/tf/function for more details.
1/1 [==============================] - 0s 353ms/step
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/tifffile/tifffile.py in enumarg(enum, arg)
23873 try:
> 23874 return enum(arg)
23875 except Exception:
9 frames /usr/lib/python3.10/enum.py in new(cls, value) ValueError: 1.25 is not a valid RESUNIT During handling of the above exception, another exception occurred: AttributeError Traceback (most recent call last)
AttributeError: 'float' object has no attribute 'upper' The above exception was the direct cause of the following exception: ValueError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/bioimageio/core/build_spec/build_model.py in build_model(weight_uri, test_inputs, test_outputs, input_axes, output_axes, name, description, authors, tags, documentation, cite, output_path, architecture, model_kwargs, weight_type, sample_inputs, sample_outputs, input_names, input_step, input_min_shape, input_data_range, output_names, output_reference, output_scale, output_offset, output_data_range, halo, preprocessing, postprocessing, pixel_sizes, maintainers, license, covers, git_repo, attachments, packaged_by, run_mode, parent, config, dependencies, links, training_data, root, add_deepimagej_config, tensorflow_version, opset_version, pytorch_version, weight_attachments) /usr/local/lib/python3.10/dist-packages/bioimageio/core/build_spec/build_model.py in write_sample_data(input_paths, output_paths, input_axes, output_axes, pixel_sizes, export_folder) /usr/local/lib/python3.10/dist-packages/bioimageio/core/build_spec/build_model.py in write_im(path, im, axes, pixel_size) /usr/local/lib/python3.10/dist-packages/tifffile/tifffile.py in imwrite(file, data, mode, bigtiff, byteorder, imagej, ome, shaped, append, shape, dtype, photometric, planarconfig, extrasamples, volumetric, tile, rowsperstrip, bitspersample, compression, compressionargs, predictor, subsampling, jpegtables, colormap, description, datetime, resolution, resolutionunit, subfiletype, software, metadata, extratags, contiguous, truncate, align, maxworkers, buffersize, returnoffset) /usr/local/lib/python3.10/dist-packages/tifffile/tifffile.py in write(failed resolving arguments) /usr/local/lib/python3.10/dist-packages/tifffile/tifffile.py in enumarg(enum, arg)
ValueError: invalid argument 1.25 |
hi, please, indicate the name of the model in the To export the model, try first exporting the model with the parameters by default, especially for the pixel size. You can leave all the optional parameters such as URL to training data, blanck. |
Hi, I had trained several models and I want to export the trained model in bioimage zoo format, but I am not clear some parameter, even I fill it, but show the error report , for example,
It's necessary to provide training data ID? what ID is and what training data source I should to be provided? I’m
what is file'ID, can you help me export model in bio image zoo? I I want to transfer the model into image J via bio image Zoo.
But the model that I had trained is zerocost4mic unet 3D, so I just want put old model in that part, but failed with DL4mic and zerocost4mic at same time
That's why I need that. can you give me some ideas for what blank should I fill? my email is [email protected]. Appreciate your help
The text was updated successfully, but these errors were encountered: