Understanding the microstructural characteristics of materials, such as lattice defects, increasingly relies on the analysis of large numbers of images from electron and scanning probe microscopy [1]. It is now becoming routine to record series of atomic-resolution images, resulting in the generation of massive datasets. The new challenge is then analysing this data. The workflow for such analyses typically comprises the identification of atomic positions and subsequent derivation of physical quantities, such as defect concentration and strain. Conventionally, this analysis is done manually, which is slow and laborious, and the results are prone to human errors and bias.We demonstrate an automatic method for extracting information from atomically resolved images. We take advantage of GPU acceleration and fast graph-based algorithms to enable real-time structural analysis. The method is capable of extracting high-level information such as defect type, lattice orientation and strain, as well as characteristics of the electron probe. Our method is based on two algorithms, building on recent advances in deep-learning and on computational geometry and graph theory.The deep learning recognition model is similar to recently published results [2,3]. A neural network is trained to identify the smallest distinguishable repeated substructures within the image, i.e. atoms or atomic columns of a particular species. We take advantage of the recent finding that deep neural networks trained using simulated data can generalise to experimental data [2]. Furthermore, by using randomisation in the generation of the synthetic images, the neural network is capable of making predictions with minimal prior assumptions of the types of defects present. Fig. 1 shows the results of the neural network applied to a noisy image of graphene with a silicon substitutional defect. A simple routine converts the predictions of the neural network to a set of 2D points representing the centres of the detected substructures, each point associated with a substructure class. We further explore the precision of the detected atom locations and their sensitivity to the imaging parameters including noise.The geometric relationship between these points encodes further information, for example, whether the substitutional silicon atom in graphene has three or four carbon neighbours. To facilitate fast geometric analysis, we create a geometric graph from the detected points. It is crucial that the graph is stable to small perturbations of the atomic positions. We identified a type of geometric graph, called a stable Delaunay graph [4], fulfilling this criterion while being fast to construct for large numbers of points. Using simple rules localised segments of the graph can be extracted representing an atom and its surrounding neighbourhood. Each segment of the graph is compared to a library of known graph templates, representing, for example, different defect types. The similarity between a segment and a template is calculated using the symmetry invariant root-m...