Understanding the mechanics of blood flow is necessary for developing insights into mechanisms of physiology and vascular diseases in microcirculation. Given the limitations of technologies available for assessing in vivo flow fields, in vitro methods based on traditional microfluidic platforms have been developed to mimic physiological conditions. However, existing methods lack the capability to provide accurate assessment of these flow fields, particularly in vessels with complex geometries. Conventional approaches to quantify flow fields rely either on analyzing only visual images or on enforcing underlying physics without considering visualization data, which could compromise accuracy of predictions. Here, we present artificial-intelligence velocimetry (AIV) to quantify velocity and stress fields of blood flow by integrating the imaging data with underlying physics using physics-informed neural networks. We demonstrate the capability of AIV by quantifying hemodynamics in microchannels designed to mimic saccular-shaped microaneurysms (microaneurysm-on-a-chip, or MAOAC), which signify common manifestations of diabetic retinopathy, a leading cause of vision loss from blood-vessel damage in the retina in diabetic patients. We show that AIV can, without any a priori knowledge of the inlet and outlet boundary conditions, infer the two-dimensional (2D) flow fields from a sequence of 2D images of blood flow in MAOAC, but also can infer three-dimensional (3D) flow fields using only 2D images, thanks to the encoded physics laws. AIV provides a unique paradigm that seamlessly integrates images, experimental data, and underlying physics using neural networks to automatically analyze experimental data and infer key hemodynamic indicators that assess vascular injury.