de-code / python-tf-bodypix

A Python implementation of the bodypix model.
MIT License
124 stars 20 forks source link

Part names #156

Closed compvizard closed 2 years ago

compvizard commented 2 years ago

When I specify the part names ['left_upper_arm_front', 'right_upper_arm_front'], the mask highlights the back of the sitting lady's arms. When I switch to ['left_upper_arm_back', 'right_upper_arm_back'], the mask highlights the front of the arms instead. Same issue for lower arms.

de-code commented 2 years ago

Thank you for raising the issue.

Just adding CLI commands to reproduce it potentially:

python -m tf_bodypix \
    draw-mask \
    --model-path=https://storage.googleapis.com/tfjs-models/savedmodel/bodypix/resnet50/float/model-stride16.json \
    --show-output \
    --threshold=0.75 \
    --mask-alpha=0.5 \
    --colored \
    --parts left_upper_arm_front right_upper_arm_front \
    --source \
    https://www.dropbox.com/s/7tsaqgdp149d8aj/serious-black-businesswoman-sitting-at-desk-in-office-5669603.jpg?dl=1
python -m tf_bodypix \
    draw-mask \
    --model-path=https://storage.googleapis.com/tfjs-models/savedmodel/bodypix/resnet50/float/model-stride16.json \
    --show-output \
    --threshold=0.75 \
    --mask-alpha=0.5 \
    --colored \
    --parts left_upper_arm_back right_upper_arm_back \
    --source \
    https://www.dropbox.com/s/7tsaqgdp149d8aj/serious-black-businesswoman-sitting-at-desk-in-office-5669603.jpg?dl=1

To be honest I am having difficulty telling front and back apart. What image are you using?

The part names seem to match tfjs-models. Would you say it is any better with tfjs-models?

compvizard commented 2 years ago

I’m using the same image: serious-black-businesswoman-sitting-at-desk-in-office. I get the feeling that “front” means where the arms face outwards away from the shoulders and “back” means where the arms face inwards towards the armpit and chest. I had expected “front” to be part of the arms facing forward and “back” to be the parts facing backwards. So perhaps this is not a bug, just differences in interpretation. Thanks for the response, anyway.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Daniel Ecer @.> Sent: Thursday, December 16, 2021 8:09:28 AM To: de-code/python-tf-bodypix @.> Cc: Michael Cheng @.>; Author @.> Subject: Re: [de-code/python-tf-bodypix] Part names (Issue #156)

Thank you for raising the issue.

Just adding CLI commands to reproduce it potentially:

python -m tf_bodypix \ draw-mask \ --model-path=https://storage.googleapis.com/tfjs-models/savedmodel/bodypix/resnet50/float/model-stride16.json \ --show-output \ --threshold=0.75 \ --mask-alpha=0.5 \ --colored \ --parts left_upper_arm_front right_upper_arm_front \ --source \ https://www.dropbox.com/s/7tsaqgdp149d8aj/serious-black-businesswoman-sitting-at-desk-in-office-5669603.jpg?dl=1

python -m tf_bodypix \ draw-mask \ --model-path=https://storage.googleapis.com/tfjs-models/savedmodel/bodypix/resnet50/float/model-stride16.json \ --show-output \ --threshold=0.75 \ --mask-alpha=0.5 \ --colored \ --parts left_upper_arm_back right_upper_arm_back \ --source \ https://www.dropbox.com/s/7tsaqgdp149d8aj/serious-black-businesswoman-sitting-at-desk-in-office-5669603.jpg?dl=1

To be honest I am having difficulty telling front and back apart. What image are you using?

The part names seem to match tfjs-modelshttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftensorflow%2Ftfjs-models&data=04%7C01%7C%7C07621dd1578c4232a8a508d9c02853c2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637752101703820461%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=SOFkjEIpbfg%2Fsfw3U%2FfGFOwh7ZgXRqsu7tx3MeqNcOo%3D&reserved=0. Would you say it is any better with tfjs-modelshttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftensorflow%2Ftfjs-models&data=04%7C01%7C%7C07621dd1578c4232a8a508d9c02853c2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637752101703900166%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=AnjwOzSGC7pQF%2B6DdYORFjK1pAqyanRD%2BfQ5cwodTW4%3D&reserved=0?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fde-code%2Fpython-tf-bodypix%2Fissues%2F156%23issuecomment-995314837&data=04%7C01%7C%7C07621dd1578c4232a8a508d9c02853c2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637752101703979753%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=vq40VEZlO97%2BnFYzhvRfTW%2FuFW%2Bl2SveHHMIf4L4OvA%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAQSSUBSIA26WHUS5ADIBFTUREU3RANCNFSM5JYEW5XA&data=04%7C01%7C%7C07621dd1578c4232a8a508d9c02853c2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637752101704059405%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Rt88IzBef2cMebIm4W4UKN5FQL3eXIrC8TLMuAoVNCA%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7C07621dd1578c4232a8a508d9c02853c2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637752101704129092%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=cztH4kRsENt1Cqfrj8qlK6GHP89a8ETTDsPKB8XbiyU%3D&reserved=0 or Androidhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7C07621dd1578c4232a8a508d9c02853c2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637752101704208779%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Q0FKml92PE%2BbI7jQSKEUaVMxqqNAJ9ETvm0rLJktaDQ%3D&reserved=0.

de-code commented 2 years ago

Do you think the issue can be closed? (If there are inconsistencies with the bodypix model in tfjs-models then I could look into it.)