single-multiple-custom-object-detection-and-tracking's Issues
Data Structure of line 59 object_tracker.py boxes, scores, classes, nums = yolo.predict(img_in)
What is the data structure of what is returned and stored in variables at line 59?
Furthermore, are the returned box coordinates in x1, y1, x2, y2 or x-center, y-center, width, height?
KeyError: "The name 'net/images:0' refers to a Tensor which does not exist. The operation, 'net/images', does not exist in the graph."
encoder = gdet.create_box_encoder(model_filename, batch_size=1)
KeyError: "The name 'net/images:0' refers to a Tensor which does not exist. The operation, 'net/images', does not exist in the graph."
I am having this error in the given line.
I am doing this code in google colab.
I have also changed the code in line 84 & 86 with "%s:0". But showing same result again.
No bounding box rin video result after runing
Hi ,I am using python 3.7 version with opencv-python==4.1.1.26 version ,but when I run this code ,I don't get a bounding box ,can you please me help me to fix this error ?
Thank you in advance
ValueError: Tensor Tensor("yolo_nms/combined_non_max_suppression/CombinedNonMaxSuppression:0", shape=(?, 100, 4), dtype=float32) is not an element of this graph.
I am trying to perform object tracking using Deep SORT algorithm. Upon execution of the flask file in the code, it is returning the below exception :
C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\keras\engine\training_v1.py:2356: UserWarning: Model.state_updates
will be removed in a future version. This property should not be used in TensorFlow 2.0, as updates
are applied automatically.
updates=self.state_updates,
Traceback (most recent call last):
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\flask\app.py", line 2548, in call
return self.wsgi_app(environ, start_response)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\werkzeug\middleware\dispatcher.py", line 78, in call
return app(environ, start_response)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\flask\app.py", line 2528, in wsgi_app
response = self.handle_exception(e)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\flask\app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\flask\app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\flask\app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\flask\app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\src\app_deepsort_api.py", line 163, in PredictImage
output = predictImage(req_data)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\src\getImagePredictionDeepSort.py", line 151, in predictImage
boxes, scores, classes, nums = yolo.predict(img_in, steps=1)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\keras\engine\training_v1.py", line 1067, in predict
use_multiprocessing=use_multiprocessing,
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\keras\engine\training_arrays_v1.py", line 807, in predict
callbacks=callbacks,
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\keras\engine\training_arrays_v1.py", line 192, in model_iteration
f = _make_execution_function(model, mode)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\keras\engine\training_arrays_v1.py", line 620, in _make_execution_function
return model._make_execution_function(mode)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\keras\engine\training_v1.py", line 2369, in _make_execution_function
self._make_predict_function()
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\keras\engine\training_v1.py", line 2358, in _make_predict_function
**kwargs
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\keras\backend.py", line 4648, in function
inputs, outputs, updates=updates, name=name, **kwargs
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\keras\backend.py", line 4419, in init
with tf.control_dependencies([self.outputs[0]]):
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\tensorflow\python\framework\ops.py", line 5639, in control_dependencies
return get_default_graph().control_dependencies(control_inputs)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\tensorflow\python\framework\ops.py", line 5093, in control_dependencies
c = self.as_graph_element(c)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\tensorflow\python\framework\ops.py", line 3998, in as_graph_element
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_1\venv\lib\site-packages\tensorflow\python\framework\ops.py", line 4077, in _as_graph_element_locked
raise ValueError("Tensor %s is not an element of this graph." % obj)
ValueError: Tensor Tensor("yolo_nms/combined_non_max_suppression/CombinedNonMaxSuppression:0", shape=(?, 100, 4), dtype=float32) is not an element of this graph.
Kindly requesting for suggestions on resolving this exception. Thanks
Where can I get the './weights/yolov3.tf' ?
MLRI issue
Hai I am working in googe colab.I am getting warning: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:196] None of the MLIR optimization passes are enabled (registered 0 passes)
: cannot connect to X server I am getting this and the code stopped running.
Can you please tell me what's going wrong?
tensorflow.python.framework.errors_impl.InvalidArgumentError: Requested tensor connection from unknown node: "input:0".
I am trying to perform object tracking using Deep SORT algorithm. Python version being used in 3.7
Upon execution of the flask file in the code, it is returning the below exception :
Traceback (most recent call last):
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_2\venv\lib\site-packages\flask\app.py", line 2548, in call
return self.wsgi_app(environ, start_response)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_2\venv\lib\site-packages\werkzeug\middleware\dispatcher.py", line 78, in call
return app(environ, start_response)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_2\venv\lib\site-packages\flask\app.py", line 2528, in wsgi_app
response = self.handle_exception(e)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_2\venv\lib\site-packages\flask\app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_2\venv\lib\site-packages\flask\app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_2\venv\lib\site-packages\flask\app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_2\venv\lib\site-packages\flask\app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_2\src\app_deepsort_api.py", line 163, in PredictImage
output = predictImage(req_data)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_2\src\getImagePredictionDeepSort.py", line 158, in predictImage
boxes, scores, classes, nums = yolo.predict(img_in, steps=1)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_2\venv\lib\site-packages\keras\engine\training_v1.py", line 1067, in predict
use_multiprocessing=use_multiprocessing,
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_2\venv\lib\site-packages\keras\engine\training_arrays_v1.py", line 807, in predict
callbacks=callbacks,
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_2\venv\lib\site-packages\keras\engine\training_arrays_v1.py", line 316, in model_iteration
batch_outs = f(actual_inputs)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_2\venv\lib\site-packages\keras\backend.py", line 4575, in call
self._make_callable(feed_arrays, feed_symbols, symbol_vals, session)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_2\venv\lib\site-packages\keras\backend.py", line 4502, in _make_callable
callable_fn = session._make_callable_from_options(callable_opts)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_2\venv\lib\site-packages\tensorflow\python\client\session.py", line 1514, in _make_callable_from_options
return BaseSession._Callable(self, callable_options)
File "C:\Users\nipun.gupta\Downloads\UniquePersonDeepSORT_2\venv\lib\site-packages\tensorflow\python\client\session.py", line 1473, in init
session._session, options_ptr)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Requested tensor connection from unknown node: "input:0".
Kindly requesting for suggestions on resolving this exception. Thanks
GPU check
I tried the gpu check:
import tensorflow as tf
print(tf.test.is_gpu_available(cuda_only=False,min_cuda_compute_capability=None))
and it returned False even though I installed cuda 10.0 and cudnn-10.0-windows10-x64-v7.6.4.38 and copied the files from cudnn to the exact folders as mentioned in the video:https://www.youtube.com/watch?v=zi-62z-3c4U&t=1s and I created a whole new environment to install every tool available even tensorflow itself but somehow it returns false even though the nvidia files are installed
ps: my gpu is gtx 1650 (laptop version) I know it is not listed as gpu that has cuda cores on the website however the nvidia control panel has this in it:
Where can I get the video data?
Hi, I would like to run your sample codes but I cannot find any resources about your sample video data.
Would you let me know where to find those mp4 files?
Thanks! : )
No detection and tracking in the video
Hi @emasterclassacademy , I have ran into a problem where there is no detection or bounding box at my output video. I have manually printed out the boxs, scores and classes, but these parameters only return values on the first frame while other remaining frames just remains an empty list. Does anyone here encounter such issue? Or did anyone manage to solve it? I am aware that I only generated the 3 files when converting yolo to tensorflow: checkpoint, yolov3.tf.data-00000-of-00001, yolov3.tf.index. Could this be the problem? If yes, does anyone has experience with this?
./weights/yolov3.tf NOT found
Where can I get the './weights/yolov3.tf' ?It shows this error message, NotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for ./weights/yolov3.tf
Problem To Convert Yolov3 To Tensor file On my Jetson
Hi I'm not succeeding to convert yolo.weight to tensor flow format, I try exactly like the tutorial in youtube.
Thanks to anyone who can help.
tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcudart.so.10.2
Traceback (most recent call last):
File "convert.py", line 4, in
from yolov3_tf2.models import YoloV3, YoloV3Tiny
File "/home/uvision/Single-Multiple-Custom-Object-Detection-and-Tracking/yolov3_tf2/models.py", line 23, in
from .utils import broadcast_iou
File "/home/uvision/Single-Multiple-Custom-Object-Detection-and-Tracking/yolov3_tf2/utils.py", line 4, in
import cv2
File "/usr/lib/python3.6/dist-packages/cv2/init.py", line 89, in
bootstrap()
File "/usr/lib/python3.6/dist-packages/cv2/init.py", line 79, in bootstrap
import cv2
ImportError: /usr/lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block
Yolov4
please upload the requirement.txt file for this project
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfd in position 101: invalid start byte error
I think the mars_small128.pb file is wrong
Problem with detection
KeyError: "The name 'net/images:0' refers to a Tensor which does not exist. The operation, 'net/images', does not exist in the graph."
Hello, when I ran your code from convert.py, everything worked fine, but once I got to object tracker, it gave me this error, im using later versions of what you used but there is no deprecation warning or anything of that nature.
full output:
C:\AI4Y\Single-Multiple-Custom-Object-Detection-and-Tracking-master\deep_sort>cd C:\AI4Y\Single-Multiple-Custom-Object-Detection-and-Tracking-master
C:\AI4Y\Single-Multiple-Custom-Object-Detection-and-Tracking-master>python Convert.py
2020-10-29 08:49:46.331770: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
2020-10-29 08:49:48.421522: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library nvcuda.dll
2020-10-29 08:49:48.460141: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce RTX 2060 SUPER computeCapability: 7.5
coreClock: 1.68GHz coreCount: 34 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 417.29GiB/s
2020-10-29 08:49:48.460242: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
2020-10-29 08:49:48.464459: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cublas64_10.dll
2020-10-29 08:49:48.466417: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cufft64_10.dll
2020-10-29 08:49:48.467077: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library curand64_10.dll
2020-10-29 08:49:48.469816: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusolver64_10.dll
2020-10-29 08:49:48.471863: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusparse64_10.dll
2020-10-29 08:49:48.478198: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudnn64_7.dll
2020-10-29 08:49:48.478344: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0
2020-10-29 08:49:48.546508: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2020-10-29 08:49:48.552748: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2961cdc1050 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-10-29 08:49:48.552906: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2020-10-29 08:49:48.553293: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce RTX 2060 SUPER computeCapability: 7.5
coreClock: 1.68GHz coreCount: 34 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 417.29GiB/s
2020-10-29 08:49:48.553432: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
2020-10-29 08:49:48.553643: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cublas64_10.dll
2020-10-29 08:49:48.553874: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cufft64_10.dll
2020-10-29 08:49:48.554363: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library curand64_10.dll
2020-10-29 08:49:48.554566: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusolver64_10.dll
2020-10-29 08:49:48.554771: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusparse64_10.dll
2020-10-29 08:49:48.554973: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudnn64_7.dll
2020-10-29 08:49:48.555205: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0
2020-10-29 08:49:49.009932: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-10-29 08:49:49.010073: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263] 0
2020-10-29 08:49:49.010477: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 0: N
2020-10-29 08:49:49.010845: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 6642 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2060 SUPER, pci bus id: 0000:01:00.0, compute capability: 7.5)
2020-10-29 08:49:49.013136: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2964a03f880 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-10-29 08:49:49.013201: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): GeForce RTX 2060 SUPER, Compute Capability 7.5
Model: "yolov3"
Layer (type) Output Shape Param # Connected to
input (InputLayer) [(None, None, None, 0
yolo_darknet (Functional) ((None, None, None, 40620640 input[0][0]
yolo_conv_0 (Functional) (None, None, None, 5 11024384 yolo_darknet[0][2]
yolo_conv_1 (Functional) (None, None, None, 2 2957312 yolo_conv_0[0][0]
yolo_darknet[0][1]
yolo_conv_2 (Functional) (None, None, None, 1 741376 yolo_conv_1[0][0]
yolo_darknet[0][0]
yolo_output_0 (Functional) (None, None, None, 3 4984063 yolo_conv_0[0][0]
yolo_output_1 (Functional) (None, None, None, 3 1312511 yolo_conv_1[0][0]
yolo_output_2 (Functional) (None, None, None, 3 361471 yolo_conv_2[0][0]
yolo_boxes_0 (Lambda) ((None, None, None, 0 yolo_output_0[0][0]
yolo_boxes_1 (Lambda) ((None, None, None, 0 yolo_output_1[0][0]
yolo_boxes_2 (Lambda) ((None, None, None, 0 yolo_output_2[0][0]
yolo_nms (Lambda) ((None, 100, 4), (No 0 yolo_boxes_0[0][0]
yolo_boxes_0[0][1]
yolo_boxes_0[0][2]
yolo_boxes_1[0][0]
yolo_boxes_1[0][1]
yolo_boxes_1[0][2]
yolo_boxes_2[0][0]
yolo_boxes_2[0][1]
yolo_boxes_2[0][2]
Total params: 62,001,757
Trainable params: 61,949,149
Non-trainable params: 52,608
I1029 08:49:50.575503 1544 Convert.py:19] model created
I1029 08:49:50.576501 1544 utils.py:46] yolo_darknet/conv2d bn
I1029 08:49:50.577498 1544 utils.py:46] yolo_darknet/conv2d_1 bn
I1029 08:49:50.579493 1544 utils.py:46] yolo_darknet/conv2d_2 bn
I1029 08:49:50.580490 1544 utils.py:46] yolo_darknet/conv2d_3 bn
I1029 08:49:50.581487 1544 utils.py:46] yolo_darknet/conv2d_4 bn
I1029 08:49:50.582484 1544 utils.py:46] yolo_darknet/conv2d_5 bn
I1029 08:49:50.583482 1544 utils.py:46] yolo_darknet/conv2d_6 bn
I1029 08:49:50.584479 1544 utils.py:46] yolo_darknet/conv2d_7 bn
I1029 08:49:50.585477 1544 utils.py:46] yolo_darknet/conv2d_8 bn
I1029 08:49:50.587471 1544 utils.py:46] yolo_darknet/conv2d_9 bn
I1029 08:49:50.589466 1544 utils.py:46] yolo_darknet/conv2d_10 bn
I1029 08:49:50.592458 1544 utils.py:46] yolo_darknet/conv2d_11 bn
I1029 08:49:50.595450 1544 utils.py:46] yolo_darknet/conv2d_12 bn
I1029 08:49:50.596447 1544 utils.py:46] yolo_darknet/conv2d_13 bn
I1029 08:49:50.598442 1544 utils.py:46] yolo_darknet/conv2d_14 bn
I1029 08:49:50.599439 1544 utils.py:46] yolo_darknet/conv2d_15 bn
I1029 08:49:50.602431 1544 utils.py:46] yolo_darknet/conv2d_16 bn
I1029 08:49:50.603429 1544 utils.py:46] yolo_darknet/conv2d_17 bn
I1029 08:49:50.605423 1544 utils.py:46] yolo_darknet/conv2d_18 bn
I1029 08:49:50.607418 1544 utils.py:46] yolo_darknet/conv2d_19 bn
I1029 08:49:50.610410 1544 utils.py:46] yolo_darknet/conv2d_20 bn
I1029 08:49:50.611407 1544 utils.py:46] yolo_darknet/conv2d_21 bn
I1029 08:49:50.613402 1544 utils.py:46] yolo_darknet/conv2d_22 bn
I1029 08:49:50.614399 1544 utils.py:46] yolo_darknet/conv2d_23 bn
I1029 08:49:50.616394 1544 utils.py:46] yolo_darknet/conv2d_24 bn
I1029 08:49:50.617391 1544 utils.py:46] yolo_darknet/conv2d_25 bn
I1029 08:49:50.620383 1544 utils.py:46] yolo_darknet/conv2d_26 bn
I1029 08:49:50.627365 1544 utils.py:46] yolo_darknet/conv2d_27 bn
I1029 08:49:50.629359 1544 utils.py:46] yolo_darknet/conv2d_28 bn
I1029 08:49:50.635343 1544 utils.py:46] yolo_darknet/conv2d_29 bn
I1029 08:49:50.637338 1544 utils.py:46] yolo_darknet/conv2d_30 bn
I1029 08:49:50.643322 1544 utils.py:46] yolo_darknet/conv2d_31 bn
I1029 08:49:50.645316 1544 utils.py:46] yolo_darknet/conv2d_32 bn
I1029 08:49:50.661274 1544 utils.py:46] yolo_darknet/conv2d_33 bn
I1029 08:49:50.663268 1544 utils.py:46] yolo_darknet/conv2d_34 bn
I1029 08:49:50.672244 1544 utils.py:46] yolo_darknet/conv2d_35 bn
I1029 08:49:50.674239 1544 utils.py:46] yolo_darknet/conv2d_36 bn
I1029 08:49:50.681220 1544 utils.py:46] yolo_darknet/conv2d_37 bn
I1029 08:49:50.683215 1544 utils.py:46] yolo_darknet/conv2d_38 bn
I1029 08:49:50.688202 1544 utils.py:46] yolo_darknet/conv2d_39 bn
I1029 08:49:50.690196 1544 utils.py:46] yolo_darknet/conv2d_40 bn
I1029 08:49:50.697178 1544 utils.py:46] yolo_darknet/conv2d_41 bn
I1029 08:49:50.699172 1544 utils.py:46] yolo_darknet/conv2d_42 bn
I1029 08:49:50.704159 1544 utils.py:46] yolo_darknet/conv2d_43 bn
I1029 08:49:50.742058 1544 utils.py:46] yolo_darknet/conv2d_44 bn
I1029 08:49:50.748041 1544 utils.py:46] yolo_darknet/conv2d_45 bn
I1029 08:49:50.785940 1544 utils.py:46] yolo_darknet/conv2d_46 bn
I1029 08:49:50.790927 1544 utils.py:46] yolo_darknet/conv2d_47 bn
I1029 08:49:50.829823 1544 utils.py:46] yolo_darknet/conv2d_48 bn
I1029 08:49:50.834809 1544 utils.py:46] yolo_darknet/conv2d_49 bn
I1029 08:49:50.874702 1544 utils.py:46] yolo_darknet/conv2d_50 bn
I1029 08:49:50.881683 1544 utils.py:46] yolo_darknet/conv2d_51 bn
I1029 08:49:50.918585 1544 utils.py:46] yolo_conv_0/conv2d_52 bn
I1029 08:49:50.923572 1544 utils.py:46] yolo_conv_0/conv2d_53 bn
I1029 08:49:50.960473 1544 utils.py:46] yolo_conv_0/conv2d_54 bn
I1029 08:49:50.964462 1544 utils.py:46] yolo_conv_0/conv2d_55 bn
I1029 08:49:51.006350 1544 utils.py:46] yolo_conv_0/conv2d_56 bn
I1029 08:49:51.011336 1544 utils.py:46] yolo_output_0/conv2d_57 bn
I1029 08:49:51.052227 1544 utils.py:46] yolo_output_0/conv2d_58 bias
I1029 08:49:51.055219 1544 utils.py:46] yolo_conv_1/conv2d_59 bn
I1029 08:49:51.056216 1544 utils.py:46] yolo_conv_1/conv2d_60 bn
I1029 08:49:51.059208 1544 utils.py:46] yolo_conv_1/conv2d_61 bn
I1029 08:49:51.065193 1544 utils.py:46] yolo_conv_1/conv2d_62 bn
I1029 08:49:51.067188 1544 utils.py:46] yolo_conv_1/conv2d_63 bn
I1029 08:49:51.076163 1544 utils.py:46] yolo_conv_1/conv2d_64 bn
I1029 08:49:51.078158 1544 utils.py:46] yolo_output_1/conv2d_65 bn
I1029 08:49:51.086136 1544 utils.py:46] yolo_output_1/conv2d_66 bias
I1029 08:49:51.087134 1544 utils.py:46] yolo_conv_2/conv2d_67 bn
I1029 08:49:51.088131 1544 utils.py:46] yolo_conv_2/conv2d_68 bn
I1029 08:49:51.089128 1544 utils.py:46] yolo_conv_2/conv2d_69 bn
I1029 08:49:51.092120 1544 utils.py:46] yolo_conv_2/conv2d_70 bn
I1029 08:49:51.093118 1544 utils.py:46] yolo_conv_2/conv2d_71 bn
I1029 08:49:51.096110 1544 utils.py:46] yolo_conv_2/conv2d_72 bn
I1029 08:49:51.097107 1544 utils.py:46] yolo_output_2/conv2d_73 bn
I1029 08:49:51.099102 1544 utils.py:46] yolo_output_2/conv2d_74 bias
I1029 08:49:51.100099 1544 Convert.py:22] weights loaded
2020-10-29 08:49:51.106167: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudnn64_7.dll
2020-10-29 08:49:52.303893: W tensorflow/stream_executor/gpu/redzone_allocator.cc:314] Internal: Invoking GPU asm compilation is supported on Cuda non-Windows platforms only
Relying on driver to perform ptx compilation.
Modify $PATH to customize ptxas location.
This message will be only logged once.
2020-10-29 08:49:52.347208: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cublas64_10.dll
I1029 08:49:53.194673 1544 Convert.py:26] sanity check passed
I1029 08:49:53.748191 1544 Convert.py:29] weights saved
C:\AI4Y\Single-Multiple-Custom-Object-Detection-and-Tracking-master>object_tracker.py
2020-10-29 08:51:37.091077: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
2020-10-29 08:51:39.099816: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library nvcuda.dll
2020-10-29 08:51:39.129315: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce RTX 2060 SUPER computeCapability: 7.5
coreClock: 1.68GHz coreCount: 34 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 417.29GiB/s
2020-10-29 08:51:39.129877: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
2020-10-29 08:51:39.134615: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cublas64_10.dll
2020-10-29 08:51:39.136543: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cufft64_10.dll
2020-10-29 08:51:39.137202: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library curand64_10.dll
2020-10-29 08:51:39.139865: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusolver64_10.dll
2020-10-29 08:51:39.141880: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusparse64_10.dll
2020-10-29 08:51:39.154219: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudnn64_7.dll
2020-10-29 08:51:39.154355: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0
2020-10-29 08:51:39.162117: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2020-10-29 08:51:39.169240: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x1f4e5df1a60 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-10-29 08:51:39.169315: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2020-10-29 08:51:39.169671: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce RTX 2060 SUPER computeCapability: 7.5
coreClock: 1.68GHz coreCount: 34 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 417.29GiB/s
2020-10-29 08:51:39.169830: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
2020-10-29 08:51:39.170045: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cublas64_10.dll
2020-10-29 08:51:39.170251: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cufft64_10.dll
2020-10-29 08:51:39.170480: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library curand64_10.dll
2020-10-29 08:51:39.170693: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusolver64_10.dll
2020-10-29 08:51:39.170896: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusparse64_10.dll
2020-10-29 08:51:39.171103: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudnn64_7.dll
2020-10-29 08:51:39.171339: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0
2020-10-29 08:51:39.640558: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-10-29 08:51:39.640691: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263] 0
2020-10-29 08:51:39.640754: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 0: N
2020-10-29 08:51:39.641566: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 6642 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2060 SUPER, pci bus id: 0000:01:00.0, compute capability: 7.5)
2020-10-29 08:51:39.643962: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x1f492563eb0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-10-29 08:51:39.644055: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): GeForce RTX 2060 SUPER, Compute Capability 7.5
2020-10-29 08:51:42.320896: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce RTX 2060 SUPER computeCapability: 7.5
coreClock: 1.68GHz coreCount: 34 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 417.29GiB/s
2020-10-29 08:51:42.321577: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
2020-10-29 08:51:42.322166: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cublas64_10.dll
2020-10-29 08:51:42.322472: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cufft64_10.dll
2020-10-29 08:51:42.322581: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library curand64_10.dll
2020-10-29 08:51:42.322877: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusolver64_10.dll
2020-10-29 08:51:42.323091: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusparse64_10.dll
2020-10-29 08:51:42.323145: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudnn64_7.dll
2020-10-29 08:51:42.323210: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0
2020-10-29 08:51:42.323446: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-10-29 08:51:42.323633: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263] 0
2020-10-29 08:51:42.323850: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 0: N
2020-10-29 08:51:42.324130: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 6642 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2060 SUPER, pci bus id: 0000:01:00.0, compute capability: 7.5)
Traceback (most recent call last):
File "C:\AI4Y\Single-Multiple-Custom-Object-Detection-and-Tracking-master\object_tracker.py", line 31, in
encoder = gdet.create_box_encoder(model_filename, batch_size=1)
File "C:\AI4Y\Single-Multiple-Custom-Object-Detection-and-Tracking-master\tools\generate_detections.py", line 103, in create_box_encoder
image_encoder = ImageEncoder(model_filename, input_name, output_name)
File "C:\AI4Y\Single-Multiple-Custom-Object-Detection-and-Tracking-master\tools\generate_detections.py", line 83, in init
self.input_var = tf.get_default_graph().get_tensor_by_name(
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3846, in get_tensor_by_name
return self.as_graph_element(name, allow_tensor=True, allow_operation=False)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3670, in as_graph_element
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3710, in _as_graph_element_locked
raise KeyError("The name %s refers to a Tensor which does not "
KeyError: "The name 'net/images:0' refers to a Tensor which does not exist. The operation, 'net/images', does not exist in the graph."
Parameter Tuning to Reduce ID Switching
In my application whenever 2 people clash, the ID switches. Or if there is any occlusion, the ID switches. Any suggestions on how to modify the parameters? Appreciate any help.
Wasn't able to run with GPU, but works with CPU
So I faced the issue where only the first frame is detected and tracked when I running the object_tracker.py using tensorflow-gpu. However, once I uninstalled tensorflow-gpu and replaced it with tensorflow-cpu (latest version since I am using python 3.9), it works flawlessly. Does anyone one faced this issue? I am using GTX 1050 on my laptop which I believe it should run since the author @emasterclassacademy used GTX1050 ti in Youtube video. FYI, I am running on latest CUDA version 11 as well. Below is the full GPU information I have gotten when I ran with tensorflow-gpu.
tensorflow.python.framework.errors_impl.InvalidArgumentError: Requested tensor connection from unknown node: "input:0". when running through flask
We are doing unique person detection referring to the GitHub provided. We are getting the results when running through the test scripts in our local.
But when we tried to call it through flask, we are facing the error: tensorflow.python.framework.errors_impl.InvalidArgumentError: Requested tensor connection from unknown node: "input:0".
When analyzing the logs we could see that the model is not passing from the yolov3 prediction
Please find the image for reference.
All the models we have used are from the github repo : https://github.com/emasterclassacademy/Single-Multiple-Custom-Object-Detection-and-Tracking/blob/master/yolov3_tf2/models.py
The input which we are providing is: {"Fid": "637971158700262646", "Did": "DeviceId_11", "Tid": "1", "Cs": 0.5, "Yt": 0.6, "Per": []}
We assume there is an issue with assigning the graph hence providing the code here.
graph = tf.compat.v1.get_default_graph()
with graph.as_default():
boxes, scores, classes, nums = yolo.predict(img_in, steps=1)
Any suggestions/ideas to overcome this issue would be really helpful.
Converting a custom yolov3 model
I am trying to convert this yolov3 custom model: https://drive.google.com/drive/folders/17jysPykGMkNw66lDMd0kryybCvGOesKi?usp=sharing
with this .cfg file: https://github.com/heltonmaia/ECT-proj-cnn-mice/blob/master/cfg/yolov3.cfg
into tensorflow format that already worked on the model that was linked in the video (for checking purposes and it worked ๐) however I tried to take the same approach to a custom trained model that detects "mice" (for test analysis purposes) and I get this error:
in load_darknet_weights
conv_shape).transpose([2, 3, 1, 0])
ValueError: cannot reshape array of size 4607 into shape (18,256,1,1)
so is there a way to solve this issue?
EDIT 1: I added these lines in utils.py:
conv_shape = (math.floor(filters), math.floor(in_dim), size, size)
conv_weights = np.fromfile(wf, dtype=np.float32, count=np.product(conv_shape))
if conv_weights.shape[0]<filters*in_dim:
conv_weights = np.append(conv_weights,[0])
before: conv_weights = conv_weights.reshape(conv_shape).transpose([2, 3, 1, 0])
and it worked but when it came time to run object_tracker.py I had this error:
tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.
(0) Invalid argument: Input to reshape is a tensor with 3042 values, but the requested shape requires a multiple of 43095
[[{{node yolo_output_0/lambda/Reshape}}]]
[[yolo_nms/Reshape_9/_1477]]
(1) Invalid argument: Input to reshape is a tensor with 3042 values, but the requested shape requires a multiple of 43095
[[{{node yolo_output_0/lambda/Reshape}}]]
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.