tensorflow / tensorflow/models

Training on coco dataset from scratch using centernet_mobilenetv2fpn_512x512_coco17_kpts.. tflite not able to detect keypoints

Open
#10,280 0 comments 0 reactions 3 assignees View on GitHub

@pkulzc is already working on this.

Since Sep 28, 2021.

models:research:odapi type:bug
Dominant language
Python
Stars
77.7k
Forks
44.8k
PR merge metrics
No merged PRs in 30d

Description

Hi folks ... i started from scratch for keypoint detection with centernet_mobilenetv2fpn_512x512_coco17_kpts.tar.gz

I downloaded coco2017 datasets from here https://cocodataset.org/#download

Steps

1. Tfrecords

Generated tfrecords using https://github.com/tensorflow/models/blob/master/research/object_detection/dataset_tools/create_coco_tf_record.py
python create_coco_tf_record.py --logtostderr
--train_image_dir="/mypath/train2017"
--val_image_dir="/mypath/val2017"
--test_image_dir="/mypath/test2017"
--train_annotations_file="/mypath/annotations/instances_train2017.json"
--val_annotations_file="/mypath/annotations/instances_val2017.json"
--train_keypoint_annotations_file="/mypath/annotations/person_keypoints_train2017.json"
--val_keypoint_annotations_file="/mypath/annotations/person_keypoints_val2017.json"
--testdev_annotations_file="/mypath/image_info/annotations/image_info_test-dev2017.json"
--output_dir="mypath/tfrecord2017"

2. Training

Replaced my actual paths in centernet_mobilenetv2_fpn_kpts/pipeline.config
keypoint_label_map_path: "PATH_TO_BE_CONFIGURED/label_map.txt"
==>../centernet_mobilenetv2_fpn_kpts/label_map.txt

train_input_reader:
label_map_path: "PATH_TO_BE_CONFIGURED/label_map.txt"
==>../centernet_mobilenetv2_fpn_kpts/label_map.txt

input_path: "PATH_TO_BE_CONFIGURED/train2017-?????-of-00256.tfrecord"
==>tfrecord2017/coco_train.record-?????-of-00100

eval_input_reader
input_path: "PATH_TO_BE_CONFIGURED/val2017-?????-of-00032.tfrecord"
==>tfrecord2017/coco_val.record-?????-of-00050

3. Triggered training

model_main_tf2.py --model_dir=/var/data/annot/test/edward_inst1 --num_train_steps=1000 --sample_1_of_n_eval_examples=1 --pipeline_config_path=/var/data/annot/test/centernet_mobilenetv2_fpn_kpts/pipeline.config

4. Inference

after training i got checkpoints using the checkpoints i am following the =>Keypoints section code
https://github.com/tensorflow/models/blob/master/research/object_detection/colab_tutorials/centernet_on_device.ipynb =>converting checkponits to saved model and to tflite

Describing the issue

On inferencing my own generated tflite model...i am not getting any keypoints detections on coco images...but pretrained models which is available already in centernet_mobilenetv2fpn_512x512_coco17_kpts.tar.gz its working ...only my generated tflite model is not detecting keypoints

Gpus are not working dont know the issue.. for ssd models its working

In pipeline config..training batch size need to be changed as 4 or 8 instead of 512..taking more time for initialization

Need help thanks in advance

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.