Augmentation that resample the data from poisson distribution. Args: x: (H,W,C) when C is th number of markers + 2. (one for the mask of the cell. one for the mask of all the other cells in the environment) Returns: Augmented tensor size of (H,W,C) resampled fro
(x)
| 6 | |
| 7 | |
| 8 | def poisson_sampling(x): |
| 9 | """ |
| 10 | Augmentation that resample the data from poisson distribution. |
| 11 | Args: |
| 12 | x: (H,W,C) when C is th number of markers + 2. (one for the mask of the cell. |
| 13 | one for the mask of all the other cells in the environment) |
| 14 | |
| 15 | Returns: |
| 16 | Augmented tensor size of (H,W,C) resampled from poisson distribution. |
| 17 | """ |
| 18 | blur = cv2.GaussianBlur(x[:, :, :-2], (5, 5), 0) |
| 19 | x[:, :, :-2] = np.random.poisson(lam=blur, size=x[:, :, :-2].shape) |
| 20 | return x |
| 21 | |
| 22 | |
| 23 | def cell_shape_aug(x): |
nothing calls this directly
no outgoing calls
no test coverage detected