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

Cellpose 2 - Evaluate your model and generate predictions issues #314

Open
Yaelupu opened this issue Mar 31, 2024 · 0 comments
Open

Cellpose 2 - Evaluate your model and generate predictions issues #314

Yaelupu opened this issue Mar 31, 2024 · 0 comments

Comments

@Yaelupu
Copy link

Yaelupu commented Mar 31, 2024

Hi,

I have trained a model based on the cyto 2 model.

When I tried to evaluate the new model with Use_the_current_trained_model: checked. I assumed it does not need any additional info, but this failed. So I filled the options of:
If not, indicate which model you want to assess: own model
If using your own model, please provide the path to the model (not the folder): - I gave the path to the pdf generated after
training the model.
This still produced an error:

IndexError Traceback (most recent call last)
in <cell line: 17>()
19 list_files = sorted([i for i in os.listdir(model_path+"/"+model_name) if not i.endswith('.pdf')])
20
---> 21 QC_model_path = model_path+"/"+model_name+"/"+list_files[0]
22 QC_model = "Own_model"
23

IndexError: list index out of range

Also, in the section Generate prediction(s) from unseen dataset (2D and 2D + t data). I get the error:

UnpicklingError Traceback (most recent call last)
in <cell line: 103>()
103 if model_choice == "Own_model":
104 channels=[segment_channel,nuclear_channel]
--> 105 model = models.CellposeModel(gpu=True, pretrained_model=Prediction_model)
106
107 print("Own model enabled")

3 frames
/usr/local/lib/python3.10/dist-packages/torch/serialization.py in _legacy_load(f, map_location, pickle_module, **pickle_load_args)
1256 "functionality.")
1257
-> 1258 magic_number = pickle_module.load(f, **pickle_load_args)
1259 if magic_number != MAGIC_NUMBER:
1260 raise RuntimeError("Invalid magic number; corrupt file?")

UnpicklingError: invalid load key, '%'.

Thanks!
Yael

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

1 participant