Input: pch_res: pch_size x pch_size x 3, [0,1] index_infos: (h_start, h_end, w_start, w_end)
(self, pch_res, index_infos)
| 665 | return pch, (h_start, h_end, w_start, w_end) |
| 666 | |
| 667 | def update(self, pch_res, index_infos): |
| 668 | ''' |
| 669 | Input: |
| 670 | pch_res: pch_size x pch_size x 3, [0,1] |
| 671 | index_infos: (h_start, h_end, w_start, w_end) |
| 672 | ''' |
| 673 | if index_infos is None: |
| 674 | w_start, w_end = self.w_start, self.w_end |
| 675 | h_start, h_end = self.h_start, self.h_end |
| 676 | else: |
| 677 | h_start, h_end, w_start, w_end = index_infos |
| 678 | |
| 679 | self.im_res[h_start:h_end, w_start:w_end] += pch_res |
| 680 | self.pixel_count[h_start:h_end, w_start:w_end] += 1 |
| 681 | |
| 682 | def gather(self): |
| 683 | assert np.all(self.pixel_count != 0) |
no outgoing calls
no test coverage detected