lucasjinreal / yolov7_d2

🔥🔥🔥🔥 (Earlier YOLOv7 not official one) YOLO with Transformers and Instance Segmentation, with TensorRT acceleration! 🔥🔥🔥
GNU General Public License v3.0
3.13k stars 483 forks source link

How to implement a pose estimation model? #176

Closed tctco closed 2 years ago

tctco commented 2 years ago

Is there a configuration or script that I can train a pose estimation model easily?

lucasjinreal commented 2 years ago

Hi, we will release our pose model very soon, model still under finetuning.

tctco commented 2 years ago

Hi! Thanks for your reply!

I found this yolox_kpts_head.py in your repo, and I'm using it to train on my custom dataset :) However, it seems that the model is trained from scratch. Is it possible to do a transfer learning?

Thanks in advance!

lucasjinreal commented 2 years ago

that code is not decent version, it's not trainable, we will opensource our pose model soon.

tctco commented 2 years ago

Get it. BTW, it seems that the current version for pose estimation is based on YOLO-Pose. Is that right?

Thanks!

lucasjinreal commented 2 years ago

Yes. YOLOX-Pose, it also same idea as yolov7-pose

tctco commented 2 years ago

Get it. Thanks!

I'm also trying the instance segmentation model yolomask. However, I don't know how to load pre-trained weights. I tried downloading the original YOLOX-s pre-trained model and set WEIGHTS: "./weights/yolox_s.pth" but it didn't work (WARNING [08/31 23:09:46 d2.checkpoint.c2_model_loading]: No weights in checkpoint matched with model.). I'm also wondering if it is possible to load a smaller version of the YOLOX model like YOLOX-nano. Besides, I don't know why it takes more GPU memory during evaluation than training. The related issue https://github.com/jinfagang/yolov7_d2/issues/154 has been closed, though.

lucasjinreal commented 2 years ago

if want try yolomask, please join our discord for further discuss, I can guide you how to make a powerful instance seg based on more decent detection arch. (with OrienMask head)

tctco commented 2 years ago

I tried to join the qq chat group but received no response days ago. The number of members in the wechat group has reached the limit. Where can I find the discord channel?

Thanks!

lucasjinreal commented 2 years ago

https://discord.gg/2E8AfjaEXM

tctco commented 2 years ago

Seems no one is active on the discord :(

I wanted to how much data is required for training yolomask. I have a rather small and custom dataset which contains 200 training images and 50 for validation. However, the trained model is not predicting masks :( I wonder if it is because the model is trained from scratch without transfer learning.

lucasjinreal commented 2 years ago

discord some times have people

tctco commented 2 years ago

It seems that this line https://github.com/jinfagang/yolov7_d2/blob/main/demo.py#L145 should be

clss = ins.pred_classes.cpu().numpy().astype(int)

or there will be this error TypeError: list indices must be integers or slices, not numpy.float32.

Besides, it seems that the segmented mask is not remapped to the original image size, don't know how to fix this:

image

lucasjinreal commented 2 years ago

are u using orienmask? it should be able to align.

tctco commented 2 years ago

yes. I modified the config file based on the youtube video