Save contacts from your terminal
Project description
what is this
diablo 2 vision system is a library to assist with the automation of d2, using only pixels, keyboard and mouse
installation
$ pip install d2vs
NOTE: this can run via CPU, but via GPU is far superior. You must install CUDA and the appropriate python jazz to get that working, for me with CUDA10.1:
$ conda install torch torchvision cudatoolkit=10.1 -c pytorch
usage
(586_gold.png)
import numpy as np
from d2vs.ocr import OCR
from PIL import Image
# Initiate OCR
ocr = OCR()
# Load an Image
img = Image.open("586_gold.png")
# Scan the image
bounds, text, item_type = ocr.read(img)
# Print out the data for demo purposes
top_left, top_right, bottom_right, bottom_left = bounds
print(top_left, top_right, bottom_right, bottom_left)
# ([2, 2], [158, 2], [158, 32], [2, 32])
print(text)
# '586 Gold'
print(item_type)
# 'Normal'
project goals
- Have fun automating single player! Not for profit
- OCR with near 100% accuracy
- Visually determine where you are in game, area level and world coordinate system
- Click from world coords to screen coords
- Path through unexplored areas to a goal
- Facilitate complete d2 bot from lvl 1 to 99
- Pick it
an example map reading from d2vs of black marsh
nodes for the static map Harrogath
development
setup
$ git clone ...
$ pip install -r requirements.dev.txt
running tests
$ pytest
distributing
$ python setup.py sdist bdist_wheel
$ twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file d2vs-0.0.3.tar.gz.
File metadata
- Download URL: d2vs-0.0.3.tar.gz
- Upload date:
- Size: 14.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81c4170e54d43e8d3eb2e097d38489372afd9e637da0cc3801c55fc5255d605a
|
|
| MD5 |
23b6b3b5a91f429703028c2fc7d6cdca
|
|
| BLAKE2b-256 |
0967513ebb15ccd3941cd4adb0558430a0a3fd8988df8d11d15c957d4935625e
|
File details
Details for the file d2vs-0.0.3-py3-none-any.whl.
File metadata
- Download URL: d2vs-0.0.3-py3-none-any.whl
- Upload date:
- Size: 14.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19f3fd9339cd2e764064748e54fd28e6d183453946e5cb2cf59b016adb4e7bc6
|
|
| MD5 |
52d3676f49d4690d7abcaa5b4ffb6a5d
|
|
| BLAKE2b-256 |
4382198c9ca0c415e739796d612bf3b9f9072ff4146e9994c902eb6a429cca7f
|