Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Bad Training Result with the defaults parameters and default dataset #186

Closed
AristideLaignel opened this issue Mar 22, 2023 · 2 comments
Closed

Comments

@AristideLaignel
Copy link

Hi,

I'm trying to retrain the model with just changing the conversion of the data to the cpu in the region_loss.py but I have bad results in all epochs. I'm using CUDA 11.1, python 3.8, Pytorch 1.8.0 and Cudnn 8.8.1 on Ubuntu 20.04.
Here, the results I have :

image

and when I test the model retrain I don't have a good result when I print the 3D bounding boxes :

1Ape26

Here the command like in the example I launch :

python train.py --datacfg cfg/benchvise.data --modelcfg cfg/yolo-pose.cfg --initweightfile backup/benchvise/init.weights

And it doesn't work with all models

Is there some parameters to adjust to have good training result ?

Thanks you for your help !!

@zongt-yu
Copy link

Hello, have you solved it?

@AristideLaignel
Copy link
Author

Yes, In the region_loss.py at line 153, I change this :

loss_x    = np.sum(loss_xs)
loss_y    = np.sum(loss_ys)

by this :

stacked_tensor_x = torch.stack(loss_xs, dim=0)
stacked_tensor_y = torch.stack(loss_ys, dim=0)

loss_x = torch.sum(stacked_tensor_x)
loss_y = torch.sum(stacked_tensor_y)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants