open_model_zoo
open_model_zoo copied to clipboard
Update smart science lab demo
Update UI and modify some demo logic including mstcn, skip frame.
@Wovchena sorry I forget to emphasize it's a draft pull request for now and thanks for your comments. I will fix them and let you know when it's ready ASAP.
Just not to forget. Please update model description and add new models to https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/intel
The demo fails for me:
py ~/r/z/demos/smartlab_demo/python/smartlab_demo.py -tv "c:\Users\vzlobin\Downloads\stream_1_top.mp4" -sv "c:\Users\vzlobin\Downloads\stream_1_left.mp4" -m_ta "c:\Users\vzlobin\Downloads\d\mw-top-all-yolox-n.xml" -m_tm "c:\Users\vzlobin\Downloads\d\mw-top-scale-yolox-n.xml" -m_sa "c:\Users\vzlobin\Downloads\d\mw-side-all-yolox-n.xml" -m_sm "c:\Users\vzlobin\Downloads\d\mw-side-ruler-yolox-n.xml" -m_en_t "c:\Users\vzlobin\Downloads\d\encoder_top.xml" -m_en_s "c:\Users\vzlobin\Downloads\d\encoder_side.xml" -m_de "c:\Users\vzlobin\Downloads\d\decoder.xml" [ WARN:[email protected]] global D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp (239) cv::findDecoder imread_('C:\Users\vzlobin\Downloads\d/icon/wait.png'): can't open/read file: check file path/integrity [ WARN:[email protected]] global D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp (239) cv::findDecoder imread_('C:\Users\vzlobin\Downloads\d/icon/no.png'): can't open/read file: check file path/integrity [ WARN:[email protected]] global D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp (239) cv::findDecoder imread_('C:\Users\vzlobin\Downloads\d/icon/done.png'): can't open/read file: check file path/integrity Exception in thread Thread-1: Traceback (most recent call last): File "C:\Users\vzlobin\AppData\Local\Programs\Python\Python39\lib\threading.py", line 980, in _bootstrap_inner Exception in thread Thread-2: Traceback (most recent call last): File "C:\Users\vzlobin\AppData\Local\Programs\Python\Python39\lib\threading.py", line 980, in _bootstrap_inner self.run() File "C:\Users\vzlobin\r\z\demos\smartlab_demo\python\thread_argument.py", line 28, in run self.run() File "C:\Users\vzlobin\r\z\demos\smartlab_demo\python\thread_argument.py", line 28, in run self._return = self._target(*self._args, **self._kwargs) File "C:\Users\vzlobin\r\z\demos\smartlab_demo\python\object_detection\detector.py", line 141, in _detect_one self._return = self._target(*self._args, **self._kwargs) File "C:\Users\vzlobin\r\z\demos\smartlab_demo\python\object_detection\detector.py", line 141, in _detect_one preds, _ = glb_subdet.inference(img) # Nx7 (x1, y1, x2, y2, obj_conf, class_conf, class_pred) File "C:\Users\vzlobin\r\z\demos\smartlab_demo\python\object_detection\subdetectors.py", line 55, in inference preds, _ = glb_subdet.inference(img) # Nx7 (x1, y1, x2, y2, obj_conf, class_conf, class_pred) File "C:\Users\vzlobin\r\z\demos\smartlab_demo\python\object_detection\subdetectors.py", line 55, in inference res_numpy = self.infer_request.infer({self.inode: np.expand_dims(img_feed, axis=0)})[self.onode] File "C:\Users\vzlobin\AppData\Local\Programs\Python\Python39\lib\site-packages\openvino\runtime\ie_api.py", line 63, in infer res_numpy = self.infer_request.infer({self.inode: np.expand_dims(img_feed, axis=0)})[self.onode] File "C:\Users\vzlobin\AppData\Local\Programs\Python\Python39\lib\site-packages\openvino\runtime\ie_api.py", line 63, in infer {} if inputs is None else normalize_inputs(inputs, get_input_types(self)) File "C:\Users\vzlobin\AppData\Local\Programs\Python\Python39\lib\site-packages\openvino\runtime\ie_api.py", line 31, in normalize_inputs {} if inputs is None else normalize_inputs(inputs, get_input_types(self)) File "C:\Users\vzlobin\AppData\Local\Programs\Python\Python39\lib\site-packages\openvino\runtime\ie_api.py", line 31, in normalize_inputs raise TypeError("Incompatible key type for tensor named: {}".format(k)) TypeError: Incompatible key type for tensor named: <openvino.pyopenvino.ConstOutput object at 0x00000204E361AB80> raise TypeError("Incompatible key type for tensor named: {}".format(k)) TypeError: Incompatible key type for tensor named: <openvino.pyopenvino.ConstOutput object at 0x00000204E361AEF0> Traceback (most recent call last): File "C:\Users\vzlobin\r\z\demos\smartlab_demo\python\smartlab_demo.py", line 215, in <module> main() File "C:\Users\vzlobin\r\z\demos\smartlab_demo\python\smartlab_demo.py", line 210, in main video_loop( File "C:\Users\vzlobin\r\z\demos\smartlab_demo\python\smartlab_demo.py", line 123, in video_loop detector_result = future_detector.result() File "C:\Users\vzlobin\AppData\Local\Programs\Python\Python39\lib\concurrent\futures\_base.py", line 439, in result return self.__get_result() File "C:\Users\vzlobin\AppData\Local\Programs\Python\Python39\lib\concurrent\futures\_base.py", line 391, in __get_result raise self._exception File "C:\Users\vzlobin\AppData\Local\Programs\Python\Python39\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "C:\Users\vzlobin\r\z\demos\smartlab_demo\python\object_detection\detector.py", line 204, in inference_multithread top_bboxes, top_cls_ids, top_scores = tdetTop.join() TypeError: cannot unpack non-iterable NoneType object
maybe the models you used were old. I sent your the new models and command via email.