dog-qiuqiu / Yolo-Fastest

:zap: Based on yolo's ultra-lightweight universal target detection algorithm, the calculation amount is only 250mflops, the ncnn model size is only 666kb, the Raspberry Pi 3b can run up to 15fps+, and the mobile terminal can run up to 178fps+
Other
1.97k stars 428 forks source link

How about pytorch? #44

Open sniperliao opened 3 years ago

sniperliao commented 3 years ago

Hi, qiuqiu,

Awesome! Very you for the great project sharing!

I am facing a little trouble.

I want to replace yolov3-spp model in Alphapose. however that convert by pytorch like this

elif  module_type == "shortcut":
    from_ = int(modules[i]["from"])
    x = outputs[i-1] + outputs[i+from_]
    outputs[i] = x             

elif module_type == 'yolo':        

anchors = self.module_list[i][0].anchors
#Get the input dimensions
inp_dim = int (self.net_info["height"])

#Get the number of classes
num_classes = int (modules[i]["classes"])

#Output the result
x = x.data.to(args.device)
x = predict_transform(x, inp_dim, anchors, num_classes, args)

that support layers like shortcut , yolo ...etc

but this project added dropout layer. anyone have any idea to convert that?

please help, thanks!