Ultralytics Explorer

커뮤니티 안내 ⚠️

ultralytics>=8.3.12부터 Ultralytics Explorer가 제거되었습니다. Explorer를 사용하려면 pip install ultralytics==8.3.11을 설치하세요. 이와 유사하고 기능이 확장된 데이터셋 탐색 기능은 Ultralytics Platform에서 사용할 수 있습니다.

Ultralytics Explorer dataset visualization GUI

Ultralytics Explorer는 시맨틱 검색, SQL 쿼리, 벡터 유사도 검색 및 자연어 프롬프트를 사용해 CV 데이터셋을 탐색하는 도구입니다. 동일한 기능에 액세스할 수 있는 Python API도 제공합니다.



시청: Ultralytics Explorer API | 시맨틱 검색, SQL 쿼리 및 AI 질문 기능

선택적 종속성 설치#

Explorer는 일부 기능에 외부 라이브러리를 사용합니다. Explorer를 사용하면 이러한 라이브러리가 자동으로 설치됩니다. 이 종속성을 수동으로 설치하려면 다음 명령을 사용합니다:

pip install "ultralytics[explorer]==8.3.11"
팁

Explorer는 임베딩/시맨틱 검색 및 SQL 쿼리를 지원하며, 서버리스 벡터 데이터베이스인 LanceDB를 기반으로 합니다. 기존 인메모리 DB와 달리 성능 저하 없이 디스크에 데이터를 유지하므로 메모리 부족 없이 COCO와 같은 대규모 데이터셋으로 로컬 환경을 확장할 수 있습니다.

Explorer API#

데이터셋을 탐색하기 위한 Python API입니다. GUI Explorer도 이 API를 기반으로 합니다. 이 API를 사용해 탐색용 노트북이나 스크립트를 직접 만들고 데이터셋에서 인사이트를 얻을 수 있습니다.

Explorer API 문서에서 전체 기능과 사용 예시를 확인하세요.

GUI Explorer 사용법#

GUI 데모는 브라우저에서 실행되며, 데이터셋의 임베딩을 생성하고 유사 이미지를 검색하며 SQL 쿼리를 실행하고 의미 검색을 수행할 수 있습니다. 다음 명령으로 실행할 수 있습니다:

yolo explorer
참고

Ask AI 기능은 OpenAI를 사용하므로, GUI를 처음 실행할 때 OpenAI API 키를 설정하라는 메시지가 표시됩니다. 다음과 같이 설정할 수 있습니다 - yolo settings openai_api_key="..."

Ultralytics Explorer OpenAI Integration

자주 묻는 질문#

  • Ultralytics Explorer는 시맨틱 검색, SQL 쿼리, 벡터 유사도 검색 및 자연어를 통해 컴퓨터 비전(CV) 데이터셋을 탐색하는 도구입니다. GUI와 Python API를 모두 제공합니다. LanceDB를 사용해 임베딩을 디스크에 저장하므로 과도한 메모리 사용 없이 대규모 데이터셋으로 확장할 수 있습니다.

    Explorer API에 대해 자세히 알아보세요.

  • Ultralytics Explorer에 필요한 선택적 종속성을 수동으로 설치하려면 다음 pip 명령을 사용할 수 있습니다:

    pip install "ultralytics[explorer]==8.3.11"

    이러한 종속성은 시맨틱 검색과 SQL 쿼리에 필요합니다. 여기에는 데이터베이스 작업을 효율적이고 확장 가능하게 유지하는 LanceDB가 포함되며, COCO와 같은 대규모 데이터셋에서도 사용할 수 있습니다.

  • Ultralytics Explorer의 GUI 버전은 간편하게 사용할 수 있습니다. 필요한 종속성을 설치한 후 다음 명령으로 GUI를 실행할 수 있습니다:

    yolo explorer

    GUI는 데이터셋 임베딩 생성, 유사 이미지 검색, SQL 쿼리 실행 및 시맨틱 검색 수행을 위한 사용자 친화적인 인터페이스를 제공합니다. OpenAI 기반 Ask AI 기능을 사용하면 자연어로 데이터셋에 쿼리할 수도 있습니다.

    저장 공간 및 확장성에 대한 자세한 내용은 설치 안내를 참조하세요.

  • Ultralytics Explorer의 Ask AI 기능을 사용하면 자연어 쿼리로 데이터셋과 상호작용할 수 있습니다. OpenAI를 기반으로 하는 이 기능을 통해 SQL 쿼리나 유사한 명령을 작성하지 않고도 데이터셋에 관해 질문할 수 있습니다. 이 기능을 사용하려면 GUI를 처음 실행할 때 OpenAI API 키를 설정해야 합니다:

    yolo settings openai_api_key="YOUR_API_KEY"

    이 기능과 통합 방법에 대한 자세한 내용은 GUI Explorer 사용법 섹션을 참조하세요.

  • 예. Colab 노트북에서 pip install ultralytics==8.3.11을 사용해 지정된 릴리스를 설치하고 VOC 탐색 예제에 따라 Google 클라우드 리소스에서 임베딩을 생성하고 검색을 실행하세요. 자세한 내용은 Google Colab 가이드를 참조하세요.

댓글13

