The study presents a novel computer-aided vision system for the detection of wood defects using deep learning techniques. Our study utilizes a dataset consisting of over 43000 labelled wood surface defects found in a comprehensive collection of 20276 wood images. To enable rapid decision-making on the production line, a binary classification approach was employed, distinguishing between defective and perfect wood samples. Only flawless wood can be used in production. Wood with one or more defects is not used in production and must be removed from the production line. Deep learning-based convolutional neural networks (CNNs) were optimized and used for the detection of defective and perfect wood. Using the transfer learning approach, experiments were performed with VGG-16, MobileNet, ResNet-50, DenseNet-121, Xception and InceptionV3 architectures. To decide the best optimization, the analysis of Adam, RMSprop, Adagrad, SGD and Adadelta optimization algorithms were tested on CNN architectures. In addition, different numbers of neurons, namely 256, 512, 1024 and 2048 neurons, were used and wood defect detection was performed with optimum parameters. As a result of the experiments, it was found that the RMSprop optimization algorithm of the Xception architecture reached 97.57 % accuracy, which is the most successful result with 512 neurons.