oak-model-samples's People
Forkers
satoshirobatofujimoto tasteitheivalue hernymtz nguyenanhtuan1008 adribee cassiodezotti pugnacioius lmorales45 esimionato danielgonzalezcosta rizwandel yendidev ksajan reed4u frgfrg mhassan93 mikful philnelson kissat russ76 nyadla-sys ahmd-nish fabricejumeloak-model-samples's Issues
Unable to run emotion_recognition_retail - attributeError: __args__
I have OAK-D and I am able to run other samples from depthAI on my OAK-D device.
I am running on mac.
Followed the steps provided in blog.
I get the following output -
2021-09-28 15:21:56.790 | WARNING | modelplace_api.utils::13 - The 'pycocotools' package wasn't found. Slow encoding and decoding are used for the RLE mask.
Traceback (most recent call last):
File "/Users/i036148/oak-model-samples/emotion_recognition_retail/main.py", line 3, in
from modelplace_api.visualization import draw_emotion_recognition_one_frame
File "/Users/i036148/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/modelplace_api/init.py", line 4, in
import modelplace_api.visualization
File "/Users/i036148/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/modelplace_api/visualization.py", line 9, in
from .objects import (
File "/Users/i036148/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/modelplace_api/objects.py", line 64, in
class Pose(pydantic.BaseModel):
File "/Users/i036148/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/pydantic/main.py", line 246, in new
fields[ann_name] = inferred = ModelField.infer(
File "/Users/i036148/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/pydantic/fields.py", line 310, in infer
return cls(
File "/Users/i036148/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/pydantic/fields.py", line 272, in init
self.prepare()
File "/Users/i036148/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/pydantic/fields.py", line 364, in prepare
self.type_analysis()
File "/Users/i036148/.espressif/python_env/idf4.4_py3.9_env/lib/python3.9/site-packages/pydantic/fields.py", line 453, in type_analysis
self.type = self.type.args[0]
File "/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 706, in getattr
raise AttributeError(attr)
AttributeError: args
facial_landmarks_35_adas AssertionError
Ubuntu 20.10 and Python 3.8.
My guess is that Python 3.8 is the problem.
~/Repositories/oak-model-samples/facial_landmarks_35_adas
$ python3 main.py -cam
[14442C10A1E2F0D000] [39.276] [NeuralNetwork(4)] [warning] Network compiled for 4 shaves, maximum available 16, compiling for 8 shaves likely will yield in better performance
[14442C10A1E2F0D000] [1.986] [NeuralNetwork(4)] [warning] Network compiled for 4 shaves, maximum available 13, compiling for 6 shaves likely will yield in better performance
[14442C10A1E2F0D000] [2.028] [NeuralNetwork(1)] [warning] Network compiled for 4 shaves, maximum available 13, compiling for 6 shaves likely will yield in better performance
[14442C10A1E2F0D000] [2.037] [NeuralNetwork(4)] [warning] The issued warnings are orientative, based on optimal settings for a single network, if multiple networks are running in parallel the optimal settings may vary
[14442C10A1E2F0D000] [2.037] [NeuralNetwork(1)] [warning] The issued warnings are orientative, based on optimal settings for a single network, if multiple networks are running in parallel the optimal settings may vary
Traceback (most recent call last):
File "main.py", line 17, in <module>
main()
File "main.py", line 13, in main
inference(model_cls, root_model_path, visualization)
File "/home/drew/Repositories/oak-model-samples/facial_landmarks_35_adas/oak_inference_utils/inference.py", line 65, in inference
inference_results = process_cam(model, visualization_func)
File "/home/drew/Repositories/oak-model-samples/facial_landmarks_35_adas/oak_inference_utils/inference.py", line 50, in process_cam
ret, proceed = process_frame(image, model, visualization_func)
File "/home/drew/Repositories/oak-model-samples/facial_landmarks_35_adas/oak_inference_utils/inference.py", line 14, in process_frame
ret = model.process_sample(Image.fromarray(image))
File "/home/drew/Repositories/oak-model-samples/facial_landmarks_35_adas/oak_inference_utils/base_model.py", line 165, in process_sample
data = self.preprocess([image])
File "/home/drew/Repositories/oak-model-samples/facial_landmarks_35_adas/facial_landmarks_35_adas/model.py", line 34, in preprocess
face_bboxes = self.get_first_stage_result(data)
File "/home/drew/Repositories/oak-model-samples/facial_landmarks_35_adas/oak_inference_utils/base_model.py", line 260, in get_first_stage_result
first_stage_output = self.first_stage.forward(
File "/home/drew/Repositories/oak-model-samples/facial_landmarks_35_adas/facial_landmarks_35_adas/face_processing.py", line 94, in forward
assert wait_for_results(out_queue)
AssertionError
Is OAK-1 capable of providing depth data?
Hi there,
I have read through both OAK-1 and OAK-D.
It seems that they both are able to provide depth data.
Could you please confirm this?
Windows installation commands for OpenPose
This is related with OpenPose example, but I think it will affect the other examples too.
################
Set up a package:
2.1 python3 setup.py bdist_wheel && rm -R build/ *.egg-info
2.2 pip3 install dist/*.whl -f https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/depthai/ && rm -R dist/
################
This commands do not work on Windows.
"rm" needs to be replaced by "del"
Also, "python3" does not work on Windows, it should be "python".
I am having problems translating this command to Windows CMD... Unable to install the dist and to execute those commands.
Could you please provide an installation guide for Windows?
Thanks!
PD: I am a newbie.
Blob files not cloning as expected
Ubuntu 20.10
Python 3.8
DepthAI 0.0.2.1+87247bfb645027a30c68191d88fe1b69b70e39ac
Git 2.27.0
I don't know if this is by design or a problem, but blob files aren't cloning as expected.
I cloned this repo using:
git clone https://github.com/opencv-ai/oak-model-samples.git
But all "checkpoint/*blob" files are actually text files similar to:
version https://git-lfs.github.com/spec/v1
oid sha256:ae7da3959157fde405376d9aa53147c4130c475119f012f33e5f22dac880adb4
size 1341888
To get the samples to work I have to return to GitHub and browse to a "checkpoint" folder like "https://github.com/opencv-ai/oak-model-samples/tree/main/facial_landmarks_35_adas/checkpoint", select a blob file, and then click "view raw" to download it to the respective checkpoint folder.
ModuleNotFoundError: No module named 'loguru'
Hi,
basically every sample i tried gives me the following error:
lightweight_openpose\modelplace_api\utils.py", line 5, in
from loguru import logger
ModuleNotFoundError: No module named 'loguru'
I am currently running a windows 10 system with an oak-d camera connected to it.
I followed the install instructions and ran the setup.py
Checking via pip loguru should be installed:
pip install loguru
Requirement already satisfied: loguru in c:\program files\python39\lib\site-packages (0.5.1)
Requirement already satisfied: win32-setctime>=1.0.0 in c:\program files\python39\lib\site-packages (from loguru) (1.0.3)
Requirement already satisfied: colorama>=0.3.4 in c:\program files\python39\lib\site-packages (from loguru) (0.4.4)
What am i missing?
lightweight_openpose video error
Ubuntu 20.10
Python 3.8
DepthAI 0.0.2.1+87247bfb645027a30c68191d88fe1b69b70e39ac
Looks like the video is broken. Error is: "moov atom not found".
The sample runs when using only the camera.
~/Repositories/oak-model-samples/lightweight_openpose
$ pip3 install wheel && python3 setup.py bdist_wheel && rm -R build/ *.egg-info
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: wheel in /home/drew/.local/lib/python3.8/site-packages (0.36.2)
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/lightweight_openpose
copying lightweight_openpose/utils.py -> build/lib/lightweight_openpose
copying lightweight_openpose/model.py -> build/lib/lightweight_openpose
copying lightweight_openpose/__init__.py -> build/lib/lightweight_openpose
creating build/lib/oak_inference_utils
copying oak_inference_utils/inference.py -> build/lib/oak_inference_utils
copying oak_inference_utils/args_parser.py -> build/lib/oak_inference_utils
copying oak_inference_utils/base_model.py -> build/lib/oak_inference_utils
copying oak_inference_utils/__init__.py -> build/lib/oak_inference_utils
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/oak_inference_utils
copying build/lib/oak_inference_utils/inference.py -> build/bdist.linux-x86_64/wheel/oak_inference_utils
copying build/lib/oak_inference_utils/args_parser.py -> build/bdist.linux-x86_64/wheel/oak_inference_utils
copying build/lib/oak_inference_utils/base_model.py -> build/bdist.linux-x86_64/wheel/oak_inference_utils
copying build/lib/oak_inference_utils/__init__.py -> build/bdist.linux-x86_64/wheel/oak_inference_utils
creating build/bdist.linux-x86_64/wheel/lightweight_openpose
copying build/lib/lightweight_openpose/utils.py -> build/bdist.linux-x86_64/wheel/lightweight_openpose
copying build/lib/lightweight_openpose/model.py -> build/bdist.linux-x86_64/wheel/lightweight_openpose
copying build/lib/lightweight_openpose/__init__.py -> build/bdist.linux-x86_64/wheel/lightweight_openpose
running install_egg_info
running egg_info
creating lightweight_openpose.egg-info
writing lightweight_openpose.egg-info/PKG-INFO
writing dependency_links to lightweight_openpose.egg-info/dependency_links.txt
writing requirements to lightweight_openpose.egg-info/requires.txt
writing top-level names to lightweight_openpose.egg-info/top_level.txt
writing manifest file 'lightweight_openpose.egg-info/SOURCES.txt'
reading manifest file 'lightweight_openpose.egg-info/SOURCES.txt'
writing manifest file 'lightweight_openpose.egg-info/SOURCES.txt'
Copying lightweight_openpose.egg-info to build/bdist.linux-x86_64/wheel/lightweight_openpose-0.2.0-py3.8.egg-info
running install_scripts
adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
creating build/bdist.linux-x86_64/wheel/lightweight_openpose-0.2.0.dist-info/WHEEL
creating 'dist/lightweight_openpose-0.2.0-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'lightweight_openpose/__init__.py'
adding 'lightweight_openpose/model.py'
adding 'lightweight_openpose/utils.py'
adding 'oak_inference_utils/__init__.py'
adding 'oak_inference_utils/args_parser.py'
adding 'oak_inference_utils/base_model.py'
adding 'oak_inference_utils/inference.py'
adding 'lightweight_openpose-0.2.0.dist-info/LICENSE'
adding 'lightweight_openpose-0.2.0.dist-info/METADATA'
adding 'lightweight_openpose-0.2.0.dist-info/WHEEL'
adding 'lightweight_openpose-0.2.0.dist-info/top_level.txt'
adding 'lightweight_openpose-0.2.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
~/Repositories/oak-model-samples/lightweight_openpose
$ pip3 install dist/*.whl -f https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/depthai/ && rm -R dist/
Defaulting to user installation because normal site-packages is not writeable
Looking in links: https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/depthai/
Processing ./dist/lightweight_openpose-0.2.0-py3-none-any.whl
Collecting modelplace-api[vis]@ https://github.com/opencv-ai/modelplace-api/archive/v0.4.7.zip
Using cached https://github.com/opencv-ai/modelplace-api/archive/v0.4.7.zip
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: depthai==0.0.2.1+87247bfb645027a30c68191d88fe1b69b70e39ac in /home/drew/.local/lib/python3.8/site-packages (from lightweight-openpose==0.2.0) (0.0.2.1+87247bfb645027a30c68191d88fe1b69b70e39ac)
Requirement already satisfied: pydantic==1.5.1 in /home/drew/.local/lib/python3.8/site-packages (from modelplace-api[vis]@ https://github.com/opencv-ai/modelplace-api/archive/v0.4.7.zip->lightweight-openpose==0.2.0) (1.5.1)
Requirement already satisfied: loguru==0.5.1 in /home/drew/.local/lib/python3.8/site-packages (from modelplace-api[vis]@ https://github.com/opencv-ai/modelplace-api/archive/v0.4.7.zip->lightweight-openpose==0.2.0) (0.5.1)
Requirement already satisfied: numpy>=1.16.4 in /home/drew/.local/lib/python3.8/site-packages (from modelplace-api[vis]@ https://github.com/opencv-ai/modelplace-api/archive/v0.4.7.zip->lightweight-openpose==0.2.0) (1.17.5)
Requirement already satisfied: Pillow==7.1.2 in /home/drew/.local/lib/python3.8/site-packages (from modelplace-api[vis]@ https://github.com/opencv-ai/modelplace-api/archive/v0.4.7.zip->lightweight-openpose==0.2.0) (7.1.2)
Requirement already satisfied: imageio==2.9.0 in /home/drew/.local/lib/python3.8/site-packages (from modelplace-api[vis]@ https://github.com/opencv-ai/modelplace-api/archive/v0.4.7.zip->lightweight-openpose==0.2.0) (2.9.0)
Requirement already satisfied: opencv-python<5.0,>=4.2.0.34 in /home/drew/.local/lib/python3.8/site-packages (from modelplace-api[vis]@ https://github.com/opencv-ai/modelplace-api/archive/v0.4.7.zip->lightweight-openpose==0.2.0) (4.5.1.48)
Requirement already satisfied: sk-video==1.1.10 in /home/drew/.local/lib/python3.8/site-packages (from modelplace-api[vis]@ https://github.com/opencv-ai/modelplace-api/archive/v0.4.7.zip->lightweight-openpose==0.2.0) (1.1.10)
Requirement already satisfied: pycocotools==2.0.2 in /home/drew/.local/lib/python3.8/site-packages (from modelplace-api[vis]@ https://github.com/opencv-ai/modelplace-api/archive/v0.4.7.zip->lightweight-openpose==0.2.0) (2.0.2)
Requirement already satisfied: matplotlib>=2.1.0 in /usr/lib/python3/dist-packages (from pycocotools==2.0.2->modelplace-api[vis]@ https://github.com/opencv-ai/modelplace-api/archive/v0.4.7.zip->lightweight-openpose==0.2.0) (3.3.0)
Requirement already satisfied: setuptools>=18.0 in /home/drew/.local/lib/python3.8/site-packages (from pycocotools==2.0.2->modelplace-api[vis]@ https://github.com/opencv-ai/modelplace-api/archive/v0.4.7.zip->lightweight-openpose==0.2.0) (54.2.0)
Requirement already satisfied: cython>=0.27.3 in /home/drew/.local/lib/python3.8/site-packages (from pycocotools==2.0.2->modelplace-api[vis]@ https://github.com/opencv-ai/modelplace-api/archive/v0.4.7.zip->lightweight-openpose==0.2.0) (0.29.22)
Requirement already satisfied: scipy in /home/drew/.local/lib/python3.8/site-packages (from sk-video==1.1.10->modelplace-api[vis]@ https://github.com/opencv-ai/modelplace-api/archive/v0.4.7.zip->lightweight-openpose==0.2.0) (1.4.1)
Installing collected packages: lightweight-openpose
Successfully installed lightweight-openpose-0.2.0
~/Repositories/oak-model-samples/lightweight_openpose
$ python3 main.py -vid ./demo.mp4
Traceback (most recent call last):
File "main.py", line 17, in <module>
main()
File "main.py", line 13, in main
inference(model_cls, root_model_path, visualization)
File "/home/drew/Repositories/oak-model-samples/lightweight_openpose/oak_inference_utils/inference.py", line 59, in inference
model.model_load()
File "/home/drew/Repositories/oak-model-samples/lightweight_openpose/oak_inference_utils/base_model.py", line 82, in model_load
self.create_pipeline(model_blob)
File "/home/drew/Repositories/oak-model-samples/lightweight_openpose/oak_inference_utils/base_model.py", line 73, in create_pipeline
self.model_blob.setBlobPath(model_blob)
RuntimeError: BlobReader error: File does not seem to be a supported neural network blob
~/Repositories/oak-model-samples/lightweight_openpose
$ python3 main.py -vid ./demo.mp4
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2570440] moov atom not found
~/Repositories/oak-model-samples/lightweight_openpose
$ python3 main.py -cam
ModuleNotFoundError: No module named 'modelplace_api'
Try to run yolov4_tiny as suggested: python3 main.py -cam -vid
Traceback (most recent call last):
File "main.py", line 3, in
from modelplace_api.visualization import draw_detections_one_frame
ModuleNotFoundError: No module named 'modelplace_api'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.