Closed ttdd11 closed 4 years ago
Thanks for your interest in our work! I plan to release it very soon maybe next week!
Let me know, I'll give it a try! In terms of accuracy, do the models with more parts improve accuracy (foot segmentation for instance)?
My code for webcam
`if name == 'main':
args = parser.parse_args()
keras_weights_file = args.model
print('start processing...')
# load model
model = get_testing_model_resnet101()
model.load_weights(keras_weights_file)
params, model_params = config_reader()
scale_list = []
for item in args.scale:
scale_list.append(float(item))
params['scale_search'] = scale_list
# generate image with body parts
cap = cv2.VideoCapture(0)
while(True):
# Capture frame-by-frame
ret, frame = cap.read()
seg = process(frame, params, model_params)
seg_argmax = np.argmax(seg, axis=-1)
seg_max = np.max(seg, axis=-1)
th_mask = part_thresholding(seg_argmax)
seg_max_thres = (seg_max > 0.1).astype(np.uint8)
seg_argmax *= seg_max_thres
seg_canvas = human_seg_combine_argmax_rgb(seg_argmax)
cur_canvas = cv2.imread(args.input_folder+'/'+filename)
canvas = cv2.addWeighted(seg_canvas, 0.6, cur_canvas, 0.4, 0)
filename = '%s/%s.jpg'%(args.output_folder,'seg_'+filename)
cv2.imwrite(filename, canvas)
cap.release()
cv2.destroyAllWindows()
`and
error:
oriImg = cv2.imread(input_image)
SystemError:
Is there anyone who can solve the problem ?
@ttdd11 Model+code released! Generally 7-part model performs better than 15-part model due to the domain gap issue. 15-part model is trained without any real data labels.
@glcsvg In the provided codes, We feed the image path to the function process()
. You just need to slightly modify some codes in process()
!
Amazing work. When do you think the pre-trained models with all parts will be available?