Deep learning (DL) is a new approach that provides exceptional speed in healthcare activities with greater accuracy. In this regard, “convolutional neural network” or CNN and blockchain are two important parts that together fasten the disease detection procedures securely. CNN can detect and predict diseases like lung cancer and help determine food quality, and blockchain is responsible for data. This research is going to analyze the extension of blockchain with the help of CNN for lung cancer prediction and making food safer. CNN algorithm has been trained with a huge number of images by altering the filters, features, epoch values, padding value, kernel size, and resolution. Subsequently, the CNN accuracy has been measured to understand how these factors affect the accuracy. A linear regression analysis has been carried out in IBM SPSS where the independent variables selected are image dataset augmentation, epochs, features, pixel size (90 × 90 to 512 × 512), kernel size (0–7), filters (10–40), and padding. The dependent variable is the accuracy of CNN. Findings suggested that a larger number of epochs improve the CNN accuracy; however, when more than 12 epochs are considered, the accuracy may decrease. A greater pixel/resolution also improves the accuracy of cancer and food image detection. When images are provided with excellent features and filters, the CNN accuracy improves. The main objective of this research is to comprehend how the independent variables affect the accuracy (dependent), but the reading may not be fully exact, and thus, the researcher has conceded out a minor task, which delivered evidence supportive of the analysis and against the analysis. As a result, it can be determined that image augmentation and a large number of images develop the CNN accuracy in lung cancer prediction and food safety determination when features and filters are applied correctly. A total of 10–12 epochs are desirable for CNN to receive 99% accuracy with 1 padding.