Systems and methods are disclosed for medical image processing using neural networks. A first and a second controller network share a memory to which both the first and second controller network can write data and from which both the first and the second controller network can read data. Reading and writing is performed by respective read and write heads which are advantageously neural networks trained how to write and read in an optimal way. The memory thus provides each controller network with context data generated by the respective other controller network.