MCPcopy Create free account
hub / github.com/AllentDan/LibtorchTutorials / main

Function main

lesson6-Segmentation/main.cpp:4–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include"Segmentor.h"
3
4int main(int argc, char *argv[])
5{
6 cv::Mat image = cv::imread("D:\\AllentFiles\\data\\dataset4teach\\voc_person_seg\\val\\2007_004000.jpg");
7
8 Segmentor<UNet> segmentor;
9 segmentor.Initialize(0,512,512,{"background","person"},
10 "resnext50_32x4d","D:\\AllentFiles\\code\\tmp\\resnext50_32x4d.pt");
11 segmentor.LoadWeight("segmentor.pt");
12 segmentor.Predict(image,"person");
13 segmentor.Train(0.003,300,4,"D:\\AllentFiles\\data\\dataset4teach\\voc_person_seg",".jpg","segmentor.pt");
14
15 return 0;
16}

Callers

nothing calls this directly

Calls 4

InitializeMethod · 0.45
LoadWeightMethod · 0.45
PredictMethod · 0.45
TrainMethod · 0.45

Tested by

no test coverage detected