Creating a Real-Time License Plate Detection and Recognition App

• GeForce GTX 1660 Ti Mobile
• DeepStream 6.1
• Ubuntu 20.04
• TensorRT 8.2.5.1
• GStreamer 1.16.2
• NVIDIA driver 510.47.03
• CUDA 11.6 Update 1

I want to train model as described in Creating a Real-Time License Plate Detection and Recognition App.
One step is download the NGC LPD pretrained model. But I can’t fined model usa_unpruned.tlt by this link. Can you give me an actual link?

Moving this topic into TAO forum.

Sorry, the link is not correct for LPD model. It should locate at LPDNet | NVIDIA NGC

Please download model from

wget ‘https://api.ngc.nvidia.com/v2/models/nvidia/tao/lpdnet/versions/unpruned_v1.0/files/usa_unpruned.tlt

Please refer to LPDNet — TAO Toolkit 3.22.05 documentation as well.

Now it’s another problem:

I have no name!@673ddc86ea5d:/workspace/openalpr$ detectnet_v2 train -e /workspace/openalpr/SPECS_train.txt -r /workspace/openalpr/exp_unpruned -k nvidia_tlt
Matplotlib created a temporary config/cache directory at /tmp/matplotlib-2ev8p7ye because the default path (/.config/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
Using TensorFlow backend.
WARNING:tensorflow:Deprecation warnings have been disabled. Set TF_ENABLE_DEPRECATION_WARNINGS=1 to re-enable them.
/usr/local/lib/python3.6/dist-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.26.5) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
Using TensorFlow backend.
WARNING:tensorflow:From /root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/detectnet_v2/cost_function/cost_auto_weight_hook.py:43: The name tf.train.SessionRunHook is deprecated. Please use tf.estimator.SessionRunHook instead.

2022-06-17 13:30:51,333 [WARNING] tensorflow: From /root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/detectnet_v2/cost_function/cost_auto_weight_hook.py:43: The name tf.train.SessionRunHook is deprecated. Please use tf.estimator.SessionRunHook instead.

WARNING:tensorflow:From /root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/detectnet_v2/tfhooks/checkpoint_saver_hook.py:25: The name tf.train.CheckpointSaverHook is deprecated. Please use tf.estimator.CheckpointSaverHook instead.

2022-06-17 13:30:51,442 [WARNING] tensorflow: From /root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/detectnet_v2/tfhooks/checkpoint_saver_hook.py:25: The name tf.train.CheckpointSaverHook is deprecated. Please use tf.estimator.CheckpointSaverHook instead.

2022-06-17 13:30:51,866 [INFO] iva.common.logging.logging: Log file already exists at /workspace/openalpr/exp_unpruned/status.json
2022-06-17 13:30:51,867 [INFO] root: Starting DetectNet_v2 Training job
2022-06-17 13:30:51,867 [INFO] __main__: Loading experiment spec at /workspace/openalpr/SPECS_train.txt.
2022-06-17 13:30:51,868 [INFO] iva.detectnet_v2.spec_handler.spec_loader: Merging specification from /workspace/openalpr/SPECS_train.txt
2022-06-17 13:30:51,871 [INFO] root: Training gridbox model.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:153: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.

2022-06-17 13:30:51,872 [WARNING] tensorflow: From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:153: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.

Traceback (most recent call last):
  File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/detectnet_v2/scripts/train.py", line 917, in <module>
  File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/detectnet_v2/scripts/train.py", line 906, in <module>
  File "<decorator-gen-2>", line 2, in main
  File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/detectnet_v2/utilities/timer.py", line 46, in wrapped_fn
  File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/detectnet_v2/scripts/train.py", line 893, in main
  File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/detectnet_v2/scripts/train.py", line 757, in run_experiment
  File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/detectnet_v2/scripts/train.py", line 626, in train_gridbox
  File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/detectnet_v2/dataloader/build_dataloader.py", line 233, in build_dataloader
  File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/detectnet_v2/dataloader/build_dataloader.py", line 100, in build_data_source_lists
  File "/root/.cache/bazel/_bazel_root/ed34e6d125608f91724fda23656f1726/execroot/ai_infra/bazel-out/k8-fastbuild/bin/magnet/packages/iva/build_wheel.runfiles/ai_infra/iva/detectnet_v2/dataloader/build_dataloader.py", line 65, in _pattern_to_files
AssertionError: No files match pattern /workspace/openalpr/lpd_tfrecord/*.

Usually this kind of issue is due to wrong setting of ~/.tao_mounts.json.
Refer to TAO Toolkit Launcher — TAO Toolkit 3.22.05 documentation

And also please login the docker to debug.
$ tao lprnet run /bin/bash

then
# lprnet train xxx

My .tao_mounts. json file:

{
    "Mounts": [
        {
            "source": "/home/codeinside/tao-experiments",
            "destination": "/workspace/tao-experiments"
        },
        {
            "source": "/home/codeinside/openalpr",
            "destination": "/workspace/openalpr"
        }

    ],
    "Envs": [
        {
            "variable": "CUDA_DEVICE_ORDER",
            "value": "PCI_BUS_ID"
        }
    ],
    "DockerOptions": {
        "shm_size": "16G",
        "ulimits": {
            "memlock": -1,
            "stack": 67108864
        },
        "user": "1000:1000",
        "ports": {
            "8888": 8888
        }
    }
}

Previous log from docker after $ tao lprnet run /bin/bash

As mentioned above, can you login the docker to generate tfrecord files?
$ tao lprnet run /bin/bash

then
# lprnet dataset_convert xxx

Thank you, now it’s working

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.