| 546 | } |
| 547 | |
| 548 | void render(int gid, float *heatmaps /*GPU*/) { |
| 549 | float* centers = 0; |
| 550 | float* poses = net_copies[gid].joints; |
| 551 | |
| 552 | double tic = get_wall_time(); |
| 553 | if (net_copies[gid].up_model_descriptor->get_number_parts()==15) { |
| 554 | render_mpi_parts(net_copies[gid].canvas, DISPLAY_RESOLUTION_WIDTH, |
| 555 | DISPLAY_RESOLUTION_HEIGHT, NET_RESOLUTION_WIDTH, |
| 556 | NET_RESOLUTION_HEIGHT, |
| 557 | heatmaps, BOX_SIZE, centers, poses, |
| 558 | net_copies[gid].num_people, global.part_to_show); |
| 559 | } else if (net_copies[gid].up_model_descriptor->get_number_parts()==18) { |
| 560 | if (global.part_to_show-1<=net_copies[gid].up_model_descriptor-> |
| 561 | get_number_parts()) { |
| 562 | render_coco_parts(net_copies[gid].canvas, |
| 563 | DISPLAY_RESOLUTION_WIDTH, DISPLAY_RESOLUTION_HEIGHT, |
| 564 | NET_RESOLUTION_WIDTH, NET_RESOLUTION_HEIGHT, |
| 565 | heatmaps, BOX_SIZE, centers, poses, |
| 566 | net_copies[gid].num_people, global.part_to_show, |
| 567 | global.uistate.is_googly_eyes); |
| 568 | } else { |
| 569 | int aff_part = ((global.part_to_show-1)-net_copies[gid]. |
| 570 | up_model_descriptor->get_number_parts()-1)*2; |
| 571 | int num_parts_accum = 1; |
| 572 | if (aff_part==0) { |
| 573 | num_parts_accum = 19; |
| 574 | } else { |
| 575 | aff_part = aff_part-2; |
| 576 | } |
| 577 | aff_part += 1+net_copies[gid].up_model_descriptor->get_number_parts(); |
| 578 | render_coco_aff(net_copies[gid].canvas, DISPLAY_RESOLUTION_WIDTH, |
| 579 | DISPLAY_RESOLUTION_HEIGHT, NET_RESOLUTION_WIDTH, |
| 580 | NET_RESOLUTION_HEIGHT, |
| 581 | heatmaps, BOX_SIZE, centers, poses, |
| 582 | net_copies[gid].num_people, aff_part, num_parts_accum); |
| 583 | } |
| 584 | } |
| 585 | VLOG(2) << "Render time " << (get_wall_time()-tic)*1000.0 << " ms."; |
| 586 | } |
| 587 | |
| 588 | void* getFrameFromDir(void *i) { |
| 589 | int global_counter = 1; |
no test coverage detected