candle
candle copied to clipboard
How to train my own YOLOv8 model?
Candle provides an example of YOLOv8, which is very useful to use. But I don't know how to train on my own dataset? Can handle directly load the model trained by pytorch?
Perhaps you could check out https://github.com/KGrewal1/optimisers? There is a training example, and loading safetensors and other formats from saved Pytorch checkpoints could easily be added. For example, see this snippet where I load the weights from downloaded safetensors.
To train on your own dataset, you could look try to load your own data or use candle_datasets. Ultimately, it comes down to converting your data into tensors: tokenization or image processing is part of the process. If you have any questions, please feel free to ask!
Thank you for your reply. Training with Candle is a bit difficult for me. I may choose to train YOLOv8 on PyTorch, then convert the checkpoint of PT to safetensors format, and load safetensors on Rust for inference.
@mzdk100 Did you succeed in the end?
----“I may choose to train YOLOv8 on PyTorch, then convert the checkpoint of PT to safetensors format, and load safetensors on Rust for inference.”
I haven't started trying yet.
Thank you for your reply