Conditional Detection using Tensorflow Object Detection API
the first thing that you should perform is customizing a pre-trained Tensorflow model with one class, using this technique you can generate a model which has only one class, named "hand" for example. but how to do this? don't worry, just simply follow the below steps:

download Tensorflow model master from GitHub and build it. (you can clone it using git instead of downloading it).
after your building is accomplished, you have to label your train image using label image software as well. the output of the label image is a CSV file.
in the next step you have to convert this CSV file to the record file.
and then train your own model.
after that your model is being trained, you have to export your model and do the target detection simply.

it is good to say that if you don't have an Nvidia GPU, use google Colab because this process is very time-consuming by making use of CPU.
best wishes to you.
I am detecting hand gestures using tensorflow object detection api but I want to apply condition to this detection means I want to detect hand gesture of a person when a person is wearing a whistle otherwise no detection. Can I achieve this using Tensorflow object detection api. If no suggest me some good methods of achieving this. thanks :)