A simple workflow and code for training a custom model and running inference. #1707
Unanswered
binominerigike
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, so I've gotten timm to run well in the past, but had to primarily rely on the train.py and inference.py scripts in command line.
As they're a bit complex and have a lot of options I likely won't change, I'm curious if anyone has any example code of loading them in like libraries and training and more importantly, running inference.
For the inference portion, I tried the following, which is how I'd do this in other pytorch programs:
However, I am getting the following:
Which is confusing since I made sure I used --num-classes 2 and --class-map classes.txt while training. I've read through the docs on huggingface and fastai but they don't seem to have an example similar to what I'm attempting which is very strange to me.
If anyone has any suggestions, I'm most appreciative. Again it's also helpful if this were very clean and simple code like yolov8's quickstart example. I'm preparing this for a lesson for teaching students so it's helpful to keep it very clean.
Beta Was this translation helpful? Give feedback.
All reactions