Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Path Error #13460

Open
1 task done
Rahulx911 opened this issue Dec 13, 2024 · 2 comments
Open
1 task done

Windows Path Error #13460

Rahulx911 opened this issue Dec 13, 2024 · 2 comments
Labels
dependencies Dependencies and packages detect Object Detection issues, PR's question Further information is requested

Comments

@Rahulx911
Copy link

Search before asking

Question

import platform
import pathlib

if platform.system() != 'Windows':
pathlib.WindowsPath = pathlib.PosixPath

import subprocess
import os
import cv2
import matplotlib.pyplot as plt
import time
from paddleocr import PaddleOCR
import re
from flask import Blueprint, request, jsonify
from werkzeug.utils import secure_filename
from models.database import Box,PackedItem
from app import db
from datetime import datetime
from dotenv import load_dotenv
from pathlib import Path
load_dotenv()

YOLO_WEIGHTS_PATH = r"C:\Users\tanya\OneDrive\Pictures\web_app\backend\models\best.pt"

DETECT=r"C:\Users\tanya\OneDrive\Pictures\web_app\backend\yolov5\detect.py"

DETECT_RUNS=r"C:\Users\tanya\OneDrive\Pictures\web_app\backend\yolov5\runs\detect"

YOLO_WEIGHTS_PATH = "/root/backend/models/best.pt"
DETECT = "/root/backend/yolov5/detect.py"
DETECT_RUNS = "/root/backend/yolov5/runs/detect"

ocr = PaddleOCR(use_angle_cls=True, lang='en', det_db_thresh=0.3, det_db_box_thresh=0.5)

detected_texts = []

Create Blueprint

detect_front_side_blueprint = Blueprint('detect_front_side', name)

def run_yolo_inference(image_path):
"detect_front_side.py" [dos] 249L, 8997B 6,0-1 Top

here i want to use poxix path but internal files of yolov5 are runt able to take this

Additional

No response

@Rahulx911 Rahulx911 added the question Further information is requested label Dec 13, 2024
@UltralyticsAssistant UltralyticsAssistant added dependencies Dependencies and packages detect Object Detection issues, PR's labels Dec 13, 2024
@UltralyticsAssistant
Copy link
Member

👋 Hello @Rahulx911, thank you for your interest in YOLOv5 🚀! We're here to assist you. Based on your issue description, it seems like you are running into a path compatibility issue with YOLOv5 on Windows versus a Linux-like environment, particularly with Posix and Windows paths.

If this is a 🐛 Bug Report, could you please provide a minimum reproducible example (MRE) to help us thoroughly debug the issue? An MRE would include a clear, minimal snippet of code or setup required to reproduce your problem, as well as any relevant error logs or traceback details.

If this is a general ❓ Question or relates to custom integration, please share more details about your current setup, including any modifications you've made to the default YOLOv5 code and the context in which this issue occurs (e.g., environment, hardware, dependencies).

Requirements

Ensure you're running YOLOv5 with Python>=3.8.0 and all required dependencies installed. All Python packages should match those listed in requirements.txt, and you need a compatible version of PyTorch (>=1.8), as well as a correctly configured environment with GPU/CUDA support, if applicable.

Environments

YOLOv5 works in a wide range of environments, including Jupyter Notebooks, Google Colab, Docker, and traditional setups. To isolate the issue, we recommend testing it in a fresh and verified environment to rule out environment-specific issues.

Status

Please check if all YOLOv5 CI tests are currently passing for the latest commit. This ensures the latest repository version is stable.

🚀 This is an automated response, but rest assured that an Ultralytics engineer will review your issue shortly and provide further guidance. A bit more detail from your side will streamline the debugging process! 😊

@Rahulx911
Copy link
Author

Rahulx911 commented Dec 13, 2024

I have checked no changes i made in internal files but still this error @UltralyticsAssistant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Dependencies and packages detect Object Detection issues, PR's question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants