YonghaoHe / LFFD-A-Light-and-Fast-Face-Detector-for-Edge-Devices

A light and fast one class detection framework for edge devices. We provide face detector, head detector, pedestrian detector, vehicle detector......
MIT License
1.32k stars 329 forks source link

Nan loss while training face detection model on custom dataset #103

Closed aiswaryasukumar4 closed 3 years ago

aiswaryasukumar4 commented 3 years ago

First of all, thank you for this amazing work. But the training procedure and requirements of face detection lack some clarity. I will list out the errors I faced during the training.

@YonghaoHe Any idea on this issue? Can anyone list out the correct procedure to follow while training on the custom dataset?

YonghaoHe commented 3 years ago

@aiswaryasukumar4 Thank you for interesting in our method. If you use the pre-trained model, you have to start with a small learning rate, say 0.01 or 0.001. The errors you encounter may be caused by invalid data values. You can prepare your own data by using our code. You can carefully read the code and find the mistakes. By the way, I will release a new repo ---- LFD, the successor of LFFD, it is much better and implemented with PyTorch (which is most popular now).

aiswaryasukumar4 commented 3 years ago

@aiswaryasukumar4 Thank you for interesting in our method. If you use the pre-trained model, you have to start with a small learning rate, say 0.01 or 0.001. The errors you encounter may be caused by invalid data values. You can prepare your own data by using our code. You can carefully read the code and find the mistakes. By the way, I will release a new repo ---- LFD, the successor of LFFD, it is much better and implemented with PyTorch (which is most popular now).

Thank you @YonghaoHe for the response. Setting the learning rate to a smaller value solved the nan loss issue while using the pretrained model.