sunsmarterjie / SDL-Skeleton

A toolbox for object skeleton detection, can also be used for edge detection, building extraction and road extraction. TIP (2021)
119 stars 27 forks source link

Is deepflux reproducible #8

Closed Tcorpion closed 2 years ago

Tcorpion commented 2 years ago

Follow the deepflux training, I could NOT get skeletons on par with “Deepflux for skeletons in the wild CVPR2019” reported. The loss always went to 'Nan' in a few steps in training when LR=1e-6, after reducing grad from grad = distL1 * (weightPos + weightNeg) / len(crop) to grad = distL1 * (weightPos + weightNeg) / len(crop) / (weightPos + weightNeg).sum() , here (weightPos + weightNeg).sum() was about 1e4, the loss finally converged.

In fact, the skeletons produced in Deepflux are really bad. For comparison, I trained same deepflux model with skeleton mask instead of flux field, the results were much better than that from flux field.

Did you reproduce the skeleton prediction as paper reported?

Tcorpion commented 2 years ago

By the way, after replacing upsampling to deconv2d as Deepflux did, the loss could NOT converge with any values of learning rate.

sunsmarterjie commented 2 years ago

Thanks for your efforts ! Training deepflux needs Adam optimizer as my experience. But I still did not reproduce the performance as the paper reported. Welcome to join the project and reproduce deepflux.

Tcorpion commented 2 years ago

I adopt adam optimizer and it help converge. The converged model of flux field is NOT on par with skeleton mask training.