Does BrainFrame support PyTorch?

Can I use PyTorch to train my deep neural network and then package in a VisionCapsule? Does BrainFrame support PyTorch framework?

Yes, you can use PyTorch to train your deep neural network and package it in a VisionCapsule. While BrainFrame includes TensorFlow, OpenCV DNN, and OpenVINO support by default, if you use PyTorch or any other framework that is not included by default, you need to take the following steps to make your VisionCapsule work with BrainFrame:

  1. Launch the BrainFrame core docker container and install the required PyTorch (or other) modules that are not included by default. You can do this by executing the following commands:
docker exec -it brainframe_core_1 /bin/bash
pip install torchvision==0.11.2
pip install pandas==1.1.5
  1. Find the ID of the brainframe_core_1 docker container and commit the updated BrainFrame core image using the following command:
docker container ls
docker commit --pause abd9f29a25c1 brainframe_core:0.29.6_new
  1. Create a docker-compose.override.yml file so that the brainframe_core:0.29.6_new docker image can be used the next time you launch BrainFrame. The content of the file should be:
version: '2.4'

    image: brainframe_core:0.29.6_new

Save the docker-compose.override.yml file in the BrainFrame install_path, which is typically /usr/local/share/brainframe/. You can find the BrainFrame install_path by running the following command:

brainframe info