mirror of
https://github.com/ferdzo/vesselDetection.git
synced 2026-04-05 10:16:25 +00:00
Updates
This commit is contained in:
@@ -336,10 +336,62 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "054593ec",
|
||||
"execution_count": 4,
|
||||
"id": "3c9811ee",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"model = YOLO(\"/home/mlmonster/Projects/ferdzo/vesselDetection/runs/train/vessel_training/weights/best.pt\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "054593ec",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Ultralytics 8.3.159 🚀 Python-3.12.3 torch-2.7.1+cu126 CUDA:0 (NVIDIA GeForce RTX 3090, 24135MiB)\n",
|
||||
"YOLO11x summary (fused): 190 layers, 56,828,179 parameters, 0 gradients, 194.4 GFLOPs\n",
|
||||
"\u001b[34m\u001b[1mval: \u001b[0mFast image access ✅ (ping: 0.0±0.0 ms, read: 794.1±400.9 MB/s, size: 4.2 KB)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[34m\u001b[1mval: \u001b[0mScanning /home/mlmonster/Projects/ferdzo/vesselDetection/ships-aerial-images/valid/labels.cache... 2165 images, 68 backgrounds, 0 corrupt: 100%|██████████| 2165/2165 [00:00<?, ?it/s]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"WARNING ⚠️ Box and segment counts should be equal, but got len(segments) = 172, len(boxes) = 3720. To resolve this only boxes will be used and all segments will be removed. To avoid this please supply either a detect or segment dataset, not a detect-segment mixed dataset.\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
" Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 136/136 [00:27<00:00, 4.86it/s]\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
" all 2165 3720 0.379 0.315 0.292 0.16\n",
|
||||
"Speed: 0.2ms preprocess, 11.9ms inference, 0.0ms loss, 0.3ms postprocess per image\n",
|
||||
"Results saved to \u001b[1m/home/mlmonster/Projects/ferdzo/vesselDetection/runs/detect/val2\u001b[0m\n",
|
||||
"mAP@0.5: 0.2918\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"metrics = model.val()\n",
|
||||
"print(f\"mAP@0.5: {metrics.box.map50:.4f}\")"
|
||||
@@ -350,14 +402,39 @@
|
||||
"execution_count": null,
|
||||
"id": "40b49cb7",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
"image 1/1 /home/mlmonster/Projects/ferdzo/vesselDetection/image.jpg: 320x640 (no detections), 21.0ms\n",
|
||||
"Speed: 20.7ms preprocess, 21.0ms inference, 0.3ms postprocess per image at shape (1, 3, 320, 640)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[162926:162926:0626/203914.442027:ERROR:ui/ozone/platform/x11/ozone_platform_x11.cc:248] Missing X server or $DISPLAY\n",
|
||||
"[162926:162926:0626/203914.442039:ERROR:ui/aura/env.cc:257] The platform failed to initialize. Exiting.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"test_image = \"image.jpg\"\n",
|
||||
"test_image = \"/home/mlmonster/Projects/ferdzo/vesselDetection/test.jpg\"\n",
|
||||
"results = model(test_image)\n",
|
||||
"\n",
|
||||
"results.show()\n",
|
||||
"\n",
|
||||
"results.save()"
|
||||
"for result in results:\n",
|
||||
" boxes = result.boxes\n",
|
||||
" masks = result.masks\n",
|
||||
" keypoints = result.keypoints\n",
|
||||
" probs = result.probs\n",
|
||||
" obb= result.obb\n",
|
||||
" result.show()\n",
|
||||
" result.save()\n",
|
||||
" \n",
|
||||
" "
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user