With the increasing adoption of Automatic Vehicle Location (AVL) and Automatic Passenger Count (APC) technologies by transit agencies, a massive amount of time-stamped and location-based passenger boarding and alighting count data can be collected on a continuous basis. The availability of such large-scale transit data offers new opportunities to produce estimates for Origin-Destination (O-D) flows, helping inform transportation planning and transit management. However, the state-of-the-art methodologies for AVL/APC data analysis mostly tackle the O-D flow estimation problem within routes and barely infer the transfer activities across the entire transit network. This paper proposes three optimization models to identify transfers and approximate network-level O-D flows by minimizing the deviations between estimated and observed proportions or counts of transferring passengers: A Quadratic Integer Program (QIP), a feasible rounding procedure for the Quadratic Convex Programming (QCP) relaxation of the QIP, and an Integer Program (IP). The inputs of the models are readily available by applying the various route-level flow estimation algorithms to the automatically collected AVL/APC data and the output of the models is a network O-D estimation at varying geographical resolutions. The optimization models were evaluated on a case study for Ann Arbor-Ypsilanti area in Michigan. The IP model outperforms the QCP approach in terms of accuracy and remains tractable from an efficiency standpoint, contrary to the QIP. Its estimated O-D matrix achieves an R-Squared metric of 95.57% at the Traffic Analysis Zone level and 92.39% at the stop level, compared to the ground-truth estimates inferred from the state-of-practice trip-chaining methods.