Among various methods proposed for health monitoring of structures, deep learning-based techniques with their powerful performance have attracted considerable attention in recent years. However, a major problem with these methods is that they usually need large amounts of data in the training phase, while such data may not be available in real applications. In this study, compact one-dimensional (1D) convolutional neural networks (CNNs) are utilized that require less data for training. The study is comprised of two parts: the first stage aims to develop a compact CNN that can recognize damages in a structure with high accuracy, when data are provided to some extent. The problem of inadequate training data in health monitoring of experimental and real-life structures is then investigated in the second part. Transfer learning is used to deal with this problem. A compact CNN is utilized as the source domain network and the target domain network receives all of its knowledge from this source. Acceleration time histories from a numerical model, an experimental structure, and a full-scale bridge are utilized to validate the proposed methodology. According to the results, the compact CNN can reach 100% accuracy when data are available for training. Also, for the case of insufficient data, using a compact network as well as transfer learning causes considerable improvement (about 95%) in the accuracy of damage detection.