Disclosed in embodiments of the present application are a model structure, a model training method, and an image enhancement method and device, applicable to the computer vision field in the field of artificial intelligence. The model structure comprises: a selecting module, a plurality of first neural network layers, a segmentation module, a transformer module, a recombination module, and a plurality of second neural network layers; the model breaks through the limitation that the transformer module can only be used for processing a natural language task, and can be applied to an underlying visual task; the model has a plurality of first/second neural network layers, and the different first/second neural network layers correspond to different image enhancement tasks, so that the model can be used for processing different image enhancement tasks after being trained, and compared with the existing model for processing underlying visual tasks, which is mostly based on CNN (CNN, as an excellent feature extractor, has good performance in high-layer visual tasks, but is difficult to pay attention to global information when the underlying visual task is processed), the model can pay attention to global information by means of the transformer module, thereby improving an image enhancement effect.
MODEL STRUCTURE, MODEL TRAINING METHOD, AND IMAGE ENHANCEMENT METHOD AND DEVICE