Machine learning (ML) and artificial intelligence (AI) have the remarkable ability to classify, recognize, and characterize complex patterns and trends in large data sets. Here, we adopt a subclass of machine learning methods viz., deep learnings and develop a general-purpose AI tool - dPOLY for analyzing molecular dynamics trajectory and predicting phases and phase transitions in polymers. An unsupervised deep neural network is used within this framework to map a molecular dynamics trajectory undergoing thermophysical treatment such as cooling, heating, drying, or compression to a lower dimension. A supervised deep neural network is subsequently developed based on the lower dimensional data to characterize the phases and phase transition. As a proof of concept, we employ this framework to study coil to globule transition of a model polymer system. We conduct coarse-grained molecular dynamics simulations to collect molecular dynamics trajectories of a single polymer chain over a wide range of temperatures and use dPOLY framework to predict polymer phases. The dPOLY framework accurately predicts the critical temperatures for the coil to globule transition for a wide range of polymer sizes. This method is generic and can be extended to capture various other phase transitions and dynamical crossovers in polymers and other soft materials.