자동차 번호판 데이터셋을 가지고 yolov5 커스텀 트레이닝 후 classification을 통해 바운딩 박스를 알아내고 바운딩 박스를 모자이크처리를 진행한 코드.
In [ ]:
from google.colab import drive
drive.mount('/content/drive')
Mounted at /content/drive
In [ ]:
!pwd
/content
In [ ]:
%cd /content/drive/MyDrive/car_plate/
!git clone https://github.com/ultralytics/yolov5.git
/content/drive/MyDrive/car_plate
In [ ]:
%cd yolov5
!pip install -r requirements.txt
/content/drive/MyDrive/car_plate/yolov5 Collecting gitpython>=3.1.30 (from -r requirements.txt (line 5)) Downloading GitPython-3.1.42-py3-none-any.whl (195 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 195.4/195.4 kB 4.4 MB/s eta 0:00:00 Requirement already satisfied: matplotlib>=3.3 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 6)) (3.7.1) Requirement already satisfied: numpy>=1.23.5 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 7)) (1.25.2) Requirement already satisfied: opencv-python>=4.1.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 8)) (4.8.0.76) Requirement already satisfied: Pillow>=9.4.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 9)) (9.4.0) Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 10)) (5.9.5) Requirement already satisfied: PyYAML>=5.3.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 11)) (6.0.1) Requirement already satisfied: requests>=2.23.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 12)) (2.31.0) Requirement already satisfied: scipy>=1.4.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 13)) (1.11.4) Collecting thop>=0.1.1 (from -r requirements.txt (line 14)) Downloading thop-0.1.1.post2209072238-py3-none-any.whl (15 kB) Requirement already satisfied: torch>=1.8.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 15)) (2.2.1+cu121) Requirement already satisfied: torchvision>=0.9.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 16)) (0.17.1+cu121) Requirement already satisfied: tqdm>=4.64.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 17)) (4.66.2) Collecting ultralytics>=8.0.232 (from -r requirements.txt (line 18)) Downloading ultralytics-8.1.34-py3-none-any.whl (723 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 723.1/723.1 kB 10.6 MB/s eta 0:00:00 Requirement already satisfied: pandas>=1.1.4 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 27)) (1.5.3) Requirement already satisfied: seaborn>=0.11.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 28)) (0.13.1) Requirement already satisfied: setuptools>=65.5.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 42)) (67.7.2) Requirement already satisfied: wheel>=0.38.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 50)) (0.43.0) Collecting gitdb<5,>=4.0.1 (from gitpython>=3.1.30->-r requirements.txt (line 5)) Downloading gitdb-4.0.11-py3-none-any.whl (62 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.7/62.7 kB 7.3 MB/s eta 0:00:00 Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3->-r requirements.txt (line 6)) (1.2.0) Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3->-r requirements.txt (line 6)) (0.12.1) Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3->-r requirements.txt (line 6)) (4.50.0) Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3->-r requirements.txt (line 6)) (1.4.5) Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3->-r requirements.txt (line 6)) (24.0) Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3->-r requirements.txt (line 6)) (3.1.2) Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3->-r requirements.txt (line 6)) (2.8.2) Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->-r requirements.txt (line 12)) (3.3.2) Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->-r requirements.txt (line 12)) (3.6) Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->-r requirements.txt (line 12)) (2.0.7) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->-r requirements.txt (line 12)) (2024.2.2) Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->-r requirements.txt (line 15)) (3.13.1) Requirement already satisfied: typing-extensions>=4.8.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->-r requirements.txt (line 15)) (4.10.0) Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->-r requirements.txt (line 15)) (1.12) Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->-r requirements.txt (line 15)) (3.2.1) Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->-r requirements.txt (line 15)) (3.1.3) Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->-r requirements.txt (line 15)) (2023.6.0) Collecting nvidia-cuda-nvrtc-cu12==12.1.105 (from torch>=1.8.0->-r requirements.txt (line 15)) Downloading nvidia_cuda_nvrtc_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (23.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 23.7/23.7 MB 42.4 MB/s eta 0:00:00 Collecting nvidia-cuda-runtime-cu12==12.1.105 (from torch>=1.8.0->-r requirements.txt (line 15)) Downloading nvidia_cuda_runtime_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (823 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 823.6/823.6 kB 58.1 MB/s eta 0:00:00 Collecting nvidia-cuda-cupti-cu12==12.1.105 (from torch>=1.8.0->-r requirements.txt (line 15)) Downloading nvidia_cuda_cupti_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (14.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.1/14.1 MB 74.0 MB/s eta 0:00:00 Collecting nvidia-cudnn-cu12==8.9.2.26 (from torch>=1.8.0->-r requirements.txt (line 15)) Downloading nvidia_cudnn_cu12-8.9.2.26-py3-none-manylinux1_x86_64.whl (731.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 731.7/731.7 MB 1.4 MB/s eta 0:00:00 Collecting nvidia-cublas-cu12==12.1.3.1 (from torch>=1.8.0->-r requirements.txt (line 15)) Downloading nvidia_cublas_cu12-12.1.3.1-py3-none-manylinux1_x86_64.whl (410.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 410.6/410.6 MB 3.1 MB/s eta 0:00:00 Collecting nvidia-cufft-cu12==11.0.2.54 (from torch>=1.8.0->-r requirements.txt (line 15)) Downloading nvidia_cufft_cu12-11.0.2.54-py3-none-manylinux1_x86_64.whl (121.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 121.6/121.6 MB 8.3 MB/s eta 0:00:00 Collecting nvidia-curand-cu12==10.3.2.106 (from torch>=1.8.0->-r requirements.txt (line 15)) Downloading nvidia_curand_cu12-10.3.2.106-py3-none-manylinux1_x86_64.whl (56.5 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.5/56.5 MB 10.8 MB/s eta 0:00:00 Collecting nvidia-cusolver-cu12==11.4.5.107 (from torch>=1.8.0->-r requirements.txt (line 15)) Downloading nvidia_cusolver_cu12-11.4.5.107-py3-none-manylinux1_x86_64.whl (124.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 124.2/124.2 MB 8.3 MB/s eta 0:00:00 Collecting nvidia-cusparse-cu12==12.1.0.106 (from torch>=1.8.0->-r requirements.txt (line 15)) Downloading nvidia_cusparse_cu12-12.1.0.106-py3-none-manylinux1_x86_64.whl (196.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 196.0/196.0 MB 2.3 MB/s eta 0:00:00 Collecting nvidia-nccl-cu12==2.19.3 (from torch>=1.8.0->-r requirements.txt (line 15)) Downloading nvidia_nccl_cu12-2.19.3-py3-none-manylinux1_x86_64.whl (166.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 166.0/166.0 MB 7.4 MB/s eta 0:00:00 Collecting nvidia-nvtx-cu12==12.1.105 (from torch>=1.8.0->-r requirements.txt (line 15)) Downloading nvidia_nvtx_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (99 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.1/99.1 kB 13.6 MB/s eta 0:00:00 Requirement already satisfied: triton==2.2.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->-r requirements.txt (line 15)) (2.2.0) Collecting nvidia-nvjitlink-cu12 (from nvidia-cusolver-cu12==11.4.5.107->torch>=1.8.0->-r requirements.txt (line 15)) Downloading nvidia_nvjitlink_cu12-12.4.99-py3-none-manylinux2014_x86_64.whl (21.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.1/21.1 MB 73.4 MB/s eta 0:00:00 Requirement already satisfied: py-cpuinfo in /usr/local/lib/python3.10/dist-packages (from ultralytics>=8.0.232->-r requirements.txt (line 18)) (9.0.0) Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=1.1.4->-r requirements.txt (line 27)) (2023.4) Collecting smmap<6,>=3.0.1 (from gitdb<5,>=4.0.1->gitpython>=3.1.30->-r requirements.txt (line 5)) Downloading smmap-5.0.1-py3-none-any.whl (24 kB) Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib>=3.3->-r requirements.txt (line 6)) (1.16.0) Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.8.0->-r requirements.txt (line 15)) (2.1.5) Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.8.0->-r requirements.txt (line 15)) (1.3.0) Installing collected packages: smmap, nvidia-nvtx-cu12, nvidia-nvjitlink-cu12, nvidia-nccl-cu12, nvidia-curand-cu12, nvidia-cufft-cu12, nvidia-cuda-runtime-cu12, nvidia-cuda-nvrtc-cu12, nvidia-cuda-cupti-cu12, nvidia-cublas-cu12, nvidia-cusparse-cu12, nvidia-cudnn-cu12, gitdb, nvidia-cusolver-cu12, gitpython, thop, ultralytics Successfully installed gitdb-4.0.11 gitpython-3.1.42 nvidia-cublas-cu12-12.1.3.1 nvidia-cuda-cupti-cu12-12.1.105 nvidia-cuda-nvrtc-cu12-12.1.105 nvidia-cuda-runtime-cu12-12.1.105 nvidia-cudnn-cu12-8.9.2.26 nvidia-cufft-cu12-11.0.2.54 nvidia-curand-cu12-10.3.2.106 nvidia-cusolver-cu12-11.4.5.107 nvidia-cusparse-cu12-12.1.0.106 nvidia-nccl-cu12-2.19.3 nvidia-nvjitlink-cu12-12.4.99 nvidia-nvtx-cu12-12.1.105 smmap-5.0.1 thop-0.1.1.post2209072238 ultralytics-8.1.34
In [ ]:
# !python3 train.py --img 416 --batch 32 --epochs 100 --data /content/drive/MyDrive/ObjectDetection/data.yaml --cfg /content/drive/MyDrive/ObjectDetection/yolov5/models/yolov5s.yaml --weights /content/drive/MyDrive/ObjectDetection/yolov5/yolov5s.pt --name fashion_musinsa_yolov5s_results
2024-01-10 05:58:36.013894: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered 2024-01-10 05:58:36.013942: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered 2024-01-10 05:58:36.015189: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered train: weights=/content/drive/MyDrive/ObjectDetection/yolov5/yolov5s.pt, cfg=/content/drive/MyDrive/ObjectDetection/yolov5/models/yolov5s.yaml, data=/content/drive/MyDrive/ObjectDetection/data.yaml, hyp=data/hyps/hyp.scratch-low.yaml, epochs=100, batch_size=32, imgsz=416, rect=False, resume=False, nosave=False, noval=False, noautoanchor=False, noplots=False, evolve=None, evolve_population=data/hyps, resume_evolve=None, bucket=, cache=None, image_weights=False, device=, multi_scale=False, single_cls=False, optimizer=SGD, sync_bn=False, workers=8, project=runs/train, name=fashion_musinsa_yolov5s_results, exist_ok=False, quad=False, cos_lr=False, label_smoothing=0.0, patience=100, freeze=[0], save_period=-1, seed=0, local_rank=-1, entity=None, upload_dataset=False, bbox_interval=-1, artifact_alias=latest, ndjson_console=False, ndjson_file=False github: up to date with https://github.com/ultralytics/yolov5 ✅ YOLOv5 🚀 v7.0-270-g4733b4d Python-3.10.12 torch-2.1.0+cu121 CUDA:0 (Tesla T4, 15102MiB) hyperparameters: lr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.5, cls_pw=1.0, obj=1.0, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0 Comet: run 'pip install comet_ml' to automatically track and visualize YOLOv5 🚀 runs in Comet TensorBoard: Start with 'tensorboard --logdir runs/train', view at http://localhost:6006/ Downloading https://ultralytics.com/assets/Arial.ttf to /root/.config/Ultralytics/Arial.ttf... 100% 755k/755k [00:00<00:00, 130MB/s] Downloading https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s.pt to /content/drive/MyDrive/ObjectDetection/yolov5/yolov5s.pt... 100% 14.1M/14.1M [00:00<00:00, 186MB/s] from n params module arguments 0 -1 1 3520 models.common.Conv [3, 32, 6, 2, 2] 1 -1 1 18560 models.common.Conv [32, 64, 3, 2] 2 -1 1 18816 models.common.C3 [64, 64, 1] 3 -1 1 73984 models.common.Conv [64, 128, 3, 2] 4 -1 2 115712 models.common.C3 [128, 128, 2] 5 -1 1 295424 models.common.Conv [128, 256, 3, 2] 6 -1 3 625152 models.common.C3 [256, 256, 3] 7 -1 1 1180672 models.common.Conv [256, 512, 3, 2] 8 -1 1 1182720 models.common.C3 [512, 512, 1] 9 -1 1 656896 models.common.SPPF [512, 512, 5] 10 -1 1 131584 models.common.Conv [512, 256, 1, 1] 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 12 [-1, 6] 1 0 models.common.Concat [1] 13 -1 1 361984 models.common.C3 [512, 256, 1, False] 14 -1 1 33024 models.common.Conv [256, 128, 1, 1] 15 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 16 [-1, 4] 1 0 models.common.Concat [1] 17 -1 1 90880 models.common.C3 [256, 128, 1, False] 18 -1 1 147712 models.common.Conv [128, 128, 3, 2] 19 [-1, 14] 1 0 models.common.Concat [1] 20 -1 1 296448 models.common.C3 [256, 256, 1, False] 21 -1 1 590336 models.common.Conv [256, 256, 3, 2] 22 [-1, 10] 1 0 models.common.Concat [1] 23 -1 1 1182720 models.common.C3 [512, 512, 1, False] 24 [17, 20, 23] 1 99789 models.yolo.Detect [32, [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119], [116, 90, 156, 198, 373, 326]], [128, 256, 512]] YOLOv5s summary: 214 layers, 7105933 parameters, 7105933 gradients, 16.2 GFLOPs Transferred 342/349 items from /content/drive/MyDrive/ObjectDetection/yolov5/yolov5s.pt AMP: checks passed ✅ optimizer: SGD(lr=0.01) with parameter groups 57 weight(decay=0.0), 60 weight(decay=0.0005), 60 bias albumentations: Blur(p=0.01, blur_limit=(3, 7)), MedianBlur(p=0.01, blur_limit=(3, 7)), ToGray(p=0.01), CLAHE(p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8)) train: Scanning /content/drive/MyDrive/ObjectDetection/train/labels... 276 images, 0 backgrounds, 0 corrupt: 100% 276/276 [03:03<00:00, 1.50it/s] train: New cache created: /content/drive/MyDrive/ObjectDetection/train/labels.cache val: Scanning /content/drive/MyDrive/ObjectDetection/valid/labels... 90 images, 0 backgrounds, 0 corrupt: 100% 90/90 [01:57<00:00, 1.31s/it] val: New cache created: /content/drive/MyDrive/ObjectDetection/valid/labels.cache AutoAnchor: 5.19 anchors/target, 1.000 Best Possible Recall (BPR). Current anchors are a good fit to dataset ✅ Plotting labels to runs/train/fashion_musinsa_yolov5s_results2/labels.jpg... Image sizes 416 train, 416 val Using 2 dataloader workers Logging results to runs/train/fashion_musinsa_yolov5s_results2 Starting training for 100 epochs... Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 0/99 3.12G 0.117 0.0417 0.09082 160 416: 100% 9/9 [00:11<00:00, 1.23s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:07<00:00, 3.58s/it] all 90 363 0.000924 0.0426 0.00165 0.000395 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 1/99 3.49G 0.1001 0.05546 0.08818 164 416: 100% 9/9 [00:07<00:00, 1.15it/s] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.69s/it] all 90 363 0.0041 0.242 0.00486 0.00141 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 2/99 3.49G 0.08356 0.05727 0.08328 134 416: 100% 9/9 [00:08<00:00, 1.05it/s] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:06<00:00, 3.29s/it] all 90 363 0.375 0.0703 0.0327 0.0121 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 3/99 3.49G 0.07359 0.05342 0.07665 148 416: 100% 9/9 [00:08<00:00, 1.04it/s] Class Images Instances P R mAP50 mAP50-95: 0% 0/2 [00:00<?, ?it/s]WARNING ⚠️ NMS time limit 3.700s exceeded Class Images Instances P R mAP50 mAP50-95: 50% 1/2 [00:04<00:04, 4.35s/it]WARNING ⚠️ NMS time limit 1.800s exceeded Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:06<00:00, 3.27s/it] all 90 363 0.372 0.0579 0.0205 0.0084 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 4/99 3.49G 0.06702 0.05199 0.072 203 416: 100% 9/9 [00:07<00:00, 1.14it/s] Class Images Instances P R mAP50 mAP50-95: 0% 0/2 [00:00<?, ?it/s]WARNING ⚠️ NMS time limit 3.700s exceeded Class Images Instances P R mAP50 mAP50-95: 50% 1/2 [00:04<00:04, 4.95s/it]WARNING ⚠️ NMS time limit 1.800s exceeded Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:07<00:00, 3.67s/it] all 90 363 0.736 0.0796 0.0367 0.0146 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 5/99 3.49G 0.0655 0.04811 0.06809 157 416: 100% 9/9 [00:08<00:00, 1.10it/s] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:06<00:00, 3.15s/it] all 90 363 0.848 0.0955 0.0629 0.0232 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 6/99 3.49G 0.06441 0.04469 0.06541 162 416: 100% 9/9 [00:07<00:00, 1.25it/s] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:04<00:00, 2.18s/it] all 90 363 0.883 0.0715 0.0514 0.0226 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 7/99 3.49G 0.06595 0.04498 0.06439 138 416: 100% 9/9 [00:09<00:00, 1.10s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.81s/it] all 90 363 0.568 0.177 0.0874 0.0353 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 8/99 3.49G 0.06498 0.04232 0.06379 172 416: 100% 9/9 [00:08<00:00, 1.11it/s] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.42s/it] all 90 363 0.931 0.0709 0.0937 0.0425 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 9/99 3.49G 0.06603 0.04141 0.06127 200 416: 100% 9/9 [00:10<00:00, 1.13s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.19s/it] all 90 363 0.608 0.182 0.0952 0.0408 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 10/99 3.49G 0.06476 0.04073 0.05992 150 416: 100% 9/9 [00:10<00:00, 1.19s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.11s/it] all 90 363 0.617 0.225 0.11 0.0419 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 11/99 3.49G 0.06227 0.03939 0.05894 149 416: 100% 9/9 [00:11<00:00, 1.24s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.00s/it] all 90 363 0.628 0.234 0.101 0.0451 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 12/99 3.49G 0.0603 0.04002 0.05703 137 416: 100% 9/9 [00:11<00:00, 1.32s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.08s/it] all 90 363 0.483 0.241 0.111 0.0471 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 13/99 3.49G 0.05537 0.03953 0.0557 149 416: 100% 9/9 [00:11<00:00, 1.26s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.05s/it] all 90 363 0.525 0.259 0.119 0.0462 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 14/99 3.49G 0.05491 0.03784 0.05471 161 416: 100% 9/9 [00:11<00:00, 1.29s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.07s/it] all 90 363 0.53 0.269 0.129 0.0546 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 15/99 3.49G 0.05283 0.03777 0.0537 168 416: 100% 9/9 [00:11<00:00, 1.31s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.14s/it] all 90 363 0.513 0.293 0.167 0.0777 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 16/99 3.49G 0.05195 0.03648 0.05336 133 416: 100% 9/9 [00:11<00:00, 1.24s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.04s/it] all 90 363 0.58 0.322 0.186 0.0927 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 17/99 3.49G 0.04833 0.03691 0.05293 147 416: 100% 9/9 [00:11<00:00, 1.31s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.11s/it] all 90 363 0.546 0.359 0.198 0.0935 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 18/99 3.49G 0.04677 0.03586 0.0508 141 416: 100% 9/9 [00:10<00:00, 1.20s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.03s/it] all 90 363 0.574 0.355 0.213 0.0988 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 19/99 3.49G 0.0479 0.03573 0.05121 156 416: 100% 9/9 [00:12<00:00, 1.34s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.08it/s] all 90 363 0.466 0.4 0.209 0.0993 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 20/99 3.49G 0.0467 0.03689 0.05012 180 416: 100% 9/9 [00:11<00:00, 1.29s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.06s/it] all 90 363 0.44 0.421 0.224 0.111 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 21/99 3.49G 0.04637 0.03292 0.04898 127 416: 100% 9/9 [00:12<00:00, 1.34s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.04s/it] all 90 363 0.473 0.384 0.216 0.107 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 22/99 3.49G 0.04412 0.03488 0.04781 163 416: 100% 9/9 [00:11<00:00, 1.23s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.19s/it] all 90 363 0.535 0.392 0.234 0.111 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 23/99 3.49G 0.04341 0.03455 0.04797 143 416: 100% 9/9 [00:12<00:00, 1.34s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.13s/it] all 90 363 0.444 0.409 0.228 0.121 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 24/99 3.49G 0.04242 0.03484 0.04822 158 416: 100% 9/9 [00:10<00:00, 1.16s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.44s/it] all 90 363 0.43 0.414 0.236 0.119 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 25/99 3.49G 0.04145 0.0319 0.04668 149 416: 100% 9/9 [00:11<00:00, 1.28s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.44s/it] all 90 363 0.5 0.417 0.254 0.13 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 26/99 3.49G 0.0417 0.03287 0.04597 154 416: 100% 9/9 [00:09<00:00, 1.03s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.57s/it] all 90 363 0.54 0.425 0.259 0.131 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 27/99 3.49G 0.0404 0.03304 0.04664 157 416: 100% 9/9 [00:10<00:00, 1.21s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.85s/it] all 90 363 0.523 0.439 0.258 0.136 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 28/99 3.49G 0.04105 0.03138 0.04529 163 416: 100% 9/9 [00:08<00:00, 1.08it/s] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.61s/it] all 90 363 0.526 0.461 0.267 0.147 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 29/99 3.49G 0.03928 0.03403 0.04467 162 416: 100% 9/9 [00:09<00:00, 1.09s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.76s/it] all 90 363 0.484 0.446 0.266 0.148 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 30/99 3.49G 0.03902 0.03158 0.04536 161 416: 100% 9/9 [00:07<00:00, 1.16it/s] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.42s/it] all 90 363 0.509 0.487 0.276 0.155 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 31/99 3.49G 0.03833 0.03149 0.04472 176 416: 100% 9/9 [00:10<00:00, 1.17s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.35s/it] all 90 363 0.5 0.495 0.283 0.167 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 32/99 3.49G 0.03784 0.03066 0.04341 173 416: 100% 9/9 [00:09<00:00, 1.00s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.01it/s] all 90 363 0.499 0.488 0.276 0.159 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 33/99 3.49G 0.03725 0.03123 0.04369 148 416: 100% 9/9 [00:12<00:00, 1.35s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.04it/s] all 90 363 0.503 0.474 0.268 0.153 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 34/99 3.49G 0.03897 0.0316 0.04341 175 416: 100% 9/9 [00:10<00:00, 1.19s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.10s/it] all 90 363 0.575 0.463 0.278 0.157 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 35/99 3.49G 0.03629 0.03134 0.04311 162 416: 100% 9/9 [00:12<00:00, 1.42s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.05s/it] all 90 363 0.511 0.435 0.276 0.169 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 36/99 3.49G 0.03682 0.03349 0.04229 213 416: 100% 9/9 [00:11<00:00, 1.26s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.10s/it] all 90 363 0.503 0.414 0.288 0.16 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 37/99 3.49G 0.03645 0.03224 0.04252 147 416: 100% 9/9 [00:12<00:00, 1.39s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.08it/s] all 90 363 0.504 0.49 0.279 0.168 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 38/99 3.49G 0.03692 0.03128 0.04282 173 416: 100% 9/9 [00:11<00:00, 1.29s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.16s/it] all 90 363 0.505 0.481 0.287 0.163 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 39/99 3.49G 0.03523 0.0325 0.04205 190 416: 100% 9/9 [00:12<00:00, 1.41s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.04it/s] all 90 363 0.426 0.5 0.28 0.165 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 40/99 3.49G 0.03477 0.03134 0.04209 153 416: 100% 9/9 [00:11<00:00, 1.29s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.06s/it] all 90 363 0.513 0.488 0.288 0.167 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 41/99 3.49G 0.03414 0.03018 0.04054 167 416: 100% 9/9 [00:12<00:00, 1.35s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.03it/s] all 90 363 0.483 0.507 0.296 0.175 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 42/99 3.49G 0.03391 0.03015 0.04085 194 416: 100% 9/9 [00:11<00:00, 1.28s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.05s/it] all 90 363 0.489 0.474 0.303 0.182 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 43/99 3.49G 0.03352 0.0296 0.04123 147 416: 100% 9/9 [00:12<00:00, 1.41s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.04s/it] all 90 363 0.46 0.488 0.308 0.187 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 44/99 3.49G 0.03345 0.02973 0.04039 147 416: 100% 9/9 [00:10<00:00, 1.20s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.11s/it] all 90 363 0.425 0.51 0.304 0.179 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 45/99 3.49G 0.03301 0.0302 0.0407 180 416: 100% 9/9 [00:11<00:00, 1.25s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.47s/it] all 90 363 0.46 0.476 0.318 0.186 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 46/99 3.49G 0.03356 0.02815 0.03984 144 416: 100% 9/9 [00:09<00:00, 1.06s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.67s/it] all 90 363 0.453 0.504 0.321 0.188 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 47/99 3.49G 0.03167 0.03001 0.03965 156 416: 100% 9/9 [00:11<00:00, 1.28s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.71s/it] all 90 363 0.359 0.512 0.311 0.189 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 48/99 3.49G 0.03215 0.02878 0.04011 136 416: 100% 9/9 [00:08<00:00, 1.04it/s] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.83s/it] all 90 363 0.508 0.486 0.32 0.195 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 49/99 3.49G 0.03096 0.02869 0.03857 157 416: 100% 9/9 [00:10<00:00, 1.12s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.74s/it] all 90 363 0.429 0.499 0.324 0.203 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 50/99 3.49G 0.03167 0.0293 0.03837 164 416: 100% 9/9 [00:07<00:00, 1.13it/s] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.71s/it] all 90 363 0.571 0.481 0.33 0.196 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 51/99 3.49G 0.0308 0.02912 0.03832 137 416: 100% 9/9 [00:10<00:00, 1.15s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.38s/it] all 90 363 0.515 0.509 0.334 0.204 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 52/99 3.49G 0.03258 0.03093 0.03782 173 416: 100% 9/9 [00:09<00:00, 1.01s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.18s/it] all 90 363 0.481 0.51 0.339 0.207 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 53/99 3.49G 0.0308 0.02921 0.03682 159 416: 100% 9/9 [00:10<00:00, 1.21s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.09s/it] all 90 363 0.468 0.533 0.346 0.215 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 54/99 3.49G 0.03239 0.02919 0.03737 143 416: 100% 9/9 [00:09<00:00, 1.08s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.05s/it] all 90 363 0.495 0.491 0.357 0.23 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 55/99 3.49G 0.03167 0.02853 0.03695 176 416: 100% 9/9 [00:11<00:00, 1.32s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.03s/it] all 90 363 0.474 0.509 0.354 0.226 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 56/99 3.49G 0.03041 0.02772 0.03642 120 416: 100% 9/9 [00:11<00:00, 1.23s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.02s/it] all 90 363 0.469 0.521 0.373 0.228 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 57/99 3.49G 0.02987 0.02693 0.03565 147 416: 100% 9/9 [00:12<00:00, 1.39s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.10s/it] all 90 363 0.42 0.532 0.366 0.233 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 58/99 3.49G 0.03028 0.02831 0.03616 150 416: 100% 9/9 [00:10<00:00, 1.22s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.14s/it] all 90 363 0.382 0.557 0.373 0.236 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 59/99 3.49G 0.0286 0.02621 0.03507 142 416: 100% 9/9 [00:12<00:00, 1.36s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.18it/s] all 90 363 0.514 0.529 0.376 0.234 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 60/99 3.49G 0.0303 0.02844 0.03544 179 416: 100% 9/9 [00:11<00:00, 1.33s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.02s/it] all 90 363 0.42 0.546 0.37 0.243 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 61/99 3.49G 0.0294 0.0281 0.03432 160 416: 100% 9/9 [00:11<00:00, 1.33s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.08s/it] all 90 363 0.4 0.533 0.379 0.241 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 62/99 3.49G 0.03002 0.02776 0.03441 164 416: 100% 9/9 [00:11<00:00, 1.28s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.16s/it] all 90 363 0.429 0.532 0.383 0.243 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 63/99 3.49G 0.02903 0.02745 0.03381 160 416: 100% 9/9 [00:12<00:00, 1.37s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.08it/s] all 90 363 0.665 0.425 0.383 0.245 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 64/99 3.49G 0.02832 0.02724 0.03343 156 416: 100% 9/9 [00:11<00:00, 1.24s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.11s/it] all 90 363 0.395 0.51 0.378 0.241 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 65/99 3.49G 0.02807 0.02666 0.03339 145 416: 100% 9/9 [00:12<00:00, 1.38s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.16s/it] all 90 363 0.387 0.531 0.384 0.24 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 66/99 3.49G 0.02868 0.02819 0.0322 188 416: 100% 9/9 [00:10<00:00, 1.20s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.31s/it] all 90 363 0.558 0.47 0.391 0.248 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 67/99 3.49G 0.02793 0.02626 0.03247 124 416: 100% 9/9 [00:11<00:00, 1.29s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.25s/it] all 90 363 0.538 0.49 0.391 0.253 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 68/99 3.49G 0.02849 0.02758 0.03222 157 416: 100% 9/9 [00:09<00:00, 1.04s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.55s/it] all 90 363 0.565 0.485 0.399 0.25 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 69/99 3.49G 0.02816 0.02751 0.03204 159 416: 100% 9/9 [00:11<00:00, 1.24s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.66s/it] all 90 363 0.443 0.548 0.392 0.253 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 70/99 3.49G 0.02866 0.02822 0.03294 134 416: 100% 9/9 [00:08<00:00, 1.02it/s] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.69s/it] all 90 363 0.404 0.53 0.393 0.261 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 71/99 3.49G 0.02777 0.02688 0.03147 159 416: 100% 9/9 [00:09<00:00, 1.08s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.63s/it] all 90 363 0.41 0.538 0.407 0.263 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 72/99 3.49G 0.02734 0.02552 0.03141 130 416: 100% 9/9 [00:08<00:00, 1.11it/s] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.24s/it] all 90 363 0.467 0.545 0.408 0.264 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 73/99 3.49G 0.0275 0.02659 0.03169 135 416: 100% 9/9 [00:10<00:00, 1.16s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.04s/it] all 90 363 0.482 0.534 0.397 0.259 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 74/99 3.49G 0.02742 0.02634 0.03056 166 416: 100% 9/9 [00:10<00:00, 1.14s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.07it/s] all 90 363 0.487 0.536 0.399 0.259 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 75/99 3.49G 0.02711 0.02791 0.03039 182 416: 100% 9/9 [00:12<00:00, 1.38s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.06s/it] all 90 363 0.49 0.548 0.395 0.258 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 76/99 3.49G 0.02625 0.02623 0.03081 158 416: 100% 9/9 [00:10<00:00, 1.22s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.05it/s] all 90 363 0.491 0.536 0.398 0.266 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 77/99 3.49G 0.02567 0.02628 0.02953 136 416: 100% 9/9 [00:12<00:00, 1.40s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.03it/s] all 90 363 0.55 0.465 0.393 0.262 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 78/99 3.49G 0.02606 0.02604 0.03017 123 416: 100% 9/9 [00:11<00:00, 1.27s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.06s/it] all 90 363 0.563 0.464 0.4 0.263 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 79/99 3.49G 0.0261 0.0269 0.02979 166 416: 100% 9/9 [00:12<00:00, 1.38s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.01s/it] all 90 363 0.559 0.463 0.415 0.274 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 80/99 3.49G 0.02599 0.02573 0.02888 142 416: 100% 9/9 [00:11<00:00, 1.24s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.05it/s] all 90 363 0.569 0.459 0.422 0.288 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 81/99 3.49G 0.02517 0.02671 0.02928 195 416: 100% 9/9 [00:12<00:00, 1.36s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.04s/it] all 90 363 0.595 0.46 0.416 0.279 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 82/99 3.49G 0.02545 0.02505 0.02868 157 416: 100% 9/9 [00:10<00:00, 1.20s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.07s/it] all 90 363 0.6 0.465 0.402 0.266 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 83/99 3.49G 0.0258 0.02565 0.03008 163 416: 100% 9/9 [00:11<00:00, 1.31s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.22s/it] all 90 363 0.549 0.478 0.417 0.276 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 84/99 3.49G 0.02598 0.02666 0.02934 154 416: 100% 9/9 [00:09<00:00, 1.08s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.70s/it] all 90 363 0.56 0.493 0.435 0.288 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 85/99 3.49G 0.02466 0.02341 0.02803 139 416: 100% 9/9 [00:10<00:00, 1.18s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.81s/it] all 90 363 0.552 0.489 0.426 0.292 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 86/99 3.49G 0.02476 0.0247 0.02799 163 416: 100% 9/9 [00:08<00:00, 1.04it/s] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.73s/it] all 90 363 0.516 0.515 0.426 0.289 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 87/99 3.49G 0.02449 0.02488 0.02852 168 416: 100% 9/9 [00:09<00:00, 1.10s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:03<00:00, 1.58s/it] all 90 363 0.495 0.535 0.422 0.287 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 88/99 3.49G 0.02431 0.02493 0.02879 144 416: 100% 9/9 [00:09<00:00, 1.04s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.16it/s] all 90 363 0.505 0.531 0.426 0.29 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 89/99 3.49G 0.02443 0.02554 0.02754 200 416: 100% 9/9 [00:12<00:00, 1.33s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.08it/s] all 90 363 0.502 0.513 0.427 0.289 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 90/99 3.49G 0.02471 0.02714 0.02723 164 416: 100% 9/9 [00:10<00:00, 1.21s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.03s/it] all 90 363 0.5 0.547 0.432 0.298 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 91/99 3.49G 0.02502 0.02524 0.02755 135 416: 100% 9/9 [00:11<00:00, 1.29s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.02s/it] all 90 363 0.509 0.519 0.43 0.295 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 92/99 3.49G 0.02376 0.02486 0.0279 169 416: 100% 9/9 [00:11<00:00, 1.28s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.14it/s] all 90 363 0.558 0.505 0.435 0.298 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 93/99 3.49G 0.02416 0.02482 0.02795 184 416: 100% 9/9 [00:12<00:00, 1.40s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.14s/it] all 90 363 0.556 0.499 0.425 0.292 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 94/99 3.49G 0.02397 0.02445 0.0263 167 416: 100% 9/9 [00:10<00:00, 1.20s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.02s/it] all 90 363 0.56 0.495 0.425 0.29 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 95/99 3.49G 0.02331 0.02544 0.02793 146 416: 100% 9/9 [00:12<00:00, 1.38s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.06it/s] all 90 363 0.563 0.5 0.431 0.293 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 96/99 3.49G 0.02307 0.02314 0.02634 136 416: 100% 9/9 [00:11<00:00, 1.31s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.02it/s] all 90 363 0.56 0.497 0.431 0.297 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 97/99 3.49G 0.02285 0.02435 0.02698 154 416: 100% 9/9 [00:12<00:00, 1.39s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:01<00:00, 1.15it/s] all 90 363 0.528 0.527 0.434 0.303 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 98/99 3.49G 0.02359 0.02413 0.02715 190 416: 100% 9/9 [00:11<00:00, 1.30s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.07s/it] all 90 363 0.543 0.524 0.43 0.298 Epoch GPU_mem box_loss obj_loss cls_loss Instances Size 99/99 3.49G 0.0234 0.02447 0.02705 165 416: 100% 9/9 [00:11<00:00, 1.24s/it] Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.49s/it] all 90 363 0.546 0.525 0.429 0.302 100 epochs completed in 0.432 hours. Optimizer stripped from runs/train/fashion_musinsa_yolov5s_results2/weights/last.pt, 14.5MB Optimizer stripped from runs/train/fashion_musinsa_yolov5s_results2/weights/best.pt, 14.5MB Validating runs/train/fashion_musinsa_yolov5s_results2/weights/best.pt... Fusing layers... YOLOv5s summary: 157 layers, 7096429 parameters, 0 gradients, 16.0 GFLOPs Class Images Instances P R mAP50 mAP50-95: 100% 2/2 [00:02<00:00, 1.49s/it] all 90 363 0.53 0.526 0.434 0.303 Beanie 90 6 0.421 1 0.596 0.341 Buckethat 90 1 0 0 0.0905 0.0633 Cap 90 19 0.499 0.895 0.785 0.482 Hat 90 3 0.116 1 0.237 0.196 Glasses 90 11 0.243 0.273 0.249 0.146 Coat 90 3 1 0.768 0.995 0.841 Bubble jacket 90 8 0.286 1 0.612 0.498 Outer 90 19 0.278 0.83 0.372 0.268 Jacket 90 7 0.722 0.143 0.446 0.335 Shorts 90 3 1 0 0.177 0.131 Skirt 90 14 0.602 0.973 0.786 0.479 Croptop 90 3 1 0 0.0472 0.0321 T-shirts 90 4 1 0 0.0495 0.0178 Sweatshirt 90 14 0.392 0.37 0.466 0.375 Vest 90 2 1 0 0.0276 0.0118 Hoodie 90 13 0.195 0.692 0.271 0.196 Top 90 21 0.282 0.81 0.391 0.229 Jeans 90 18 0.492 0.833 0.773 0.614 Training pants 90 12 0.307 0.833 0.776 0.555 Pants 90 43 0.564 0.953 0.851 0.649 Shoes 90 77 0.786 0.974 0.926 0.641 Boots 90 15 0.443 0.4 0.37 0.253 Muffler 90 7 0.715 0.286 0.398 0.21 Mask 90 7 0.525 0.571 0.577 0.379 Headphone 90 3 1 0 0.0084 0.00504 Accessories 90 14 0 0 0.0175 0.00461 Backpack 90 7 0.617 0.714 0.634 0.395 Bag 90 9 0.349 0.418 0.229 0.133 Results saved to runs/train/fashion_musinsa_yolov5s_results2
In [ ]:
!pip install ultralytics
Requirement already satisfied: ultralytics in /usr/local/lib/python3.10/dist-packages (8.1.34) Requirement already satisfied: matplotlib>=3.3.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (3.7.1) Requirement already satisfied: opencv-python>=4.6.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (4.8.0.76) Requirement already satisfied: pillow>=7.1.2 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (9.4.0) Requirement already satisfied: pyyaml>=5.3.1 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (6.0.1) Requirement already satisfied: requests>=2.23.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (2.31.0) Requirement already satisfied: scipy>=1.4.1 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (1.11.4) Requirement already satisfied: torch>=1.8.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (2.2.1+cu121) Requirement already satisfied: torchvision>=0.9.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (0.17.1+cu121) Requirement already satisfied: tqdm>=4.64.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (4.66.2) Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from ultralytics) (5.9.5) Requirement already satisfied: py-cpuinfo in /usr/local/lib/python3.10/dist-packages (from ultralytics) (9.0.0) Requirement already satisfied: thop>=0.1.1 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (0.1.1.post2209072238) Requirement already satisfied: pandas>=1.1.4 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (1.5.3) Requirement already satisfied: seaborn>=0.11.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (0.13.1) Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics) (1.2.0) Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics) (0.12.1) Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics) (4.50.0) Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics) (1.4.5) Requirement already satisfied: numpy>=1.20 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics) (1.25.2) Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics) (24.0) Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics) (3.1.2) Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics) (2.8.2) Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=1.1.4->ultralytics) (2023.4) Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->ultralytics) (3.3.2) Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->ultralytics) (3.6) Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->ultralytics) (2.0.7) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->ultralytics) (2024.2.2) Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (3.13.1) Requirement already satisfied: typing-extensions>=4.8.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (4.10.0) Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (1.12) Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (3.2.1) Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (3.1.3) Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (2023.6.0) Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.1.105 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (12.1.105) Requirement already satisfied: nvidia-cuda-runtime-cu12==12.1.105 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (12.1.105) Requirement already satisfied: nvidia-cuda-cupti-cu12==12.1.105 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (12.1.105) Requirement already satisfied: nvidia-cudnn-cu12==8.9.2.26 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (8.9.2.26) Requirement already satisfied: nvidia-cublas-cu12==12.1.3.1 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (12.1.3.1) Requirement already satisfied: nvidia-cufft-cu12==11.0.2.54 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (11.0.2.54) Requirement already satisfied: nvidia-curand-cu12==10.3.2.106 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (10.3.2.106) Requirement already satisfied: nvidia-cusolver-cu12==11.4.5.107 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (11.4.5.107) Requirement already satisfied: nvidia-cusparse-cu12==12.1.0.106 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (12.1.0.106) Requirement already satisfied: nvidia-nccl-cu12==2.19.3 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (2.19.3) Requirement already satisfied: nvidia-nvtx-cu12==12.1.105 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (12.1.105) Requirement already satisfied: triton==2.2.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (2.2.0) Requirement already satisfied: nvidia-nvjitlink-cu12 in /usr/local/lib/python3.10/dist-packages (from nvidia-cusolver-cu12==11.4.5.107->torch>=1.8.0->ultralytics) (12.4.99) Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib>=3.3.0->ultralytics) (1.16.0) Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.8.0->ultralytics) (2.1.5) Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.8.0->ultralytics) (1.3.0)
In [ ]:
!python3 ./detect.py --weights /content/drive/MyDrive/car_plate/yolov5/runs/train/car_number_plate_yolos_result/weights/best.pt --conf 0.5 --source /content/drive/MyDrive/car_plate/yolov5/test/car1.jpg
detect: weights=['/content/drive/MyDrive/car_plate/yolov5/runs/train/car_number_plate_yolos_result/weights/best.pt'], source=/content/drive/MyDrive/car_plate/yolov5/test/car1.jpg, data=data/coco128.yaml, imgsz=[640, 640], conf_thres=0.5, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_csv=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs/detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False, vid_stride=1 YOLOv5 🚀 v7.0-295-gac6c4383 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB) Fusing layers... YOLOv5s summary: 213 layers, 7012822 parameters, 0 gradients, 15.8 GFLOPs WARNING ⚠️ NMS time limit 0.550s exceeded image 1/1 /content/drive/MyDrive/car_plate/yolov5/test/car1.jpg: 448x640 2 licenses, 51.7ms Speed: 0.8ms pre-process, 51.7ms inference, 747.8ms NMS per image at shape (1, 3, 640, 640) Results saved to runs/detect/exp4
In [ ]:
!python3 ./detect.py --weights /content/drive/MyDrive/car_plate/yolov5/runs/train/car_number_plate_yolos_result/weights/best.pt --conf 0.5 --source /content/drive/MyDrive/car_plate/yolov5/test/car2.jpg
detect: weights=['/content/drive/MyDrive/car_plate/yolov5/runs/train/car_number_plate_yolos_result/weights/best.pt'], source=/content/drive/MyDrive/car_plate/yolov5/test/car2.jpg, data=data/coco128.yaml, imgsz=[640, 640], conf_thres=0.5, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_csv=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs/detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False, vid_stride=1 YOLOv5 🚀 v7.0-295-gac6c4383 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB) Fusing layers... YOLOv5s summary: 213 layers, 7012822 parameters, 0 gradients, 15.8 GFLOPs WARNING ⚠️ NMS time limit 0.550s exceeded image 1/1 /content/drive/MyDrive/car_plate/yolov5/test/car2.jpg: 480x640 1 license, 54.0ms Speed: 0.7ms pre-process, 54.0ms inference, 598.1ms NMS per image at shape (1, 3, 640, 640) Results saved to runs/detect/exp5
In [ ]:
!python3 ./detect.py --weights /content/drive/MyDrive/car_plate/yolov5/runs/train/car_number_plate_yolos_result/weights/best.pt --conf 0.5 --source /content/drive/MyDrive/car_plate/yolov5/test/car3.jpg
detect: weights=['/content/drive/MyDrive/car_plate/yolov5/runs/train/car_number_plate_yolos_result/weights/best.pt'], source=/content/drive/MyDrive/car_plate/yolov5/test/car3.jpg, data=data/coco128.yaml, imgsz=[640, 640], conf_thres=0.5, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_csv=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs/detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False, vid_stride=1 YOLOv5 🚀 v7.0-295-gac6c4383 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB) Fusing layers... YOLOv5s summary: 213 layers, 7012822 parameters, 0 gradients, 15.8 GFLOPs image 1/1 /content/drive/MyDrive/car_plate/yolov5/test/car3.jpg: 416x640 1 license, 51.3ms Speed: 0.6ms pre-process, 51.3ms inference, 498.2ms NMS per image at shape (1, 3, 640, 640) Results saved to runs/detect/exp6
In [ ]:
!python3 ./detect.py --weights /content/drive/MyDrive/car_plate/yolov5/runs/train/car_number_plate_yolos_result/weights/best.pt --conf 0.5 --source /content/drive/MyDrive/car_plate/yolov5/test/car4.jpg
detect: weights=['/content/drive/MyDrive/car_plate/yolov5/runs/train/car_number_plate_yolos_result/weights/best.pt'], source=/content/drive/MyDrive/car_plate/yolov5/test/car4.jpg, data=data/coco128.yaml, imgsz=[640, 640], conf_thres=0.5, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_csv=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs/detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False, vid_stride=1 YOLOv5 🚀 v7.0-295-gac6c4383 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB) Fusing layers... YOLOv5s summary: 213 layers, 7012822 parameters, 0 gradients, 15.8 GFLOPs image 1/1 /content/drive/MyDrive/car_plate/yolov5/test/car4.jpg: 288x640 4 licenses, 52.0ms Speed: 0.6ms pre-process, 52.0ms inference, 529.2ms NMS per image at shape (1, 3, 640, 640) Results saved to runs/detect/exp7
In [ ]:
!python3 ./detect.py --weights /content/drive/MyDrive/car_plate/yolov5/runs/train/car_number_plate_yolos_result/weights/best.pt --conf 0.5 --source /content/drive/MyDrive/car_plate/yolov5/test/car5.jpg --save-txt
detect: weights=['/content/drive/MyDrive/car_plate/yolov5/runs/train/car_number_plate_yolos_result/weights/best.pt'], source=/content/drive/MyDrive/car_plate/yolov5/test/car5.jpg, data=data/coco128.yaml, imgsz=[640, 640], conf_thres=0.5, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=True, save_csv=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs/detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False, vid_stride=1 YOLOv5 🚀 v7.0-295-gac6c4383 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB) Fusing layers... YOLOv5s summary: 213 layers, 7012822 parameters, 0 gradients, 15.8 GFLOPs WARNING ⚠️ NMS time limit 0.550s exceeded image 1/1 /content/drive/MyDrive/car_plate/yolov5/test/car5.jpg: 288x640 4 licenses, 50.4ms Speed: 0.6ms pre-process, 50.4ms inference, 596.2ms NMS per image at shape (1, 3, 640, 640) Results saved to runs/detect/exp9 1 labels saved to runs/detect/exp9/labels
In [ ]:
!python3 ./detect.py --weights /content/drive/MyDrive/car_plate/yolov5/runs/train/car_number_plate_yolos_result/weights/best.pt --conf 0.5 --source /content/drive/MyDrive/car_plate/yolov5/test/car9999.jpg --save-txt
detect: weights=['/content/drive/MyDrive/car_plate/yolov5/runs/train/car_number_plate_yolos_result/weights/best.pt'], source=/content/drive/MyDrive/car_plate/yolov5/test/car9999.jpg, data=data/coco128.yaml, imgsz=[640, 640], conf_thres=0.5, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=True, save_csv=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs/detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False, vid_stride=1 YOLOv5 🚀 v7.0-295-gac6c4383 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB) Fusing layers... YOLOv5s summary: 213 layers, 7012822 parameters, 0 gradients, 15.8 GFLOPs WARNING ⚠️ NMS time limit 0.550s exceeded image 1/1 /content/drive/MyDrive/car_plate/yolov5/test/car9999.jpg: 480x640 3 licenses, 50.8ms Speed: 0.5ms pre-process, 50.8ms inference, 633.8ms NMS per image at shape (1, 3, 640, 640) Results saved to runs/detect/exp10 1 labels saved to runs/detect/exp10/labels
In [ ]:
import cv2
# 이미지 파일을 불러오는 함수
def load_image(image_path):
return cv2.imread(image_path)
# txt 파일에서 바운딩 박스를 읽는 함수
def read_bboxes(txt_path, img_width, img_height):
bboxes = []
with open(txt_path, 'r') as file:
for line in file:
class_id, x_center, y_center, width, height = map(float, line.split())
x1 = int((x_center - width / 2) * img_width)
y1 = int((y_center - height / 2) * img_height)
x2 = int((x_center + width / 2) * img_width)
y2 = int((y_center + height / 2) * img_height)
bboxes.append((x1, y1, x2, y2))
return bboxes
# 모자이크 처리 함수
def apply_mosaic(img, bbox, mosaic_size):
x1, y1, x2, y2 = bbox
roi = img[y1:y2, x1:x2] # 관심영역(Region of Interest) 추출
roi = cv2.resize(roi, (mosaic_size, mosaic_size), interpolation=cv2.INTER_LINEAR)
roi = cv2.resize(roi, (x2 - x1, y2 - y1), interpolation=cv2.INTER_NEAREST)
img[y1:y2, x1:x2] = roi # 원본 이미지에 모자이크 처리된 영역을 대체
return img
# 이미지 경로와 txt 파일 경로
image_path = '/content/drive/MyDrive/car_plate/yolov5/test/car9999.jpg'
txt_path = '/content/drive/MyDrive/car_plate/yolov5/runs/detect/exp10/labels/car9999.txt'
# 이미지 로드
image = load_image(image_path)
img_height, img_width = image.shape[:2]
# 모자이크 크기 설정
mosaic_size = 15
# 바운딩 박스 정보 읽기
bboxes = read_bboxes(txt_path, img_width, img_height)
# 각 바운딩 박스에 대해 모자이크 처리
for bbox in bboxes:
image = apply_mosaic(image, bbox, mosaic_size)
# 모자이크 처리된 이미지 저장
cv2.imwrite('/content/drive/MyDrive/car_plate/yolov5/mosiaic/mosiaic_car9999.jpg', image)
Out[ ]:
True
'AI > Computer Vision' 카테고리의 다른 글
패션 이미지를 보고 패션 아이템 탐지 프로젝트 (YOLOv5 커스텀 트레이닝) (0) | 2024.12.24 |
---|