
I trained an AI Model to Detect Trading Candlesticks (from scratch using ViTs)
Nicholas Renotte16 June 2026Watch on YouTube
Description
So this one’s been a while in the making. Honestly I’ve been pretty keen to truly get my head around vision transformers and figured this project could be the one. It took a month and a half to get it to this point and ton of banging my head against the keyboard to finally get it working (I’m looking at you ColorJitter 😒). I want to keep this one going as a live project so i’ll be monitoring any issues you guys have a bit more closely. If you get stuck let me know and I’ll make as many updates as I can. Anyway, hope you enjoy it guys! Code: https://github.com/nicknochnack/ViTCandlesticks 👨💻 Sign up for the Full Stack course and use YOUTUBE50 to get 50% off: https://www.coursesfromnick.com/bundles/fullstackml Stuff I found useful: Albumentations: https://albumentations.ai/docs CutMix/Mixup: https://docs.pytorch.org/vision/main/auto_examples/transforms/plot_cutmix_mixup.html Lucid Rains ViT for PyTorch: https://github.com/lucidrains/vit-pytorch/tree/main/vit_pytorch Oh, and don't forget to connect with me! LinkedIn: https://bit.ly/324Epgo Facebook: https://bit.ly/3mB1sZD GitHub: https://bit.ly/3mDJllD Patreon: https://bit.ly/2OCn3UW Join the Discussion on Discord: https://bit.ly/3dQiZsV Happy coding! Nick
What you'll learn
- Vision Transformers (ViT) can be used to automatically recognize and classify trading candlestick patterns.
- PyTorch combined with albumentations, CutMix and Mixup are essential tools for training a robust ViT model for computer vision tasks.
- Implementation requires attention to details such as ColorJitter configuration and other data augmentation techniques to achieve good results.
- Open-source code and live project monitoring enable developers to build and debug vision transformer models themselves.