geaxgx / depthai_hand_tracker

Running Google Mediapipe Hand Tracking models on Luxonis DepthAI hardware (OAK-D-lite, OAK-D, OAK-1,...)
MIT License
407 stars 76 forks source link

Manually specify device IP #17

Closed AlecMulder closed 2 years ago

AlecMulder commented 2 years ago

I have 3 OAK-D PoE cameras on the same network and am unable to specify an IP address to ensure the correct device is being used.

I tried following the guide here but I ran into issues adding parameters to the initialization. It requires the pipeline but it isn't created yet and my python skills aren't up to the task.

Am I on the right track or is there a better way to accomplish this?

geaxgx commented 2 years ago

I don't have a PoE camera so I can't test. Have you tried to replace https://github.com/geaxgx/depthai_hand_tracker/blob/87111c1c454bb9d3c936f19fe752605b0ca32c37/HandTracker.py#L130 with:

device_info = dai.DeviceInfo()
device_info.state = dai.XLinkDeviceState.X_LINK_BOOTLOADER
device_info.desc.protocol = dai.XLinkProtocol.X_LINK_TCP_IP
device_info.desc.name = "169.254.1.222"
self.device = dai.Device(devInfo=device_info)

Here I am modifying HandTracker.py. For the edge mode, I would similarly modify HandTrackerEdge.py. If it does not work, I would suggest you contect Luxonis support. They will be able to help you.

geaxgx commented 2 years ago

Closing as stale. Please reopen if you'd like to work on this further.