Skip to content

Downloading and using LabelImg

Sly Automation edited this page Jan 19, 2022 · 21 revisions

Using screenshot loop to capture screen images for training model

if you need to capture images of the screen for the training model, open and run the script screenshot_loop.py

Make sure to change the settings to suit your needs:

monitor = {"top": 40, "left": 0, "width": 800, "height": 640} # adjust to align with your monitor or screensize that you want to capture

img = 0 # used to determine a count of the images; if starting the loop again make sure to change this number greater than the last saved image e.g below img = 10

image

mob = 'cow' # change to the name of the object/mob to detect and train for.

Run the script, images will be saved under datasets/osrs

image

Download and Install LabelImg

labelImg = https://tzutalin.github.io/labelImg/

Click the link of the latest version for your os (windows or linux), i'm using Windows_v1.8.0.

image

Open downloaded zip file and extract the contents to the desktop or the default user folder.

image

image

Using LabelImg

Open the application lableImg.exe

image

Click on 'Open Dir' and locate the images to be used for training the object detection model.

Also click 'Change Save Dir' and change the folder to the same location, this will ensure the yolo labels are saved in the same place.

image

Clone this wiki locally