Skip to content

YOLOV7 #2120

@hanenbettayeb

Description

@hanenbettayeb

HI I am trying to run the command :
!python train.py --workers 8 --device 0 --batch-size 16 --epochs 10 --img 640 640
--data "/content/drive/MyDrive/Dental_OPG_Dataset_80_10_10_YOLOV7/Dental OPG (Object Detection)/yolov7/data/dental.yaml"
--cfg "cfg/training/yolov7.yaml" --weights "yolov7.pt" --name "yolov7-dental"
--hyp "data/hyp.scratch.p5.yaml"
It gives an error
2025-03-21 21:26:58.347768: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1742592418.613645 10735 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1742592418.681883 10735 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2025-03-21 21:26:59.268239: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/tensorboard/compat/init.py", line 42, in tf
from tensorboard.compat import notf # noqa: F401
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'notf' from 'tensorboard.compat' (/usr/local/lib/python3.11/dist-packages/tensorboard/compat/init.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/content/drive/MyDrive/Dental_OPG_Dataset_80_10_10_YOLOV7/Dental OPG (Object Detection)/yolov7/train.py", line 21, in
from torch.utils.tensorboard import SummaryWriter
File "/usr/local/lib/python3.11/dist-packages/torch/utils/tensorboard/init.py", line 12, in
from .writer import FileWriter, SummaryWriter # noqa: F401
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/torch/utils/tensorboard/writer.py", line 19, in
from ._embedding import get_embedding_info, make_mat, make_sprite, make_tsv, write_pbtxt
File "/usr/local/lib/python3.11/dist-packages/torch/utils/tensorboard/_embedding.py", line 10, in
_HAS_GFILE_JOIN = hasattr(tf.io.gfile, "join")
^^^^^
File "/usr/local/lib/python3.11/dist-packages/tensorboard/lazy.py", line 65, in getattr
return getattr(load_once(self), attr_name)
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/tensorboard/lazy.py", line 97, in wrapper
cache[arg] = f(arg)
^^^^^^
File "/usr/local/lib/python3.11/dist-packages/tensorboard/lazy.py", line 50, in load_once
module = load_fn()
^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/tensorboard/compat/init.py", line 45, in tf
import tensorflow
File "/usr/local/lib/python3.11/dist-packages/tensorflow/init.py", line 55, in
from tensorflow._api.v2 import compat
File "/usr/local/lib/python3.11/dist-packages/tensorflow/_api/v2/compat/init.py", line 8, in
from tensorflow._api.v2.compat import v1
File "/usr/local/lib/python3.11/dist-packages/tensorflow/_api/v2/compat/v1/init.py", line 30, in
from tensorflow._api.v2.compat.v1 import compat
File "/usr/local/lib/python3.11/dist-packages/tensorflow/_api/v2/compat/v1/compat/init.py", line 8, in
from tensorflow._api.v2.compat.v1.compat import v1
File "/usr/local/lib/python3.11/dist-packages/tensorflow/_api/v2/compat/v1/compat/v1/init.py", line 47, in
from tensorflow._api.v2.compat.v1 import lite
File "/usr/local/lib/python3.11/dist-packages/tensorflow/_api/v2/compat/v1/lite/init.py", line 9, in
from tensorflow._api.v2.compat.v1.lite import experimental
File "/usr/local/lib/python3.11/dist-packages/tensorflow/_api/v2/compat/v1/lite/experimental/init.py", line 8, in
from tensorflow._api.v2.compat.v1.lite.experimental import authoring
File "/usr/local/lib/python3.11/dist-packages/tensorflow/_api/v2/compat/v1/lite/experimental/authoring/init.py", line 8, in
from tensorflow.lite.python.authoring.authoring import compatible # line: 263
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/tensorflow/lite/python/authoring/authoring.py", line 42, in
from tensorflow.lite.python import convert
File "/usr/local/lib/python3.11/dist-packages/tensorflow/lite/python/convert.py", line 35, in
from tensorflow.lite.python import util
File "/usr/local/lib/python3.11/dist-packages/tensorflow/lite/python/util.py", line 53, in
from jax import jit as _jit
File "/usr/local/lib/python3.11/dist-packages/jax/init.py", line 37, in
import jax.core as _core
File "/usr/local/lib/python3.11/dist-packages/jax/core.py", line 18, in
from jax._src.core import (
File "/usr/local/lib/python3.11/dist-packages/jax/_src/core.py", line 37, in
from jax._src import dtypes
File "/usr/local/lib/python3.11/dist-packages/jax/_src/dtypes.py", line 521, in
if hasattr(np.dtypes, 'StringDType') and xla_extension_version >= 311:
^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/numpy/init.py", line 311, in getattr
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'dtypes'. Did you mean: 'dtype'?

Could you please guide me to get out of it, please?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions