skhadem / 3D-BoundingBox

PyTorch implementation for 3D Bounding Box Estimation Using Deep Learning and Geometry
MIT License
435 stars 96 forks source link

replace vgg with resnet #14

Open lyxbyr opened 4 years ago

lyxbyr commented 4 years ago

Hi Thanks for your great work, I am now trying to replace the backbone of second stage using Resnet since Resnet usually has a better performance when doing a same work. However, after I replace the vgg by resnet, the result is terrible. I wonder if you have do the same thing and cloud you please tell me whether this idea is useful. Thank you!

Best regards

cnexah commented 4 years ago

Hi, I also tried Resnet18 and Resnet50, but got a similar performance to VGG.

lyxbyr commented 4 years ago

@Cknex Hi , similar performance how to eval it ? computer dimension error and orientation error ?the final three branch fc layer node need to change,eg resnet18 or resnet50 the three branch fc you set how many fc node?

lyxbyr commented 4 years ago

my result: Angle error Dimension error Vgg19 13.683045 0.283335 resnet34 27.887893 0.849132 resnet50 21.706590 0.821558

cnexah commented 4 years ago

Sorry, I made a mistake. My performance of Resnet50 is also bad.

I use the mean absolute error, and only test for 'Car' Angle error, Dimension error VGG19 0.108 [0.086 0.067 0.194] Resnet50 0.534 [0.100 0.076 0.320]

As for the FC layers, I just simply adapt the first fc layer to be compatible with the output of Resnet50

lyxbyr commented 4 years ago

Hi,for resnet50,fc like this result may be better : self.orientation = nn.Sequential( nn.Linear(2048 7 7, 1024), nn.ReLU(True), nn.Dropout(), nn.Linear(1024, 1024), nn.ReLU(True), nn.Dropout(), nn.Linear(1024, bins 2) # to get sin and cos ) self.confidence = nn.Sequential( nn.Linear(2048 7 * 7, 1024), nn.ReLU(True), nn.Dropout(), nn.Linear(1024, 1024), nn.ReLU(True), nn.Dropout(), nn.Linear(1024, bins),

nn.Softmax()

        # nn.Sigmoid()
    )
    self.dimension = nn.Sequential(
        nn.Linear(2048 * 7 * 7, 512),
        nn.ReLU(True),
        nn.Dropout(),
        nn.Linear(512, 512),
        nn.ReLU(True),
        nn.Dropout(),
        nn.Linear(512, 3)
    )
cnexah commented 4 years ago

Thanks very much!

CaoBo1996 commented 3 years ago

@Cknex hey,i found your result Angle error, Dimension error VGG19 0.108 [0.086 0.067 0.194] Resnet50 0.534 [0.100 0.076 0.320]

Angle error was very good,but in my test,my result is bad. i split kitti train set into split_train and split_val i train in split_train,and test in split_val but my result is bad i also use mean absolute error,and test in Car this is my result Car angle error:0.4860737579686576 so can you help me why?

cnexah commented 3 years ago

@CaoBo1996 Sorry that I have lost my code. In memory I didn't change much. Maybe just more units in middle layers.