| | |
| | | |
| | | void try_classifier(char *datacfg, char *cfgfile, char *weightfile, char *filename, int layer_num) |
| | | { |
| | | network net = parse_network_cfg(cfgfile); |
| | | network net = parse_network_cfg_custom(cfgfile, 1); |
| | | if(weightfile){ |
| | | load_weights(&net, weightfile); |
| | | } |
| | |
| | | |
| | | void predict_classifier(char *datacfg, char *cfgfile, char *weightfile, char *filename, int top) |
| | | { |
| | | network net = parse_network_cfg(cfgfile); |
| | | network net = parse_network_cfg_custom(cfgfile, 1); |
| | | if(weightfile){ |
| | | load_weights(&net, weightfile); |
| | | } |
| | |
| | | } |
| | | else { |
| | | //cap = cvCaptureFromCAM(cam_index); |
| | | cap = get_capture_webcam(filename); |
| | | cap = get_capture_webcam(cam_index); |
| | | } |
| | | |
| | | int top = option_find_int(options, "top", 1); |
| | |
| | | } |
| | | else { |
| | | //cap = cvCaptureFromCAM(cam_index); |
| | | cap = get_capture_webcam(filename); |
| | | cap = get_capture_webcam(cam_index); |
| | | } |
| | | |
| | | int top = option_find_int(options, "top", 1); |
| | |
| | | { |
| | | #ifdef OPENCV |
| | | printf("Classifier Demo\n"); |
| | | network net = parse_network_cfg(cfgfile); |
| | | network net = parse_network_cfg_custom(cfgfile, 1); |
| | | if(weightfile){ |
| | | load_weights(&net, weightfile); |
| | | } |
| | |
| | | cap = get_capture_video_stream(filename); |
| | | }else{ |
| | | //cap = cvCaptureFromCAM(cam_index); |
| | | cap = get_capture_webcam(filename); |
| | | cap = get_capture_webcam(cam_index); |
| | | } |
| | | |
| | | int top = option_find_int(options, "top", 1); |