Open lehuasi opened 1 year ago
Make sure install the environment correctly
did you fix this issue? i have the same problem and I made sure to install everything correctly. OSError: [WinError 126] The specified module could not be found
From the logs you provided, this could be an environmental issue, make sure tensorrt has been installed properly
yeah you were right, thank you. I reinstalled and got it to work but seems I ran into some more obstacles
05/17/2023-06:44:53] [TRT] [I] [MemUsageChange] Init CUDA: CPU -3, GPU +0, now: CPU 8875, GPU 725 (MiB) [05/17/2023-06:45:01] [TRT] [I] [MemUsageChange] Init builder kernel library: CPU +131, GPU +22, now: CPU 9490, GPU 747 (MiB) [05/17/2023-06:45:03] [TRT] [W] onnx2trt_utils.cpp:377: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32. [05/17/2023-06:45:03] [TRT] [W] onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped [05/17/2023-06:45:11] [TRT] [I] No importer registered for op: EfficientNMS_TRT. Attempting to import as plugin. [05/17/2023-06:45:11] [TRT] [I] Searching for plugin: EfficientNMS_TRT, plugin_version: 1, plugin_namespace: [05/17/2023-06:45:11] [TRT] [I] Successfully created plugin: EfficientNMS_TRT Network Description Input 'images' with shape (1, 3, 640, 640) and dtype DataType.FLOAT Output 'num_dets' with shape (1, 1) and dtype DataType.INT32 Output 'det_boxes' with shape (1, 12, 4) and dtype DataType.FLOAT Output 'det_scores' with shape (1, 12) and dtype DataType.FLOAT Output 'det_classes' with shape (1, 12) and dtype DataType.INT32 Building fp16 Engine in C:\Users\desktop\APEX_AIMBOT-master\weights\best_apex.trt [05/17/2023-06:45:16] [TRT] [I] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +10, GPU +12, now: CPU 9186, GPU 759 (MiB) [05/17/2023-06:45:17] [TRT] [I] [MemUsageChange] Init cuDNN: CPU -2, GPU +8, now: CPU 9184, GPU 767 (MiB) [05/17/2023-06:45:17] [TRT] [I] Local timing cache in use. Profiling results in this builder pass will not be stored. [05/17/2023-06:46:28] [TRT] [I] Some tactics do not have sufficient workspace memory to run. Increasing workspace size will enable more tactics, please check verbose output for requested sizes. [05/17/2023-06:55:00] [TRT] [I] Total Activation Memory: 1249439744 [05/17/2023-06:55:00] [TRT] [I] Detected 1 inputs and 4 output network tensors. [05/17/2023-06:55:00] [TRT] [I] Total Host Persistent Memory: 120736 [05/17/2023-06:55:00] [TRT] [I] Total Device Persistent Memory: 1431040 [05/17/2023-06:55:00] [TRT] [I] Total Scratch Memory: 1513472 [05/17/2023-06:55:00] [TRT] [I] [MemUsageStats] Peak memory usage of TRT CPU/GPU memory allocators: CPU 15 MiB, GPU 557 MiB [05/17/2023-06:55:00] [TRT] [I] [BlockAssignment] Started assigning block shifts. This will take 118 steps to complete. [05/17/2023-06:55:00] [TRT] [I] [BlockAssignment] Algorithm ShiftNTopDown took 8.3448ms to assign 6 blocks to 118 nodes requiring 30515200 bytes. [05/17/2023-06:55:00] [TRT] [I] Total Activation Memory: 30515200 [05/17/2023-06:55:01] [TRT] [I] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +8, now: CPU 12941, GPU 831 (MiB) [05/17/2023-06:55:01] [TRT] [I] [MemUsageChange] Init cuDNN: CPU +0, GPU +10, now: CPU 12941, GPU 841 (MiB) [05/17/2023-06:55:01] [TRT] [W] TensorRT encountered issues when converting weights between types and that could affect accuracy. [05/17/2023-06:55:01] [TRT] [W] If this is not the desired behavior, please modify the weights or retrain with regularization to adjust the magnitude of the weights. [05/17/2023-06:55:01] [TRT] [W] Check verbose logs for the list of affected weights. [05/17/2023-06:55:01] [TRT] [W] - 50 weights are affected by this issue: Detected subnormal FP16 values. [05/17/2023-06:55:01] [TRT] [W] - 1 weights are affected by this issue: Detected values less than smallest positive FP16 subnormal value and converted them to the FP16 minimum subnormalized value. [05/17/2023-06:55:01] [TRT] [I] [MemUsageChange] TensorRT-managed allocation in building engine: CPU +2, GPU +35, now: CPU 2, GPU 35 (MiB) Serializing engine to file: C:\Users\desktop\APEX_AIMBOT-master\weights\best_apex.trt
yeah you were right, thank you. I reinstalled and got it to work but seems I ran into some more obstacles
05/17/2023-06:44:53] [TRT] [I] [MemUsageChange] Init CUDA: CPU -3, GPU +0, now: CPU 8875, GPU 725 (MiB) [05/17/2023-06:45:01] [TRT] [I] [MemUsageChange] Init builder kernel library: CPU +131, GPU +22, now: CPU 9490, GPU 747 (MiB) [05/17/2023-06:45:03] [TRT] [W] onnx2trt_utils.cpp:377: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32. [05/17/2023-06:45:03] [TRT] [W] onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped [05/17/2023-06:45:11] [TRT] [I] No importer registered for op: EfficientNMS_TRT. Attempting to import as plugin. [05/17/2023-06:45:11] [TRT] [I] Searching for plugin: EfficientNMS_TRT, plugin_version: 1, plugin_namespace: [05/17/2023-06:45:11] [TRT] [I] Successfully created plugin: EfficientNMS_TRT Network Description Input 'images' with shape (1, 3, 640, 640) and dtype DataType.FLOAT Output 'num_dets' with shape (1, 1) and dtype DataType.INT32 Output 'det_boxes' with shape (1, 12, 4) and dtype DataType.FLOAT Output 'det_scores' with shape (1, 12) and dtype DataType.FLOAT Output 'det_classes' with shape (1, 12) and dtype DataType.INT32 Building fp16 Engine in C:\Users\desktop\APEX_AIMBOT-master\weights\best_apex.trt [05/17/2023-06:45:16] [TRT] [I] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +10, GPU +12, now: CPU 9186, GPU 759 (MiB) [05/17/2023-06:45:17] [TRT] [I] [MemUsageChange] Init cuDNN: CPU -2, GPU +8, now: CPU 9184, GPU 767 (MiB) [05/17/2023-06:45:17] [TRT] [I] Local timing cache in use. Profiling results in this builder pass will not be stored. [05/17/2023-06:46:28] [TRT] [I] Some tactics do not have sufficient workspace memory to run. Increasing workspace size will enable more tactics, please check verbose output for requested sizes. [05/17/2023-06:55:00] [TRT] [I] Total Activation Memory: 1249439744 [05/17/2023-06:55:00] [TRT] [I] Detected 1 inputs and 4 output network tensors. [05/17/2023-06:55:00] [TRT] [I] Total Host Persistent Memory: 120736 [05/17/2023-06:55:00] [TRT] [I] Total Device Persistent Memory: 1431040 [05/17/2023-06:55:00] [TRT] [I] Total Scratch Memory: 1513472 [05/17/2023-06:55:00] [TRT] [I] [MemUsageStats] Peak memory usage of TRT CPU/GPU memory allocators: CPU 15 MiB, GPU 557 MiB [05/17/2023-06:55:00] [TRT] [I] [BlockAssignment] Started assigning block shifts. This will take 118 steps to complete. [05/17/2023-06:55:00] [TRT] [I] [BlockAssignment] Algorithm ShiftNTopDown took 8.3448ms to assign 6 blocks to 118 nodes requiring 30515200 bytes. [05/17/2023-06:55:00] [TRT] [I] Total Activation Memory: 30515200 [05/17/2023-06:55:01] [TRT] [I] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +8, now: CPU 12941, GPU 831 (MiB) [05/17/2023-06:55:01] [TRT] [I] [MemUsageChange] Init cuDNN: CPU +0, GPU +10, now: CPU 12941, GPU 841 (MiB) [05/17/2023-06:55:01] [TRT] [W] TensorRT encountered issues when converting weights between types and that could affect accuracy. [05/17/2023-06:55:01] [TRT] [W] If this is not the desired behavior, please modify the weights or retrain with regularization to adjust the magnitude of the weights. [05/17/2023-06:55:01] [TRT] [W] Check verbose logs for the list of affected weights. [05/17/2023-06:55:01] [TRT] [W] - 50 weights are affected by this issue: Detected subnormal FP16 values. [05/17/2023-06:55:01] [TRT] [W] - 1 weights are affected by this issue: Detected values less than smallest positive FP16 subnormal value and converted them to the FP16 minimum subnormalized value. [05/17/2023-06:55:01] [TRT] [I] [MemUsageChange] TensorRT-managed allocation in building engine: CPU +2, GPU +35, now: CPU 2, GPU 35 (MiB) Serializing engine to file: C:\Users\desktop\APEX_AIMBOT-master\weights\best_apex.trt
I didn't find any Error that prevented the program from running, did you encounter any problem?
the program runs but seems to be inaccurate and slow, any tips? (I have the appropriate lghub vers)
the program runs but seems to be inaccurate and slow, any tips? (I have the appropriate lghub vers)
If you are using the trt engine to run this model, unfortunately it is the fastest engine available; if you want to continue to improve the speed you can consider using fp16 when converting to a trt model, or go further down to int8, although int8 is not recommended as it will significantly lose model accuracy; generally speaking better graphics performance is the key to improving the running speed; I do not quite understand the problem of inaccuracy, if you mean inaccurate classification or labeling, it is usually a problem of the model, the model provided in this project is only a demo model, if necessary, you can customize the training of a model to meet the needs according to the method of yolov7;
Hi bro I have encountered this problem, please tell me how to solve it. Thanks, I can't use the model I trained myself. Convert TRT
Hi bro I have encountered this problem, please tell me how to solve it. Thanks, I can't use the model I trained myself. Convert TRT
Please ensure that the ONNX you are using is compatible with the YOLOv7 version.
(apex) C:\Users\Dimred\APEX_AIMBOT-master>python apex.py Traceback (most recent call last): File "apex.py", line 1, in
from AimBot import AimBot
File "C:\Users\Dimred\APEX_AIMBOT-master\AimBot.py", line 13, in
from utils.InferenceEngine import BaseEngine, precise_sleep
File "C:\Users\Dimred\APEX_AIMBOT-master\utils\InferenceEngine.py", line 5, in
import tensorrt as trt
File "C:\ProgramData\anaconda3\envs\apex\lib\site-packages\tensorrt__init__.py", line 129, in
ctypes.CDLL(find_lib(lib))
File "C:\ProgramData\anaconda3\envs\apex\lib\ctypes__init.py", line 356, in init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
how do i fix this