Image classification using PyTorch and Core ML

Main Article Content

DOI

Jakub Ślusarski

jakub.slusarski@pollub.edu.pl

https://orcid.org/0009-0002-2069-695X
Arkadiusz Szumny

arkadiusz.szumny@pollub.edu.pl

Maria Skublewska-Paszkowska

maria.paszkowska@pollub.pl

https://orcid.org/0000-0002-0760-7126

Abstract


The aim of the study was to compare different machine learning models trained using the PyTorch library in Python and the Core ML library in the Create ML tool. In the case of PyTorch, using transfer learning on a pre-trained ResNet50 model, data augmentation and normalization, four models were trained on two various data sets, achieving accuracy, precision, recall and F1 score above 80%. Four identical models were trained on the same data sets in the Create ML tool, and the conversion of the PyTorch models to the Core ML format allowed for a reliable comparison. This also emphasizes the effectiveness of conversion using the coremltools library, while maintaining model performance. The study emphasizes the key role of dataset quality and techniques for improving dataset quality.


Keywords:

image classification, CoreML, PyTorch, image recognition

References

Article Details

Ślusarski, J., Szumny, A., & Skublewska-Paszkowska, M. (2025). Image classification using PyTorch and Core ML. Journal of Computer Sciences Institute, 36, 303–311. https://doi.org/10.35784/jcsi.7550