Some Questions for an Object Detection Model #943
-
I want to use Skorch for Object Detection. I am using a PyTorch model: The output of the model is a list of dicts: I was wondering, how can I utilize Skorch in that scenario? As the output is not regression nor classification. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
skorch does not necessarily have to be classification or regression, the I haven't worked with object detection in skorch, but gave it a try. Following the, admittedly fairly simplified, examples from the torchvision FasterRCNN docs, I could get something to work. I attached a Python script that demonstrates inference and training (GH doesn't allow to attach jupyter notebooks, so I exported the script, rename it to have a In general, it was possible to make object detection work with skorch, despite the unusual output. There is a bit of fiddling required to align the output format, but it works. I commented that part of the code. There was, however, a second issue that required a workaround. Namely, for this model, the The fundamental problem is that torchvision combines inference and loss calculation into a single |
Beta Was this translation helpful? Give feedback.
-
What about YOLO models? |
Beta Was this translation helpful? Give feedback.
skorch does not necessarily have to be classification or regression, the
NeuralNet
class is neutral when it comes to the task.I haven't worked with object detection in skorch, but gave it a try. Following the, admittedly fairly simplified, examples from the torchvision FasterRCNN docs, I could get something to work. I attached a Python script that demonstrates inference and training (GH doesn't allow to attach jupyter notebooks, so I exported the script, rename it to have a
.py
file ending). The script is fairly bare bones, but maybe you could give it a try and tell me if you could adopt it to your use case. If so, we could develop this into a proper example and add it to skorch.In gene…