Code Monkey home page Code Monkey logo

custom-keypoint-detection's Introduction

Hola 👋

This is Prabhakar Sivanesan, an experienced Researcher and Developer in the field of Computer Vision and Deep Learning. Love to brainstorm, ideate and develop smart solutions for real world problems.

Profile Summary

Prabha's GitHub stats

Technology Stack

                                                  

custom-keypoint-detection's People

Contributors

prabhakar-sivanesan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

custom-keypoint-detection's Issues

Non-training of data

Hey, thanks so much for this tutorial. This is much less of an issue with your tutorial and more an issue with the tf model library I expect!

Basically, when I follow all your steps, during training I get

keypoint/offset': 0.0,
regression': 0.0,

and a total loss rate that very quickly converges to 0. Needless to say, the resulting model is useless.

Any ideas about what might be happening? Any ideas would be much appreciated!

Cheers

Prediction too far off

I am attaching the colab file which was used for training my document edge detection model. The colab file was cloned from this github repo. Some steps like tfrecord generation and tensorflow github clone is not shown in the colab because it was done already and I had it commented out when I reran the notebook. Please remember the total loss value was 0.08 which should be good for making predictions.

Main Concern:
Why the predictions are to far off when the loss was low? I have followed every step and can't pinpoint to the reason.

Colab file:
my_model.zip

Video for the same:

predictions.mp4

tf record files are not generating

I ran this command

%cd "/content/TensorFlow/models/research/object_detection" !python dataset_tools/create_coco_tf_record.py --train_image_dir "/content/Custom-keypoint-detection/dataset/images" \ --test_image_dir "/content/Custom-keypoint-detection/dataset/images" \ --val_image_dir "/content/Custom-keypoint-detection/dataset/images" \ --train_annotations_file "/content/Custom-keypoint-detection/dataset/annotations/train.json" \ --testdev_annotations_file "/content/Custom-keypoint-detection/dataset/annotations/val.json" \ --val_annotations_file "/content/Custom-keypoint-detection/dataset/annotations/val.json" \ --train_keypoint_annotations_file "/content/Custom-keypoint-detection/dataset/annotations/train.json" \ --val_keypoint_annotations_file "/content/Custom-keypoint-detection/dataset/annotations/val.json" \ --output_dir "/content/custom_keypoint_detection/dataset/tfrecord/"

It is not generating .record files but giving this output

/content/TensorFlow/models/research/object_detection I0708 07:55:13.186966 139704579422080 create_coco_tf_record.py:401] Found groundtruth annotations. Building annotations index. I0708 07:55:13.187198 139704579422080 create_coco_tf_record.py:414] 0 images are missing annotations. I0708 07:55:13.189434 139704579422080 create_coco_tf_record.py:443] On image 0 of 44 I0708 07:55:13.236015 139704579422080 create_coco_tf_record.py:470] Finished writing, skipped 0 annotations. I0708 07:55:13.236133 139704579422080 create_coco_tf_record.py:473] Finished writing, skipped 0 keypoint annotations. I0708 07:55:13.241920 139704579422080 create_coco_tf_record.py:401] Found groundtruth annotations. Building annotations index. I0708 07:55:13.242027 139704579422080 create_coco_tf_record.py:414] 0 images are missing annotations. I0708 07:55:13.242739 139704579422080 create_coco_tf_record.py:443] On image 0 of 11 I0708 07:55:13.252087 139704579422080 create_coco_tf_record.py:470] Finished writing, skipped 0 annotations. I0708 07:55:13.252181 139704579422080 create_coco_tf_record.py:473] Finished writing, skipped 0 keypoint annotations. I0708 07:55:13.255093 139704579422080 create_coco_tf_record.py:401] Found groundtruth annotations. Building annotations index. I0708 07:55:13.255200 139704579422080 create_coco_tf_record.py:414] 0 images are missing annotations. I0708 07:55:13.255263 139704579422080 create_coco_tf_record.py:443] On image 0 of 11 I0708 07:55:13.263692 139704579422080 create_coco_tf_record.py:470] Finished writing, skipped 0 annotations.

can you please tell what wrong is there in code?

Invalid Argument Error "Input to reshape is a tensor with 76 values, but the requested shape requires a multiple of 6"

Dear Prabhakar,

Thank you for your "Custom Keypoint Detection" tutorial, it's very helpful!

I could follow most of the steps from the annotation process until the generation of TFrecord, but when I ran the training step I couldn't go further.
The script presented the following error:
tensorflow.python.framework.errors_impl.InvalidArgumentError: {{function_node _wrapped__IteratorGetNext_output_types_19_device/job:localhost/replica:0/task:0/device:GPU:0}} Input to reshape is a tensor with 76 values, but the requested shape requires a multiple of 6
[[{{node Reshape_8}}]]
[[MultiDeviceIteratorGetNextFromShard]]
[[RemoteCall]] [Op:IteratorGetNext]

I annotated 60 512x512 floor plan images with 3 categories, wall corner, door and window, each category with only one keypoint. There's an average of 50 annotations per image.
I'm using Colab with standard GPU for CenterNet HourGlass 104 512x512. I couldn't work with the splitting script for the JSON annotations, so I splitted them manually for training and validation.
When I generated the TFrecord, the generate_tfrecord_from_coco.py script created the train.record and val.record files, but it presented the following error:
File "/content/gdrive/MyDrive/projects/custom_keypoint_detection/dataset/generate_tfrecord_from_coco.py", line 242, in create_tf_example
keypoints = keypoint_annotations['keypoints']
KeyError: 'keypoints'

I've checked many Stack Overflow and Github questions about the issue from the subject, but none of them present specific solutions.

I keep myself available.

Best regards,
Igor

TypeError: Expected int32, but got None of type 'NoneType'.

I am getting the following error whenever I am going to train the model:

TypeError: in user code:

File "C:\Users\Abhipray\AppData\Local\Programs\Python\Python37\lib\site-packages\object_detection\inputs.py", line 886, in transform_and_pad_input_data_fn  *
    tensor_dict = pad_input_data_to_static_shapes(
File "C:\Users\Abhipray\AppData\Local\Programs\Python\Python37\lib\site-packages\object_detection\inputs.py", line 319, in transform_input_data  *
    out_tensor_dict[flds_gt_kpt_weights] = (
File "C:\Users\Abhipray\AppData\Local\Programs\Python\Python37\lib\site-packages\object_detection\core\keypoint_ops.py", line 349, in keypoint_weights_from_visibilities  *
    per_keypoint_weight_mult = tf.ones((1, num_keypoints,), dtype=tf.float32)

TypeError: Expected int32, but got None of type 'NoneType'.

@prabhakar-sivanesan I noticed that you have encountered with similar error; how did you address this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.