질문을 하거나 결과를 공유하거나 다른 사람을 도와주세요.

  1. pooya-githubGitHub

    Hi,

    In colab code after running !pip install ultralytics[explorer] and running: from ultralytics import explorer i got the following error:

    ImportError Traceback (most recent call last) in <cell line: 1>() ----> 1 from ultralytics import explorer

    ImportError: cannot import name 'explorer' from 'ultralytics' (/usr/local/lib/python3.10/dist-packages/ultralytics/init.py)

    how can i fix it?

    1. Glenn JocherUltralytics(수정됨)

      @pooya-github the Ultralytics Explorer feature has been removed as of ultralytics>=8.3.12. To access similar or enhanced functionality, we recommend using Ultralytics Platform, our platform for dataset exploration and management. Let me know if you have further questions!

      -2
  2. mkutuGitHub

    how can I set this up with a custom dataset? Could you direct me to any resources. Thanks!

    1. Glenn JocherUltralytics(수정됨)

      @mkutu hello!

      Setting up YOLO26 with a custom dataset can be straightforward! You'd primarily need a data YAML file to describe your dataset structure and then use it in your training command. Here’s a basic guide to get you started:

      1. Prepare your data: Organize your dataset into two folders (images and labels), with corresponding files named identically.

      2. Create a YAML file: This file should specify the paths to your training and validation data, the number of classes, and class names. Here's an example:

        # custom_data.yaml
        train: path/to/train/images
        val: path/to/val/images
        nc: number_of_classes
        names: ['class1', 'class2', 'class3']
      3. Start Training: Use the following command to train your model:

        yolo train data=custom_data.yaml model=yolo26n.yaml

      For exploring and managing your datasets efficiently, you might consider using the Ultralytics Explorer (removed in ultralytics>=8.3.12; use ultralytics==8.3.11 or Ultralytics Platform). This tool offers features like semantic search, SQL queries, and even AI-based querying to derive insights from your data.

      Hope this helps! If you have any more questions, feel free to ask.

      -2
    1. Glenn JocherUltralytics(수정됨)

      Hey there! 🌟

      It sounds like you've got a pretty wide range of experience with various YOLO versions and even RT-DETR! For running AI using YOLO26 specifically, the process is smoothly integrated into the Ultralytics framework, much like the versions you've mentioned.

      To get started, make sure you have Ultralytics YOLO26 installed. If not, you can do so via pip:

      pip install ultralytics

      And then, to run your AI model with YOLO26, you can simply use:

      from ultralytics import YOLO
      
      # Load the model
      model = YOLO('yolo26n.pt')  # Here 'yolo26n.pt' is an example model. Replace it with your model path.
      
      # Run inference
      results = model('path_to_your_image_or_video')

      Or, if you prefer using the command line:

      yolo detect predict model=yolo26n.pt source=path_to_your_image_or_video

      Remember to replace 'yolo26n.pt' and 'path_to_your_image_or_video' with the actual paths to your YOLO26 model and the image or video you want to run inference on. 🚀

      Since you've used various versions before, the process should feel quite familiar. If there's more specific functionality from the Ultralytics Explorer that you're interested in integrating with YOLO26, such as semantic search or SQL queries, the installation command provided in the documentation will be your first step:

      pip install ultralytics[explorer]

      After that, you can launch the Ultralytics Explorer with:

      yolo explorer

      And dive into explore mode (Explorer requires ultralytics==8.3.11, as it was removed in ultralytics>=8.3.12)! For any further details or if you've got a unique use case in mind, feel free to share more specifics. Happy to help further. Happy coding! 🎉

      1
    2. Glenn JocherUltralytics(수정됨)

      Note: Ultralytics Explorer was removed in ultralytics>=8.3.12; to use it, install ultralytics==8.3.11. Similar dataset exploration features are available in Ultralytics Platform.

      @BABAFAREEDDUDEKULA hey there! 😄

      Thanks for reaching out. If you're interested in diving into the Ultralytics Explorer to explore CV datasets with semantic search, SQL queries, vector similarity search, and more, it sounds like you're on the right track!

      To get started, ensure you've got the Explorer installed via:

      pip install ultralytics[explorer]

      Once installed, you can jump straight into using the GUI by typing:

      yolo explorer

      This launches the GUI in your browser, where you can experiment with creating embeddings, conducting image searches, and even using SQL or natural language queries!

      If you encounter any issues or have specific questions as you use the Ultralytics Explorer, feel free to drop them here. Happy exploring! 🌟

  3. AloshkaDGitHub

    The yolo explorer command will open the explorer on the local machine. How would I set it up to work on AWS while I'm connected with my local machine using ssh?

    1. Paula DerrengerUltralytics(수정됨)

      Note: Ultralytics Explorer was removed in ultralytics>=8.3.12; to use it, install ultralytics==8.3.11. Similar dataset exploration features are available in Ultralytics Platform.

      To set up the Ultralytics Explorer to work on an AWS instance while you're connected via SSH from your local machine, you can use port forwarding to access the Explorer's web interface. Here's a concise step-by-step guide:

      1. SSH into AWS with Port Forwarding: Use the -L option to forward a local port to a port on the AWS instance. Replace local_port with a port on your local machine (e.g., 8080), and aws_port with the port the Explorer runs on (usually 5000).

        ssh -i /path/to/your/key.pem -L local_port:localhost:aws_port user @AloshkaD
      2. Run Explorer on AWS: Once connected, start the Explorer on the AWS instance:

        yolo explorer
      3. Access Explorer Locally: Open a web browser on your local machine and navigate to localhost:local_port to access the Explorer interface.

      Remember to replace /path/to/your/key.pem with the path to your AWS key, user with your AWS username, and aws_instance_ip with your AWS instance's IP address. Also, ensure that the AWS security group allows inbound traffic on the aws_port.

      1
    2. Paula DerrengerUltralytics

      @AloshkaD you're welcome! I'm glad to hear that you were able to get it working with your config file. If you have any more questions or need further assistance in the future, don't hesitate to reach out. Happy exploring with Ultralytics Explorer! 🚀😊

      1