File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 808808 }
809809 ],
810810 "source": [
811- "from ultralytics import FastSAM \n",
811+ "from ultralytics import YOLO \n",
812812 "import matplotlib.pyplot as plt\n",
813813 "\n",
814814 "# Load the image \n",
872872 "source": [
873873 "element_crops = MakeCropsDetectThem(\n",
874874 " image=img,\n",
875- " model=FastSAM ('FastSAM-x.pt'),\n",
875+ " model=YOLO ('FastSAM-x.pt'),\n",
876876 " model_path=\"yolov8m.pt\",\n",
877877 " segment=True,\n",
878878 " show_crops=True,\n",
882882 " overlap_y=50,\n",
883883 " conf=0.3,\n",
884884 " iou=0.8,\n",
885+ " imgsz=1024,\n",
885886 ")\n",
886- "result = CombineDetections(element_crops, nms_threshold=0.40 )\n",
887+ "result = CombineDetections(element_crops, nms_threshold=0.4 )\n",
887888 "\n",
888889 "print('Basic FastSAM inference:')\n",
889890 "visualize_results_usual_yolo_inference(\n",
890891 " img,\n",
891- " model=FastSAM ('FastSAM-x.pt') ,\n",
892- " imgsz=640 ,\n",
892+ " model=YOLO ('FastSAM-x.pt') ,\n",
893+ " imgsz=1024 ,\n",
893894 " conf=0.3,\n",
894895 " iou=0.8,\n",
895896 " segment=True,\n",
13921393 ],
13931394 "metadata": {
13941395 "kernelspec": {
1395- "display_name": "WORK ",
1396+ "display_name": "patched_yolo_infer ",
13961397 "language": "python",
13971398 "name": "python3"
13981399 },
You can’t perform that action at this time.
0 commit comments