Open
Conversation
Contributor
Haotianz94
commented
May 6, 2019
- MaskRCNN: generate bbox & segmentation for all objects (COCO)
- Add build-arg "force_cuda" in travis, lead to conditional ENV in docker
- Add cocoapi into docker, which provides util for encoding/decoding segmentation mask to save space
- Fix DrawMaskRCNN kernel
- DensePose: generate bbox & keypoints & segmentation & UV parsing only for person
willcrichton
requested changes
May 7, 2019
Member
willcrichton
left a comment
There was a problem hiding this comment.
Can you please add a test for each kernel to tests/test_all.py?
| All_Coords[ entry[1] : entry[1]+output.shape[1],entry[0]:entry[0]+output.shape[2],:]= All_Coords_Old | ||
| ### | ||
| # CurrentMask = (output[0,:,:]>0).astype(np.float32) | ||
| # All_inds_old = All_inds[ entry[1] : entry[1]+output.shape[1],entry[0]:entry[0]+output.shape[2]] |
| All_Coords[:,:,1:3] = 255. * All_Coords[:,:,1:3] | ||
| All_Coords[All_Coords>255] = 255. | ||
| All_Coords = All_Coords.astype(np.uint8) | ||
| # All_inds = All_inds.astype(np.uint8) |
| self.mask_shrink = 4 | ||
| self.confidence_threshold = confidence_threshold | ||
| self.min_image_size = min_image_size | ||
| # self.mask_shrink = 4 |
| mask_small = cv2.resize(mask, (W // self.mask_shrink, H // self.mask_shrink)) | ||
| mask_small = (mask_small > 0).astype(np.uint8) * 255 | ||
| return mask_small | ||
| # def resize_mask(mask): |
| def encode_mask(mask): | ||
| return mask_util.encode(np.asfortranarray(mask.transpose(1, 2, 0)))[0] | ||
|
|
||
| result = [[{'bbox': {'x1' : float(bbox[0]), 'y1': float(bbox[1]), 'x2' : float(bbox[2]), 'y2' : float(bbox[3])}, |
Member
There was a problem hiding this comment.
Are these normalized bbox coordinates? That's the convention we use everywhere.
|
|
||
| if not mask is None: | ||
| # H, W = mask.shape | ||
| # mask_large = cv2.resize(mask, (W * mask_shrink, H * mask_shrink)) |
| result[:, :, c] * (1 - blending_alpha) + color[c] * blending_alpha, | ||
| result[:, :, c]) | ||
| # draw mask contour | ||
| # thresh = (mask_large[..., None] > 0).astype(np.uint8) |
willcrichton
requested changes
May 12, 2019
Member
willcrichton
left a comment
There was a problem hiding this comment.
Make sure to respond to the previous unresolved comments please
Dockerfile
Outdated
| && cd DensePose \ | ||
| && pip3 install -r requirements.txt \ | ||
| && make \ | ||
| #&&make ops \ |
| assert len(output[0]) == 1 | ||
|
|
||
|
|
||
| def test_densepose_detection(sc): |
Member
There was a problem hiding this comment.
This should get tagged with @needs_gpu()
Member
|
Travis is failing in the build script: https://travis-ci.org/scanner-research/scannertools/jobs/531536501#L449 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.