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

Training your model with four channels #5

Open
MehrsaMashhadi opened this issue Sep 24, 2024 · 3 comments
Open

Training your model with four channels #5

MehrsaMashhadi opened this issue Sep 24, 2024 · 3 comments

Comments

@MehrsaMashhadi
Copy link

Hello, I hope you are doing well. how can I train your model with my data? I ran the yolo_four_channel.py script, but it doesn't seem to be working.

@sebastianvitterso
Copy link
Owner

Hi!
It's been two years since I looked at the code last, so I can't really give a tutorial off the top of my head.

If I remember correctly, you need to set up the data folder like we've shown in the readme, with images and annotations, and then by checking out the four-input branch, it should work.

What problems are you seeing?

@MehrsaMashhadi
Copy link
Author

@sebastianvitterso Thank you so much for your prompt response. I figured out how to run the code. However I got this error: "raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")
AttributeError: 'FourInputModel' object has no attribute 'head'"
Screenshot 2024-09-25 133245
This is the part that I am getting the error.

@sebastianvitterso
Copy link
Owner

Ah, sorry, I don't recall what the issue could be in this case.
Could you check which versions of e.g. torch and torchvision you have installed (run pip freeze to see)?
Might be that our requirements.txt using >= on most dependencies causes it to allow higher major versions, and that again may cause problems with breaking changes. Worth checking. If so, you should be able to specify which version of those packages you want to use by installing them manually (something like pip install -Iv torch==1.7.0 etc. (explanation)).

Hope that resolves it.

If the issue is tied to the code, I must apologize, but I don't think I can recall the specifics of this after two years :D

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