The advent of the artificial intelligence (AI) and Internet of Things (IoTs) era has spurred a surge in the analysis of voluminous data gathered from myriad distributed sensors. This endeavor is primarily aimed at executing sophisticated recognition functions, which frequently demand excessive energy consumption. As a result, the development of a streamlined design capable of performing these functions with comparable efficiency continues to pose a significant challenge. Herein, a rigiflex pillar-membrane triboelectric nanogenerator (PM-TENG) is proposed for universal stereoscopic recognition by machine learning. An integral design is adopted to generate dynamic sensing signals in time series, which can obtain abundant and high-resolution information of stereoscopic structures. By combining the advantages of both rigid steel pillars and flexible/elastic membranes, the proposed rigiflex PM-TENG contains information from multiple sensing pillared pixels and focuses on the study of dynamic changes during the whole contact cycle. The proposed rigiflex TENG can effectively recognize objects across nine categories by leveraging machine learning technique, achieving an accuracy rate of 96.39 %. This system offers substantial potential for application in assembly lines for production control management in future smart factories and unattended warehouse workshops.