hopefully non-breaking changes to remove tensorflow requirement in systems that don't use it
(cherry picked from commit 935ed5174b)
This commit is contained in:
parent
31973d7d5c
commit
8aa0992330
18
init_win.bat
18
init_win.bat
|
|
@ -2,16 +2,22 @@
|
|||
:: RUN FROM POWERSHELL W/ADMIN RIGHTS:
|
||||
:: Set-ExecutionPolicy Unrestricted -Scope CurrentUser
|
||||
|
||||
pip install -r src/requirements.txt
|
||||
pip -m venv .venv
|
||||
|
||||
pip install -r src/requirements_win.txt
|
||||
|
||||
mkdir tmp
|
||||
cd tmp
|
||||
|
||||
:: Advantech XNAVI
|
||||
Invoke-WebRequest -uri "https://downloadt.advantech.com/download/downloadsr.aspx?File_Id=1-2BZC0F1" -usebasicparsing -outfile xnavi.zip
|
||||
Expand-Archive .\xnavi.zip
|
||||
cd xnavi
|
||||
./xnavi.exe
|
||||
:: BROKEN curl -o xnavi.zip "https://downloadt.advantech.com/download/downloadsr.aspx?File_Id=1-2BZC0F1"
|
||||
:: Expand-Archive .\xnavi.zip
|
||||
:: cd xnavi
|
||||
:: ./xnavi.exe
|
||||
|
||||
:: GXIPY
|
||||
Invoke-WebRequest -uri "https://dahengimaging.com/downloads/Galaxy_Windows_EN_32bits%2064bits_1.18.2208.9301.zip" -usebasicparsing -OutFile Galaxy_Windows_EN_32bits_64bits_1.18.2208.9301.zip
|
||||
:: BROKEN curl -o gxipy.zip "https://dahengimaging.com/downloads/Galaxy_Windows_EN_32bits%2064bits_1.18.2208.9301.zip"
|
||||
|
||||
:: GXIPY
|
||||
curl -o vc_redist.x64.exe "https://aka.ms/vs/17/release/vc_redist.x64.exe"
|
||||
./vc_redist.x64.exe
|
||||
|
|
@ -20,7 +20,7 @@ from .consumer import Consumer
|
|||
if "--no-gpu" in sys.argv:
|
||||
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
|
||||
|
||||
import tensorflow as tf
|
||||
#import tensorflow as tf
|
||||
from lib.helpers.object_detection.utils import label_map_util
|
||||
|
||||
if "--edgetpu" in sys.argv:
|
||||
|
|
@ -35,7 +35,7 @@ else:
|
|||
def make_interpreter(*args, **kwargs):
|
||||
raise ValueError("\"--no-edgetpu\" in sys.argv")
|
||||
|
||||
if "--no-tflite" not in sys.argv:
|
||||
if "--tflite" in sys.argv:
|
||||
try:
|
||||
Interpreter = tf.lite.Interpreter
|
||||
# from tflite_runtime.interpreter import Interpreter
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import logging
|
|||
import numpy as np
|
||||
from six import string_types
|
||||
from six.moves import range
|
||||
import tensorflow.compat.v1 as tf
|
||||
#import tensorflow.compat.v1 as tf
|
||||
from google.protobuf import text_format
|
||||
from lib.helpers.object_detection.protos import string_int_label_map_pb2
|
||||
|
||||
|
|
@ -168,7 +168,7 @@ def load_labelmap(path):
|
|||
Returns:
|
||||
a StringIntLabelMapProto
|
||||
"""
|
||||
with tf.io.gfile.GFile(path, 'r') as fid:
|
||||
with open(path, 'r') as fid:
|
||||
label_map_string = fid.read()
|
||||
label_map = string_int_label_map_pb2.StringIntLabelMap()
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -21,4 +21,3 @@ requests
|
|||
#tflite-runtime
|
||||
zebra
|
||||
pylibdmtx~=0.1.10
|
||||
pandas~=1.3.3
|
||||
23
src/requirements_win.txt
Normal file
23
src/requirements_win.txt
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
--extra-index-url https://google-coral.github.io/py-repo/
|
||||
argon2-cffi
|
||||
bottle
|
||||
google-cloud-storage
|
||||
imutils
|
||||
lxml
|
||||
nfcpy
|
||||
numpy
|
||||
opencv-python-headless
|
||||
peewee
|
||||
pillow
|
||||
pycoral
|
||||
pymodbus~=3.6.8
|
||||
pyqt5
|
||||
#pyqt5-tools
|
||||
pyserial
|
||||
pyserial-asyncio
|
||||
qrcode
|
||||
requests
|
||||
tensorflow-cpu
|
||||
#tflite-runtime
|
||||
zebra
|
||||
pylibdmtx~=0.1.10
|
||||
Loading…
Reference in New Issue
Block a user