We present a method to simulate the flow past bioinspired swimmers starting from pictures of an actual fish. The overall approach requires i) a skeleton graph generation to get a level-set function from pictures; ii) optimal transportation to obtain the velocity on the body surface; iii) flow simulations realized with a Cartesian method based on penalization. This technique can be used to automate modeling swimming motion from data collected by biologists. We illustrate this paradigm by simulating the swimming of a mackerel fish. (C) 2016 Elsevier Inc. All rights reserved.