Closed hhsinhan closed 3 years ago
Hi, I found my own error and sorry for bothering.
I was careless not checking the script in dataset_tools/download_and_preprocess_mscoco.sh
line 96
python object_detection/dataset_tools/create_coco_tf_record.py \
--logtostderr \
--include_masks \
--train_image_dir="${TRAIN_IMAGE_DIR}" \
--val_image_dir="${VAL_IMAGE_DIR}" \
--test_image_dir="${TEST_IMAGE_DIR}" \
--train_annotations_file="${TRAIN_ANNOTATIONS_FILE}" \
--val_annotations_file="${VAL_ANNOTATIONS_FILE}" \
--testdev_annotations_file="${TESTDEV_ANNOTATIONS_FILE}" \
--output_dir="${OUTPUT_DIR}"
I found that default script do not actually include keypoint inside.
for training keypoint tfrecord, here's what i edit
TRAIN_KP_ANNOTATIONS_FILE="${SCRATCH_DIR}/annotations/person_keypoints_train2017.json"
VAL_KP_ANNOTATIONS_FILE="${SCRATCH_DIR}/annotations/person_keypoints_val2017.json"
# Build TFRecords of the image data.
cd "${CURRENT_DIR}"
python3 create_coco_tf_record.py \
--logtostderr \
--include_masks \
--train_image_dir="${TRAIN_IMAGE_DIR}" \
--val_image_dir="${VAL_IMAGE_DIR}" \
--test_image_dir="${TEST_IMAGE_DIR}" \
--train_annotations_file="${TRAIN_ANNOTATIONS_FILE}" \
--val_annotations_file="${VAL_ANNOTATIONS_FILE}" \
--testdev_annotations_file="${TESTDEV_ANNOTATIONS_FILE}" \
--train_keypoint_annotations_file="${TRAIN_KP_ANNOTATIONS_FILE}" \
--val_keypoint_annotations_file="${VAL_KP_ANNOTATIONS_FILE}" \
--output_dir="${OUTPUT_DIR}"
After I rebuild the tfrecord within keypoints value.
The training process works fine.
INFO:tensorflow:Step 100 per-step time 0.371s loss=12.478
I1204 21:17:35.270161 139674450851584 model_lib_v2.py:648] Step 100 per-step time 0.371s loss=12.478
INFO:tensorflow:Step 200 per-step time 0.383s loss=7.781
I1204 21:18:13.289809 139674450851584 model_lib_v2.py:648] Step 200 per-step time 0.383s loss=7.781
INFO:tensorflow:Step 300 per-step time 0.357s loss=6.903
I1204 21:18:51.141005 139674450851584 model_lib_v2.py:648] Step 300 per-step time 0.357s loss=6.903
Hey @hhsinhan can you share the json files that you used for training ? i wanna know the format of keypoints annotation
Prerequisites
Please answer the following questions for yourself before submitting an issue.
1. The entire URL of the file you are using
https://github.com/tensorflow/models/tree/master/official/...
2. Describe the bug
I have test my environment works fine in Mobilenet Centernet FastRCNN Pure detection training and all works fine. This proved my environment including coco dataset which created under the model_tool shell script are all fine.
Here is my error message after I try to train any centernet keypoint models :
3. Steps to reproduce
Steps to reproduce the behavior.
4. Expected behavior
A clear and concise description of what you expected to happen.
5. Additional context
Here is m config :
6. System information