-
Notifications
You must be signed in to change notification settings - Fork 12
Downloading and using LabelImg
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
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
labelImg = https://github.com/heartexlabs/labelImg/releases
Click the link of the latest version for your os (windows or linux), i'm using Windows_v1.8.0.
Open downloaded zip file and extract the contents to the desktop or the default user folder.
Open the application lableImg.exe
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.
if using the screenshot_loop.py
script change the directory for both 'open Dir' and 'Change Save DIr' to the pycharm directory then to the osrs_yolov5/datasets/osrs
folder.
Click on the create Rectbox button or use the keyboard shortcut W, type the desired name for the annoted object and click ok.
The right section is all the annoted objects with the names and in the lower right section is the path to all the images in the current directory selected.