liruilong940607 / Pose2Seg

Code for the paper "Pose2Seg: Detection Free Human Instance Segmentation" @ CVPR2019.
http://www.liruilong.cn/projects/pose2seg/index.html
MIT License
532 stars 136 forks source link

How to visualize the output ? #17

Open manansaxena opened 5 years ago

manansaxena commented 5 years ago

Hi, I am getting the segmentation output after running the test.py file on my in the wild images. output - {"image_id": 6, "category_id": 1, "score": 1.0, "segmentation": {"size": [720, 1280], "counts": "obh`01^f02N2OLiYO0\f0000kUW;"}

How are we supposed to visualize this ?

sanshibayuan commented 5 years ago

you can try somethinig like this:

from pycocotools.coco import COCO

def demo_result(anno_file,seg_result,box_result):
    cocoGt = COCO(anno_file)
    cocoB=cocoGt.loadRes(box_result)
    cocoS=cocoGt.loadRes(seg_result)
    save_path = './'
    for i in range(len(cocoB.imgs.keys())):
        img = cocoB.imgs[list(cocoB.imgs.keys())[i]]
        I = io.imread("D:/Datasets/coco2017/val2017/"+ img['file_name'])
        # show original image
        plt.axis('off')
        plt.imshow(I)
        annIds = cocoB.getAnnIds(imgIds=img['id'], catIds=[], iscrowd=None)
        anns = cocoB.loadAnns(annIds)
        cocoB.showAnns(anns)    # show box
        annIds = cocoS.getAnnIds(imgIds=img['id'], catIds=[], iscrowd=None)
        anns = cocoS.loadAnns(annIds)
        cocoS.showAnns(list(anns))  # show segmentations
        plt.show()
manansaxena commented 5 years ago

Hi, What would be the box result in this case ? Because I get output like this for three people in the images. Thanks

sanshibayuan commented 5 years ago

Hi, What would be the box result in this case ? Because I get output like this for three people in the images. Thanks

In this project you dont have box ouputs so you can comment the corresponding lines.

ankitsharma07 commented 5 years ago

Hi, What would be the box result in this case? Because I get output like this for three people in the images. Thanks

In this project you don't have box outputs so you can comment on the corresponding lines.

Hey! I tried this method but was unfortunate to not get the visualization. Did you get them?

Xuan-YE commented 4 years ago

Hi, I am getting the segmentation output after running the test.py file on my in the wild images. output - {"image_id": 6, "category_id": 1, "score": 1.0, "segmentation": {"size": [720, 1280], "counts": "obh`01^f02N2OLiYO0\f0000kUW;"}

How are we supposed to visualize this ?

Hi! Do you solve this problem? Could you show me some details about how to run it on my own images? I'm very grateful to you!

asmallcodedog commented 4 years ago

Hi, What would be the box result in this case ? Because I get output like this for three people in the images. Thanks

Hi, I am getting the segmentation output after running the test.py file on my in the wild images. output - {"image_id": 6, "category_id": 1, "score": 1.0, "segmentation": {"size": [720, 1280], "counts": "obh`01^f02N2OLiYO0\f0000kUW;"} How are we supposed to visualize this ?

Have you solved the problem? I have the same question for you.thanks very much!

manansaxena commented 4 years ago

Yeah I did get them. I multiplied the masks with the images before the encoding process. But the results that I got were really poor and mostly incorrect. The visualization is correct but to run this model on wild images a lot of modifications are required. And it's difficult to tell which one is making this happen ...

ManiaaJia commented 4 years ago

@manansaxena @sanshibayuan @ankitsharma07 @Xuan-YE @asmallcodedog Hello everyone, I am sorry to bother you.But I can't access the dataset address provided by the dataset repo. Could you download it for me or give me a link to download? Thanks a lot.

azuic commented 4 years ago

Yeah I did get them. I multiplied the masks with the images before the encoding process. But the results that I got were really poor and mostly incorrect. The visualization is correct but to run this model on wild images a lot of modifications are required. And it's difficult to tell which one is making this happen ...

Did you set the values of the four field "area", "segmentation", "bbox", "iscrowd" to be None or simply not having them in the input annotations? Did you specify the "category_id" on creating the data ?

asmallcodedog commented 4 years ago

我在网上找到了一个可以可视化结果的方法,效果还可以,如果自己的照片关键点准确的话,结果应该还是可以的------------------ 原始邮件 ------------------ 发件人: "Zui Chen"notifications@github.com 发送时间: 2019年10月30日(星期三) 上午6:03 收件人: "liruilong940607/Pose2Seg"Pose2Seg@noreply.github.com; 抄送: "asmallcodedog"1311561808@qq.com;"Mention"mention@noreply.github.com; 主题: Re: [liruilong940607/Pose2Seg] How to visualize the output ? (#17)

Yeah I did get them. I multiplied the masks with the images before the encoding process. But the results that I got were really poor and mostly incorrect. The visualization is correct but to run this model on wild images a lot of modifications are required. And it's difficult to tell which one is making this happen ...

Did you set the values of the four field "area", "segmentation", "bbox", "iscrowd" to be None or simply not having them in the input annotations? Did you specify the "category_id" on creating the data ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

manansaxena commented 4 years ago

I left them blank. Yes i did specify the category id - it should be the same as we are trying to detect skeleton/human in all images

azuic commented 4 years ago

I left them blank. Yes i did specify the category id - it should be the same as we are trying to detect skeleton/human in all images

So basically you did like {..."bbox":None, "segmentation":None, ...}? I tried that but it seems like it is requiring me to input some values. By the way, did you fo model.forward() to perform the inference? I got some weird out of index error when calling this function