I have trained a yoloV5 model on custom dataset from roboflow is easier to just pick it easier and faster The weight file s best.p you can use it and deploy it easier with opencv The model learns via transfer learning
Use the training notebook to train the model, create an account at roboflow and fork the given dataset link and run the cell with configuration for downloading the dataset
Create account login and move to dataset section and find dataset entitled as industrial-safety-helmet Image Dataset => https://universe.roboflow.com/manuel-wilson/industrial-safety-helmet
Clone the repository of official yoloV5 firstly, Use the deployment notebook to deploy the model it easier to customize pass the parameters and keep going