This contains the code for PyTorch to CoreML model conversion. For more information - visit PyTorch to CoreML model conversion
All required libraries collected in the requirements.txt file. To create a new virtual environment and install the requirements, you can use these commands:
$ virtualenv -p python3.7 venv
$ source venv/bin/activate
$ pip install -r requirements.txt
To convert any model from torchvision.models
you can try our script by using this command:
$ python3 torch_to_coreml.py --model_name resnet18 --simplify
The --model_name
argument should contain the name of any model from torchvision.models
Want to become an expert in AI? AI Courses by OpenCV is a great place to start.