With the continuous advancement of education informatization, classroom behavior analysis has become an important tool to improve teaching quality and student learning outcomes. However, student classroom behavior recognition methods still face challenges such as occlusion, small objects, and environmental interference, resulting in low recognition accuracy and lightweight performance. To address the above problems, this study proposes a lightweight student behavior recognition model based on Inverted Residual Mobile Block (IMRMB-Net). Specifically, this study designs a lightweight feature extraction module, IMRMB, from the images of the backbone network to be able to better capture contextual information and improve the recognition of occluded objects while saving computational resources. Using DySample, the neck network reconsiders the initial sampling position and the moving range of the offset from the point sampling perspective to accurately recognize small object behaviors in course scenes. Meanwhile, a new loss function, Focaler-ShapeIoU, is designed in this study, aiming to improve the learning ability and robustness of the model to different samples thus further solving the occlusion problem. Experiments in UK_Dataset show that IMRMB-Net has high accuracy (mAP@50 = 93.3%, mAP@50:95 = 78.7%) and lightweight performance (FPS = 60.37, Params = 7.32MB, GFLOPs = 23.8G). Meanwhile, this study verifies that IMRMB-Net can effectively solve the occlusion problem in classroom scenarios through experiments on the UK_Dataset and SCB_Dataset occlusion subsets. In addition, this study verifies the generalization ability and the ability to recognize small targets of IMRMB-Net on the VisDrone2021 dataset.