NTUYWANG103 / APEX_AIMBOT

This is a YOLOV7 based APEX and CSGO Aimbot
GNU General Public License v3.0
583 stars 98 forks source link

Aimbot #138

Closed bbsbAk closed 4 months ago

bbsbAk commented 4 months ago

def save_screenshot(queue, dir='screenshot', freq=0.5): if not os.path.exists(dir): os.makedirs(dir) start_time = time.time() while True: img, locking, nums = queue.get() if (locking or nums > 0) and (time.time() - start_time >= freq): # having bounding boxes or locking will get screenshot img_bgr = cv2.cvtColor(img, cv2.COLOR_RGB2BGR) cv2.imwrite(os.path.join(dir, f'{time.time():.5f}.png'), img_bgr) start_time = time.time()