Automated disease detection and tracking in cocoa trees with computer vision
There are a few useful tools in this repo but the main feature is the CocoaReader/utils/Torch_Custom_CNNs.py script. Useing a config file such as CocoaReader/CocoaNet/CocoaNetSweep.sh (shown below) one can quickly and easily train neural network for image classification while also being able to:
- Swap between architectures such as ResNet18, ResNet50 or ConvNext tiny
- Train with quantisation aware training
- Perform a "Weights and Biases" hyperparameter optimisation sweep
- Continously subsample and balance your dataset during training to aboid problems of imbalance and overfitting
- Load custom pretrained weights
- Train with decaying batchsize for very fine tuning
- Disable features such as the batchnorm layers of ResNet
python 'CocoaReader/utils/Torch_Custom_CNNs.py' \
--model_name 'CocoaNet18_quantised' \
--root \
--data_dir \
--input_size 750 \
--min_epochs 5 \
--arch 'resnet18' \
--batch_size 17 \
--patience 3 \
--custom_pretrained \
--custom_pretrained_weights 'CocoaNet18_DN.pkl' \
--quantise