mks0601/TF-SimpleHumanPose

Question about using my own data

dradnats-kim opened this issue · 17 comments

hello,

I tried to use my own data (some images, and humandetection.json)

i encountered "No such file pr directory: ..... " error.

I read other issues, this error mostly related directory or config setting.

but I just replaced images in 'test_2017' and det file that I made.

//changed//

  1. contents of "test_2017/". there are 15 images and their name are integers 1 to 15

  2. "humandetection.json". tried to make similar with offered det file.
    score : (float), category_id : 1(int), bbox : [x,y,w,h] (list, float), image_id : (int)

//cause I guess//

  1. image name or id

  2. format of det file

  3. something i didn't change

I look forward to hearing from you.

thank you.

p.s : when i use offered files and data, they work well

how did u create ur own humandetection.json?

Hello, thanks for your reply.

this is my code making dic and human_detection.json

box = boxes[i]
cv2.rectangle(img,(box[1],box[0]),(box[3],box[2]),(255,0,0),2)
x, y, w, h = float(box[1]), float(box[0]), float(box[3]-box[1]), float(box[2]-box[0])

result = dict(score=(scores[i]), category_id=1, bbox=[x, y, w, h], image_id=int(img_id))
dump_results.append(result)

and I attached json file in txt format.
human_detection .txt

I tried to follow COCO format.

best regards,

did u change the testset variable in config.py?

did u change the testset variable in config.py?

yes. I set COCO, testset in config.py like this

    ## dataset
    dataset = 'COCO' # 'COCO', 'PoseTrack', 'MPII'
    testset = test' # train, test, val (there is no validation set for MPII)

and locate images and det file at right dir in my thinking
(images are in 'coco/images/test2017/' and det file in '/coco/dets/')

did u also trained on ur custom data or are u just trying to test the pretrained model on ur data?

I just tried to test the pretrained model on my data. (model is trained on COCO dataset)

I thought 'If I make data with same format, it will works' .... Is it wrong??

Oh, I understand that I need annot_id for load images.

If I change code to load images directly, Will it be Okay?
(don't use path from COCO annot)

or Will it make another problem?

I haven't gone through the whole codebase, so i don't know if direct loading the images will work or not. Another issue might be the structure of the human_detection.json, but again i am not sure.

I haven't gone through the whole codebase, so i don't know if direct loading the images will work or not. Another issue might be the structure of the human_detection.json, but again i am not sure.

or, Do you have any idea for use custom dataset?

For now, i'll try it.

I trained a model on my cutom dataset but didn't try testing, because i have no idea how to create the human_detection.json file for my custom dataset.
Do let me know if u solve ur issue.

Run detectron2 on your data.

Ok Thanks, I'll try that.

Run detectron2 on your data.

Thanks for your reply.

I have additional question.

When you use Posefix, Is pose estimation data from Detectron2 ?

As written in the paper, any pose results can be used for the input. Please read the paper for more details.

As written in the paper, any pose results can be used for the input. Please read the paper for more details.

Understandably, I know that.. one of the advantages is I can use any estimation method using coco format.

Just because my attempts to use custom data(coco format) was failed, I wondered you used it directly.

I think it's lack of my ability. thank you.

Sorry, I can't get what you meant by 'directly', but the output of detectron2 can be used for the input pose.
Don't blame yourself :)

Sorry, I can't get what you meant by 'directly', but the output of detectron2 can be used for the input pose.
Don't blame yourself :)

Thanks for your kindness. I'll try them