I'm using USB camera for object detection. I can't find code for them because the common blogs or articles are about object detection using pi camera only. Is object detection possible with a USB camera?
I'll turn my comment into an answer: Yes, it certainly is possible. I've read through a couple guides and my personal choice would be this Github. The readme provides a pretty good tutorial on how to get object detection working with TensorFlow on a Raspberry Pi. There are a few special instructions for users with a USB webcam instead of a Pi Camera, but they are made very clear in the guide. If reading guides aren't really your thing, there's also a YouTube guide over the same project.