vitansoz

Results 5 comments of vitansoz

def test(): device = torch.device("cpu") #torch.device("cuda" if torch.cuda.is_available() else "cpu") # checkpoint = torch.load("./checkpoints/model_25.pth",map_location=device) #model = torchvision.models.detection.fasterrcnn_resnet50_fpn(num_classes=10,pretrained=False).to(device) model = torchvision.models.detection.maskrcnn_resnet50_fpn(num_classes=24,pretrained=False).to(device) model.load_state_dict(checkpoint['model']) model.eval() script_model = torch.jit.script(model) opt_model = optimize_for_mobile(script_model) opt_model._save_for_lite_interpreter("mask_rcnn_1.pt") if...

in addition,in the test(),I use: device = torch.device("cpu") #torch.device("cuda" if torch.cuda.is_available() else "cpu") # #checkpoint = torch.load("./checkpoints/model_25.pth",map_location=device) #model = torchvision.models.detection.fasterrcnn_resnet50_fpn(num_classes=10,pretrained=False).to(device) model = torchvision.models.detection.maskrcnn_resnet50_fpn(num_classes=91,pretrained=True).to(device) #model.load_state_dict(checkpoint['model']) model.eval() script_model = torch.jit.script(model) opt_model =...

**opt_model._save_for_lite_interpreter("mask_rcnn_1.pt")** mean **save opt_model to file**,file name is "mask_rcnn_1.pt". It's not to **load the file "mask_rcnn_1.pt"** please reference this link: https://pytorch.org/tutorials/recipes/mobile_interpreter.html#android

I tried ,used DJIWindowsSDKSample,but it not work.in playback click "workMode"and turn green.next click"Reload" display "LaunchFileDataTask get files:System_ERROR,switch mode or try again"