Pipe OBS live stream recording to virtual webcam

Hello,
I am following this tutorial Gaming Datasets for Game Automation with Computer Vision (roboflow.com) and am having trouble with the step that says " With OBS, we set up a virtual webcam and piped a live screen recording to a virtual webcam. Then, in infer-async.py , specified the script to use the OBS virtual camera instead of the laptop’s hardware camera." I have the game screen and the OBS screen, but am unsure how to modify the code in infer-async.py to accomplish this step. Any pointers in the right direction would be appreciated.
Can someone also explain which is the virtual webcam and live screen recording window? I am confused what the current OBS window is showing, or how this works in general. Thank you.

Hi @Account_Creator

Generally, we don’t provide support on the forum for items not related to questions or issues about Roboflow, but in OBS there’s an option to create a virtual webcam, which simulates a real-life hardware camera using the OBS stream. That’s what it is talking about.

Hi Stellasphere,

Thanks for answering; I think I figured that part out (increment the cv2 VideoCapture number). Now I am able to find the json of the mapped images, however the coordinates appear to be concentrated in the top left of my screen where the little viewing window is (using infer-simple.py). For example,

[{‘x’: 163.0, ‘y’: 131.5, ‘width’: 6.0, ‘height’: 9.0, ‘confidence’: 0.9108943343162537, ‘class’: ‘map-exit’}, {‘x’: 78.0, ‘y’: 119.5, ‘width’: 18.0, ‘height’: 23.0, ‘confidence’: 0.9022361040115356, ‘class’: ‘runite-ore’}, {‘x’: 105.0, ‘y’: 69.0, ‘width’: 14.0, ‘height’: 18.0, ‘confidence’: 0.6309911608695984, ‘class’: ‘runite-ore’}, {‘x’: 198.5, ‘y’: 20.5, ‘width’: 9.0, ‘height’: 11.0, ‘confidence’: 0.45913344621658325, ‘class’: ‘ore-box’}]

Do you have any idea what system these coordinates are in and/or how to map these back to the regular computer screen’s coordinates?

Hi @Account_Creator

Roboflow’s coordinates will return the x and y for the center point of the detection. These are all relative to the image that the API was provided with.

Check out Roboflow’s hosted API docs for more info on what the results mean.