Spaces:
Runtime error
Runtime error
CaesarCloudSync
commited on
Commit
·
15dd0ab
1
Parent(s):
a8ca8a1
CaesarAI Fixed I think
Browse files- CaesarFaceDetection/__pycache__/caesarfd.cpython-39.pyc +0 -0
- CaesarFaceRecognition/__pycache__/caesardeepface.cpython-39.pyc +0 -0
- CaesarHotelBooking/__pycache__/caesarhotelbooking.cpython-39.pyc +0 -0
- CaesarObjectDetection/CaesarYolo.py +1 -1
- CaesarObjectDetection/__pycache__/CaesarYolo.cpython-39.pyc +0 -0
- RequestModels.py +0 -1
- __pycache__/CaesarDetectEntity.cpython-39.pyc +0 -0
- __pycache__/CaesarTranslate.cpython-39.pyc +0 -0
- __pycache__/CaesarVoice.cpython-39.pyc +0 -0
- __pycache__/RequestModels.cpython-39.pyc +0 -0
- __pycache__/csv_to_db.cpython-39.pyc +0 -0
- __pycache__/main.cpython-39.pyc +0 -0
- imtest.json +0 -0
- main.py +3 -1
- requirements.txt +33 -71
- test.txt +27 -0
- test1.py +6 -0
CaesarFaceDetection/__pycache__/caesarfd.cpython-39.pyc
ADDED
|
Binary file (1.66 kB). View file
|
|
|
CaesarFaceRecognition/__pycache__/caesardeepface.cpython-39.pyc
ADDED
|
Binary file (2.3 kB). View file
|
|
|
CaesarHotelBooking/__pycache__/caesarhotelbooking.cpython-39.pyc
CHANGED
|
Binary files a/CaesarHotelBooking/__pycache__/caesarhotelbooking.cpython-39.pyc and b/CaesarHotelBooking/__pycache__/caesarhotelbooking.cpython-39.pyc differ
|
|
|
CaesarObjectDetection/CaesarYolo.py
CHANGED
|
@@ -10,7 +10,7 @@ class CaesarYolo:
|
|
| 10 |
self.CONFIDENCE = 0.5
|
| 11 |
self.SCORE_THRESHOLD = 0.5
|
| 12 |
self.IOU_THRESHOLD = 0.5
|
| 13 |
-
self.current_dir = os.path.realpath(__file__).replace(f"
|
| 14 |
config_path = f"{self.current_dir}/cfg/yolov3.cfg"
|
| 15 |
weights_path = f"{self.current_dir}/weights/yolov3.weights"
|
| 16 |
self.font_scale = 1
|
|
|
|
| 10 |
self.CONFIDENCE = 0.5
|
| 11 |
self.SCORE_THRESHOLD = 0.5
|
| 12 |
self.IOU_THRESHOLD = 0.5
|
| 13 |
+
self.current_dir = os.path.realpath(__file__).replace(f"\\CaesarYolo.py","")
|
| 14 |
config_path = f"{self.current_dir}/cfg/yolov3.cfg"
|
| 15 |
weights_path = f"{self.current_dir}/weights/yolov3.weights"
|
| 16 |
self.font_scale = 1
|
CaesarObjectDetection/__pycache__/CaesarYolo.cpython-39.pyc
CHANGED
|
Binary files a/CaesarObjectDetection/__pycache__/CaesarYolo.cpython-39.pyc and b/CaesarObjectDetection/__pycache__/CaesarYolo.cpython-39.pyc differ
|
|
|
RequestModels.py
CHANGED
|
@@ -51,7 +51,6 @@ class CaesarObjectDetectModel(BaseModel):
|
|
| 51 |
shape:List
|
| 52 |
class CaesarOCRHTTPModel(BaseModel):
|
| 53 |
frame: str
|
| 54 |
-
shape:List
|
| 55 |
|
| 56 |
class TriggerAPIModel(BaseModel):
|
| 57 |
user_trigger : str
|
|
|
|
| 51 |
shape:List
|
| 52 |
class CaesarOCRHTTPModel(BaseModel):
|
| 53 |
frame: str
|
|
|
|
| 54 |
|
| 55 |
class TriggerAPIModel(BaseModel):
|
| 56 |
user_trigger : str
|
__pycache__/CaesarDetectEntity.cpython-39.pyc
CHANGED
|
Binary files a/__pycache__/CaesarDetectEntity.cpython-39.pyc and b/__pycache__/CaesarDetectEntity.cpython-39.pyc differ
|
|
|
__pycache__/CaesarTranslate.cpython-39.pyc
CHANGED
|
Binary files a/__pycache__/CaesarTranslate.cpython-39.pyc and b/__pycache__/CaesarTranslate.cpython-39.pyc differ
|
|
|
__pycache__/CaesarVoice.cpython-39.pyc
CHANGED
|
Binary files a/__pycache__/CaesarVoice.cpython-39.pyc and b/__pycache__/CaesarVoice.cpython-39.pyc differ
|
|
|
__pycache__/RequestModels.cpython-39.pyc
CHANGED
|
Binary files a/__pycache__/RequestModels.cpython-39.pyc and b/__pycache__/RequestModels.cpython-39.pyc differ
|
|
|
__pycache__/csv_to_db.cpython-39.pyc
CHANGED
|
Binary files a/__pycache__/csv_to_db.cpython-39.pyc and b/__pycache__/csv_to_db.cpython-39.pyc differ
|
|
|
__pycache__/main.cpython-39.pyc
CHANGED
|
Binary files a/__pycache__/main.cpython-39.pyc and b/__pycache__/main.cpython-39.pyc differ
|
|
|
imtest.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
main.py
CHANGED
|
@@ -93,7 +93,9 @@ async def caesarfacedetect(websocket: WebSocket):
|
|
| 93 |
def caesarfacesnap(frames: CaesarOCRHTTPModel):
|
| 94 |
try:
|
| 95 |
frames = dict(frames)
|
| 96 |
-
|
|
|
|
|
|
|
| 97 |
image = caesarfacedetectmodel.detect_face(image,snapcropface=True)
|
| 98 |
if image == [] or image is None:
|
| 99 |
return {"frame":"no face was detected."}
|
|
|
|
| 93 |
def caesarfacesnap(frames: CaesarOCRHTTPModel):
|
| 94 |
try:
|
| 95 |
frames = dict(frames)
|
| 96 |
+
image_arr = np.frombuffer(base64.b64decode(frames["frame"]),dtype="uint8")
|
| 97 |
+
image = cv2.imdecode(image_arr,flags=cv2.IMREAD_COLOR)
|
| 98 |
+
#.reshape(frames["shape"][0],frames["shape"][1],3)
|
| 99 |
image = caesarfacedetectmodel.detect_face(image,snapcropface=True)
|
| 100 |
if image == [] or image is None:
|
| 101 |
return {"frame":"no face was detected."}
|
requirements.txt
CHANGED
|
@@ -1,114 +1,85 @@
|
|
| 1 |
absl-py==1.4.0
|
| 2 |
anyio==3.6.2
|
| 3 |
-
arrow==1.2.3
|
| 4 |
-
asgiref==3.6.0
|
| 5 |
astunparse==1.6.3
|
| 6 |
beautifulsoup4==4.11.2
|
| 7 |
-
bidict==0.22.1
|
| 8 |
-
binaryornot==0.4.4
|
| 9 |
blis==0.7.9
|
| 10 |
-
briefcase==0.3.9
|
| 11 |
cachetools==5.3.0
|
| 12 |
catalogue==2.0.8
|
| 13 |
certifi==2022.12.7
|
| 14 |
chardet==3.0.4
|
| 15 |
charset-normalizer==3.0.1
|
| 16 |
click==8.1.3
|
|
|
|
| 17 |
confection==0.0.4
|
| 18 |
-
contourpy==1.0.
|
| 19 |
-
cookiecutter==2.1.1
|
| 20 |
cycler==0.11.0
|
| 21 |
cymem==2.0.7
|
| 22 |
-
|
| 23 |
-
deepface==0.0.78
|
| 24 |
dnspython==2.3.0
|
| 25 |
en-core-web-sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.5.0/en_core_web_sm-3.5.0-py3-none-any.whl
|
| 26 |
-
|
| 27 |
-
fastapi==0.
|
| 28 |
ffmpeg-python==0.2.0
|
| 29 |
filelock==3.9.0
|
| 30 |
fire==0.5.0
|
| 31 |
-
Flask==2.2.
|
| 32 |
-
Flask-Cors==3.0.10
|
| 33 |
-
Flask-JWT-Extended==4.4.4
|
| 34 |
flatbuffers==23.1.21
|
| 35 |
fonttools==4.38.0
|
| 36 |
future==0.18.3
|
| 37 |
gast==0.4.0
|
| 38 |
-
|
| 39 |
-
gdown==4.6.3
|
| 40 |
-
gitdb==4.0.10
|
| 41 |
-
GitPython==3.1.30
|
| 42 |
google-auth==2.16.1
|
| 43 |
google-auth-oauthlib==0.4.6
|
| 44 |
google-pasta==0.2.0
|
| 45 |
-
googletrans==3.
|
| 46 |
greenlet==2.0.2
|
| 47 |
-
grpcio==1.51.
|
| 48 |
-
gTTS==2.
|
| 49 |
-
|
| 50 |
h11==0.9.0
|
| 51 |
h2==3.2.0
|
| 52 |
h5py==3.8.0
|
| 53 |
hpack==3.0.0
|
| 54 |
hstspreload==2023.1.1
|
| 55 |
httpcore==0.9.1
|
| 56 |
-
httptools==0.5.0
|
| 57 |
httpx==0.13.3
|
| 58 |
-
huggingface-hub==0.12.
|
| 59 |
hyperframe==5.2.0
|
| 60 |
idna==2.10
|
| 61 |
-
imageio==2.25.1
|
| 62 |
-
imageio-ffmpeg==0.4.8
|
| 63 |
importlib-metadata==6.0.0
|
| 64 |
-
|
| 65 |
-
install==1.3.5
|
| 66 |
itsdangerous==2.1.2
|
| 67 |
Jinja2==3.1.2
|
| 68 |
-
jinja2-time==0.2.0
|
| 69 |
keras==2.11.0
|
| 70 |
-
Kivy==2.1.0
|
| 71 |
-
Kivy-examples==2.1.0
|
| 72 |
-
Kivy-Garden==0.1.5
|
| 73 |
kiwisolver==1.4.4
|
| 74 |
langcodes==3.3.0
|
| 75 |
libclang==15.0.6.1
|
| 76 |
lxml==4.9.2
|
| 77 |
Markdown==3.4.1
|
| 78 |
-
markdown-it-py==2.1.0
|
| 79 |
MarkupSafe==2.1.2
|
| 80 |
-
matplotlib==3.
|
| 81 |
-
mdurl==0.1.2
|
| 82 |
-
moviepy==1.0.2
|
| 83 |
mtcnn==0.1.1
|
| 84 |
murmurhash==1.0.9
|
| 85 |
-
numpy==1.
|
| 86 |
oauthlib==3.2.2
|
| 87 |
-
opencv-python==4.7.0.
|
| 88 |
opt-einsum==3.3.0
|
| 89 |
packaging==23.0
|
| 90 |
-
pandas==1.3
|
| 91 |
pandas-datareader==0.10.0
|
| 92 |
pathy==0.10.1
|
| 93 |
Pillow==9.4.0
|
| 94 |
-
platformdirs==3.0.0
|
| 95 |
preshed==3.0.8
|
| 96 |
-
proglog==0.1.10
|
| 97 |
protobuf==3.19.6
|
| 98 |
-
psutil==5.9.4
|
| 99 |
pyasn1==0.4.8
|
| 100 |
pyasn1-modules==0.2.8
|
| 101 |
-
|
| 102 |
-
pydantic==1.10.4
|
| 103 |
-
PyGObject==3.42.2
|
| 104 |
-
PyJWT==2.6.0
|
| 105 |
pymongo==4.3.3
|
| 106 |
pyparsing==3.0.9
|
|
|
|
| 107 |
pytesseract==0.3.10
|
| 108 |
python-dateutil==2.8.2
|
| 109 |
-
python-
|
| 110 |
-
python-multipart==0.0.5
|
| 111 |
-
python-slugify==8.0.0
|
| 112 |
pytz==2022.7.1
|
| 113 |
PyYAML==6.0
|
| 114 |
regex==2022.10.31
|
|
@@ -116,46 +87,37 @@ requests==2.28.2
|
|
| 116 |
requests-oauthlib==1.3.1
|
| 117 |
retina-face==0.0.13
|
| 118 |
rfc3986==1.5.0
|
| 119 |
-
rich==13.3.1
|
| 120 |
rsa==4.9
|
| 121 |
-
sentencepiece==0.1.97
|
| 122 |
six==1.16.0
|
| 123 |
smart-open==6.3.0
|
| 124 |
-
smmap==5.0.0
|
| 125 |
sniffio==1.3.0
|
| 126 |
-
soupsieve==2.
|
| 127 |
spacy==3.5.0
|
| 128 |
spacy-legacy==3.0.12
|
| 129 |
spacy-loggers==1.0.4
|
| 130 |
SpeechRecognition==3.9.0
|
|
|
|
| 131 |
srsly==2.4.5
|
| 132 |
-
starlette==0.
|
| 133 |
tensorboard==2.11.2
|
| 134 |
tensorboard-data-server==0.6.1
|
| 135 |
tensorboard-plugin-wit==1.8.1
|
| 136 |
tensorflow==2.11.0
|
| 137 |
tensorflow-estimator==2.11.0
|
| 138 |
-
tensorflow-
|
|
|
|
| 139 |
termcolor==2.2.0
|
| 140 |
-
text-unidecode==1.3
|
| 141 |
thinc==8.1.7
|
| 142 |
-
toga-core==0.3.0
|
| 143 |
-
toga-gtk==0.3.0
|
| 144 |
tokenizers==0.13.2
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
tqdm
|
| 148 |
transformers==4.26.1
|
| 149 |
-
travertino==0.1.3
|
| 150 |
typer==0.7.0
|
| 151 |
-
typing_extensions==4.
|
| 152 |
urllib3==1.26.14
|
| 153 |
-
uvicorn==0.
|
| 154 |
-
uvloop==0.17.0
|
| 155 |
wasabi==1.1.1
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
wsproto==1.2.0
|
| 161 |
-
zipp==3.13.0
|
|
|
|
| 1 |
absl-py==1.4.0
|
| 2 |
anyio==3.6.2
|
|
|
|
|
|
|
| 3 |
astunparse==1.6.3
|
| 4 |
beautifulsoup4==4.11.2
|
|
|
|
|
|
|
| 5 |
blis==0.7.9
|
|
|
|
| 6 |
cachetools==5.3.0
|
| 7 |
catalogue==2.0.8
|
| 8 |
certifi==2022.12.7
|
| 9 |
chardet==3.0.4
|
| 10 |
charset-normalizer==3.0.1
|
| 11 |
click==8.1.3
|
| 12 |
+
colorama==0.4.6
|
| 13 |
confection==0.0.4
|
| 14 |
+
contourpy==1.0.7
|
|
|
|
| 15 |
cycler==0.11.0
|
| 16 |
cymem==2.0.7
|
| 17 |
+
deepface==0.0.79
|
|
|
|
| 18 |
dnspython==2.3.0
|
| 19 |
en-core-web-sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.5.0/en_core_web_sm-3.5.0-py3-none-any.whl
|
| 20 |
+
fastapi==0.92.0
|
| 21 |
+
fastapi-utils==0.2.1
|
| 22 |
ffmpeg-python==0.2.0
|
| 23 |
filelock==3.9.0
|
| 24 |
fire==0.5.0
|
| 25 |
+
Flask==2.2.3
|
|
|
|
|
|
|
| 26 |
flatbuffers==23.1.21
|
| 27 |
fonttools==4.38.0
|
| 28 |
future==0.18.3
|
| 29 |
gast==0.4.0
|
| 30 |
+
gdown==4.6.4
|
|
|
|
|
|
|
|
|
|
| 31 |
google-auth==2.16.1
|
| 32 |
google-auth-oauthlib==0.4.6
|
| 33 |
google-pasta==0.2.0
|
| 34 |
+
googletrans==3.0.0
|
| 35 |
greenlet==2.0.2
|
| 36 |
+
grpcio==1.51.3
|
| 37 |
+
gTTS==2.3.1
|
| 38 |
+
gunicorn==20.1.0
|
| 39 |
h11==0.9.0
|
| 40 |
h2==3.2.0
|
| 41 |
h5py==3.8.0
|
| 42 |
hpack==3.0.0
|
| 43 |
hstspreload==2023.1.1
|
| 44 |
httpcore==0.9.1
|
|
|
|
| 45 |
httpx==0.13.3
|
| 46 |
+
huggingface-hub==0.12.1
|
| 47 |
hyperframe==5.2.0
|
| 48 |
idna==2.10
|
|
|
|
|
|
|
| 49 |
importlib-metadata==6.0.0
|
| 50 |
+
importlib-resources==5.12.0
|
|
|
|
| 51 |
itsdangerous==2.1.2
|
| 52 |
Jinja2==3.1.2
|
|
|
|
| 53 |
keras==2.11.0
|
|
|
|
|
|
|
|
|
|
| 54 |
kiwisolver==1.4.4
|
| 55 |
langcodes==3.3.0
|
| 56 |
libclang==15.0.6.1
|
| 57 |
lxml==4.9.2
|
| 58 |
Markdown==3.4.1
|
|
|
|
| 59 |
MarkupSafe==2.1.2
|
| 60 |
+
matplotlib==3.7.0
|
|
|
|
|
|
|
| 61 |
mtcnn==0.1.1
|
| 62 |
murmurhash==1.0.9
|
| 63 |
+
numpy==1.24.2
|
| 64 |
oauthlib==3.2.2
|
| 65 |
+
opencv-python==4.7.0.72
|
| 66 |
opt-einsum==3.3.0
|
| 67 |
packaging==23.0
|
| 68 |
+
pandas==1.5.3
|
| 69 |
pandas-datareader==0.10.0
|
| 70 |
pathy==0.10.1
|
| 71 |
Pillow==9.4.0
|
|
|
|
| 72 |
preshed==3.0.8
|
|
|
|
| 73 |
protobuf==3.19.6
|
|
|
|
| 74 |
pyasn1==0.4.8
|
| 75 |
pyasn1-modules==0.2.8
|
| 76 |
+
pydantic==1.10.5
|
|
|
|
|
|
|
|
|
|
| 77 |
pymongo==4.3.3
|
| 78 |
pyparsing==3.0.9
|
| 79 |
+
PySocks==1.7.1
|
| 80 |
pytesseract==0.3.10
|
| 81 |
python-dateutil==2.8.2
|
| 82 |
+
python-multipart==0.0.6
|
|
|
|
|
|
|
| 83 |
pytz==2022.7.1
|
| 84 |
PyYAML==6.0
|
| 85 |
regex==2022.10.31
|
|
|
|
| 87 |
requests-oauthlib==1.3.1
|
| 88 |
retina-face==0.0.13
|
| 89 |
rfc3986==1.5.0
|
|
|
|
| 90 |
rsa==4.9
|
|
|
|
| 91 |
six==1.16.0
|
| 92 |
smart-open==6.3.0
|
|
|
|
| 93 |
sniffio==1.3.0
|
| 94 |
+
soupsieve==2.4
|
| 95 |
spacy==3.5.0
|
| 96 |
spacy-legacy==3.0.12
|
| 97 |
spacy-loggers==1.0.4
|
| 98 |
SpeechRecognition==3.9.0
|
| 99 |
+
SQLAlchemy==1.4.46
|
| 100 |
srsly==2.4.5
|
| 101 |
+
starlette==0.25.0
|
| 102 |
tensorboard==2.11.2
|
| 103 |
tensorboard-data-server==0.6.1
|
| 104 |
tensorboard-plugin-wit==1.8.1
|
| 105 |
tensorflow==2.11.0
|
| 106 |
tensorflow-estimator==2.11.0
|
| 107 |
+
tensorflow-intel==2.11.0
|
| 108 |
+
tensorflow-io-gcs-filesystem==0.31.0
|
| 109 |
termcolor==2.2.0
|
|
|
|
| 110 |
thinc==8.1.7
|
|
|
|
|
|
|
| 111 |
tokenizers==0.13.2
|
| 112 |
+
torch==1.13.1
|
| 113 |
+
tqdm==4.64.1
|
|
|
|
| 114 |
transformers==4.26.1
|
|
|
|
| 115 |
typer==0.7.0
|
| 116 |
+
typing_extensions==4.5.0
|
| 117 |
urllib3==1.26.14
|
| 118 |
+
uvicorn==0.20.0
|
|
|
|
| 119 |
wasabi==1.1.1
|
| 120 |
+
Werkzeug==2.2.3
|
| 121 |
+
wincertstore==0.2
|
| 122 |
+
wrapt==1.15.0
|
| 123 |
+
zipp==3.15.0
|
|
|
|
|
|
test.txt
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
altgraph==0.17.3
|
| 2 |
+
anyio==3.6.2
|
| 3 |
+
axios==0.1.0
|
| 4 |
+
click==8.1.3
|
| 5 |
+
colorama==0.4.6
|
| 6 |
+
comtypes==1.1.14
|
| 7 |
+
fastapi==0.92.0
|
| 8 |
+
fastapi-utils==0.2.1
|
| 9 |
+
flask-sock==0.6.0
|
| 10 |
+
greenlet==2.0.2
|
| 11 |
+
idna==3.4
|
| 12 |
+
pefile==2022.5.30
|
| 13 |
+
playsound==1.3.0
|
| 14 |
+
pydantic==1.10.5
|
| 15 |
+
Pygments==2.14.0
|
| 16 |
+
pyinstaller==5.7.0
|
| 17 |
+
pyinstaller-hooks-contrib==2022.14
|
| 18 |
+
pypiwin32==223
|
| 19 |
+
pyttsx3==2.90
|
| 20 |
+
pywin32-ctypes==0.2.0
|
| 21 |
+
resemble==1.3.0
|
| 22 |
+
simple-websocket==0.9.0
|
| 23 |
+
sniffio==1.3.0
|
| 24 |
+
SQLAlchemy==1.4.46
|
| 25 |
+
starlette==0.25.0
|
| 26 |
+
typing_extensions==4.5.0
|
| 27 |
+
wincertstore==0.2
|
test1.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import json
|
| 3 |
+
with open("imtest.json","r") as f:
|
| 4 |
+
tets = json.load(f)["info"]
|
| 5 |
+
resp = requests.post("http://10.0.170.41:7860/caesarocr",json={"frame":tets})
|
| 6 |
+
print(resp.json())
|