What I can recommend to try is to use Tensor rather than panda DataFrame for your self.annotations. I am not sure if this is something related to spawning process with pandas dataframe when using the multiprocessing in colab.