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

ValueError: too many values to unpack (expected 3) #10

Open
wwzjer opened this issue Jun 6, 2024 · 6 comments
Open

ValueError: too many values to unpack (expected 3) #10

wwzjer opened this issue Jun 6, 2024 · 6 comments

Comments

@wwzjer
Copy link

wwzjer commented Jun 6, 2024

Dear author,

thanks for sharing the source code of your brilliant paper! When I was trying to run through the pre-training code with 1.6K CT volumes, I met a bug in the line:
img, labels, crops = batch
with ValueError: too many values to unpack (expected 3)
After that, I dig into the "batch" and found it is comprised of dictionaries with keys "image", "foreground_start_coord", "foreground_end_coord". Are these three corresponding to the "img, labels, crops" in your code? Please point out if I made a mistake.

Thank you so much in advance!

@Luffy03
Copy link
Owner

Luffy03 commented Jun 7, 2024

Hi, many thanks for your attention to our work!
Seems that you did not use the 'voco_augmentation' transform.

VoCoAugmentation(args, aug=True)

It will change the original dict to 'img, labels, crops', you can refer to https://github.com/Luffy03/VoCo/blob/main/utils/data_utils.py.

@wwzjer
Copy link
Author

wwzjer commented Jun 7, 2024

Thanks for your quick reply!
I also found that VoCoAugmentation's function is to generate the 'img, labels, crops'. But I think I did not turn it off when I was running. I have only changed "get_loader(args)" as "get_loader_1k(args)" in the voco_train.py and changed the directory of dataset in the data_utils.py. Could you help me diagnose the issue please? Thanks!

@Luffy03
Copy link
Owner

Luffy03 commented Jun 8, 2024

It is weird. Would you please provide your 'data_utils.py' file?

@Luffy03
Copy link
Owner

Luffy03 commented Jun 8, 2024

And do you have problems with the 10k pre-training?

@wwzjer
Copy link
Author

wwzjer commented Jun 8, 2024

Thanks for the suggestions. I have tried to use get_loader instead of get_loader_1k and the issue did not appear. I think it is due to the difference of train_transforms in two functions. But anyway, I think it is fixed.
BTW, I was wondering how many GPU memory do you totally use for pertaining. Thanks!

@Luffy03
Copy link
Owner

Luffy03 commented Jun 8, 2024

Great to hear that!
Currently, we use one H800 (80G) GPU for training 10k CT.

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