+++ .gitignore
... | ... | @@ -0,0 +1,1 @@ |
1 | +/.streamlit/secrets.toml |
+++ README.md
... | ... | @@ -0,0 +1,1 @@ |
1 | +# RAG-Chat_with_your_files |
+++ app.py
... | ... | @@ -0,0 +1,84 @@ |
1 | +import streamlit as st | |
2 | +from llama_index import VectorStoreIndex, ServiceContext, Document, download_loader | |
3 | +from llama_index.llms import OpenAI | |
4 | +from llama_index.readers import PDFReader | |
5 | +import openai | |
6 | +from llama_index import SimpleDirectoryReader | |
7 | +import tempfile | |
8 | +import shutil | |
9 | +import os | |
10 | + | |
11 | +# import pdfplumber | |
12 | + | |
13 | +def create_vector_embeding_from_pdf(feed): | |
14 | + with tempfile.NamedTemporaryFile(delete=False, suffix='.pdf') as temp_file: | |
15 | + # Write the contents of the uploaded file to the temporary file | |
16 | + shutil.copyfileobj(uploaded_file, temp_file) | |
17 | + temp_file_path = temp_file.name # Get the file path | |
18 | + | |
19 | + PyMuPDFReader = download_loader("PyMuPDFReader") | |
20 | + loader = PyMuPDFReader() | |
21 | + documents = loader.load(temp_file_path, metadata=True) | |
22 | + index = VectorStoreIndex.from_documents(documents) | |
23 | + | |
24 | + os.remove(temp_file_path) | |
25 | + | |
26 | + return documents, index # build more code to return a dataframe | |
27 | + | |
28 | + | |
29 | +st.set_page_config(page_title="Chat with the Streamlit docs, powered by LlamaIndex", page_icon="🦙", layout="centered", | |
30 | + initial_sidebar_state="auto", menu_items=None) | |
31 | +openai.api_key = st.secrets.openai_key | |
32 | +st.title("Chat with the Streamlit docs, powered by LlamaIndex 💬🦙") | |
33 | +st.info( | |
34 | + "Check out the full tutorial to build this app in our [blog post](https://blog.streamlit.io/build-a-chatbot-with-custom-data-sources-powered-by-llamaindex/)", | |
35 | + icon="📃") | |
36 | + | |
37 | [email protected]_resource(show_spinner=False) | |
38 | +def load_data(): | |
39 | + with st.spinner(text="Loading and indexing the Streamlit docs – hang tight! This should take 1-2 minutes."): | |
40 | + reader = SimpleDirectoryReader(input_dir="./data", recursive=True) | |
41 | + docs = reader.load_data() | |
42 | + service_context = ServiceContext.from_defaults( | |
43 | + llm=OpenAI(model="gpt-3.5-turbo", temperature=0.5, | |
44 | + system_prompt="You are an expert on the Streamlit Python library and your job is to answer technical questions." | |
45 | + " Assume that all questions are related to the Streamlit Python library. Keep your answers technical and based on facts – do not hallucinate features.") | |
46 | + ) | |
47 | + index = VectorStoreIndex.from_documents(docs, service_context=service_context) | |
48 | + return index | |
49 | + | |
50 | +streamlit_docs_index = load_data() | |
51 | + | |
52 | +uploaded_file = st.file_uploader('Choose your .pdf file', type="pdf") | |
53 | +if uploaded_file is not None: | |
54 | + documents, pdf_index = create_vector_embeding_from_pdf(uploaded_file) | |
55 | + combined_index = streamlit_docs_index.insert(documents) | |
56 | +else: | |
57 | + combined_index = streamlit_docs_index | |
58 | + | |
59 | +if "messages" not in st.session_state.keys(): # Initialize the chat messages history | |
60 | + st.session_state.messages = [ | |
61 | + {"role": "assistant", "content": "Ask me a question about Streamlit's open-source Python library!"} | |
62 | + ] | |
63 | + | |
64 | +index = load_data() | |
65 | + | |
66 | +if "chat_engine" not in st.session_state.keys(): # Initialize the chat engine | |
67 | + st.session_state.chat_engine = combined_index.as_chat_engine(chat_mode="condense_question", verbose=True) | |
68 | + | |
69 | +if prompt := st.chat_input("Your question"): # Prompt for user input and save to chat history | |
70 | + st.session_state.messages.append({"role": "user", "content": prompt}) | |
71 | + | |
72 | +for message in st.session_state.messages: # Display the prior chat messages | |
73 | + with st.chat_message(message["role"]): | |
74 | + st.write(message["content"]) | |
75 | + | |
76 | + | |
77 | +# If last message is not from assistant, generate a new response | |
78 | +if st.session_state.messages[-1]["role"] != "assistant": | |
79 | + with st.chat_message("assistant"): | |
80 | + with st.spinner("Thinking..."): | |
81 | + response = st.session_state.chat_engine.chat(prompt) | |
82 | + st.write(response.response) | |
83 | + message = {"role": "assistant", "content": response.response} | |
84 | + st.session_state.messages.append(message) # Add response to message history(파일 끝에 줄바꿈 문자 없음) |
+++ data/README.md
... | ... | @@ -0,0 +1,294 @@ |
1 | +<div align="center"> | |
2 | + <p> | |
3 | + <a href="https://yolovision.ultralytics.com/" target="_blank"> | |
4 | + <img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/im/banner-yolo-vision-2023.png" alt="YOLO Vision banner"></a> | |
5 | + </p> | |
6 | + | |
7 | +[中文](https://docs.ultralytics.com/zh/) | [한국어](https://docs.ultralytics.com/ko/) | [日本語](https://docs.ultralytics.com/ja/) | [Русский](https://docs.ultralytics.com/ru/) | [Deutsch](https://docs.ultralytics.com/de/) | [Français](https://docs.ultralytics.com/fr/) | [Español](https://docs.ultralytics.com/es/) | [Português](https://docs.ultralytics.com/pt/) | [हिन्दी](https://docs.ultralytics.com/hi/) | [العربية](https://docs.ultralytics.com/ar/) <br> | |
8 | + | |
9 | +<div> | |
10 | + <a href="https://github.com/ultralytics/ultralytics/actions/workflows/ci.yaml"><img src="https://github.com/ultralytics/ultralytics/actions/workflows/ci.yaml/badge.svg" alt="Ultralytics CI"></a> | |
11 | + <a href="https://codecov.io/github/ultralytics/ultralytics"><img src="https://codecov.io/github/ultralytics/ultralytics/branch/main/graph/badge.svg?token=HHW7IIVFVY" alt="Ultralytics Code Coverage"></a> | |
12 | + <a href="https://zenodo.org/badge/latestdoi/264818686"><img src="https://zenodo.org/badge/264818686.svg" alt="YOLOv8 Citation"></a> | |
13 | + <a href="https://hub.docker.com/r/ultralytics/ultralytics"><img src="https://img.shields.io/docker/pulls/ultralytics/ultralytics?logo=docker" alt="Docker Pulls"></a> | |
14 | + <a href="https://ultralytics.com/discord"><img alt="Discord" src="https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue"></a> | |
15 | + <br> | |
16 | + <a href="https://console.paperspace.com/github/ultralytics/ultralytics"><img src="https://assets.paperspace.io/img/gradient-badge.svg" alt="Run on Gradient"></a> | |
17 | + <a href="https://colab.research.google.com/github/ultralytics/ultralytics/blob/main/examples/tutorial.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | |
18 | + <a href="https://www.kaggle.com/ultralytics/yolov8"><img src="https://kaggle.com/static/images/open-in-kaggle.svg" alt="Open In Kaggle"></a> | |
19 | +</div> | |
20 | +<br> | |
21 | + | |
22 | +[Ultralytics](https://ultralytics.com) [YOLOv8](https://github.com/ultralytics/ultralytics) is a cutting-edge, state-of-the-art (SOTA) model that builds upon the success of previous YOLO versions and introduces new features and improvements to further boost performance and flexibility. YOLOv8 is designed to be fast, accurate, and easy to use, making it an excellent choice for a wide range of object detection and tracking, instance segmentation, image classification and pose estimation tasks. | |
23 | + | |
24 | +We hope that the resources here will help you get the most out of YOLOv8. Please browse the YOLOv8 <a href="https://docs.ultralytics.com/">Docs</a> for details, raise an issue on <a href="https://github.com/ultralytics/ultralytics/issues/new/choose">GitHub</a> for support, and join our <a href="https://ultralytics.com/discord">Discord</a> community for questions and discussions! | |
25 | + | |
26 | +To request an Enterprise License please complete the form at [Ultralytics Licensing](https://ultralytics.com/license). | |
27 | + | |
28 | +<img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/yolov8/yolo-comparison-plots.png" alt="YOLOv8 performance plots"></a> | |
29 | + | |
30 | +<div align="center"> | |
31 | + <a href="https://github.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-github.png" width="2%" alt="Ultralytics GitHub"></a> | |
32 | + <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%" alt="space"> | |
33 | + <a href="https://www.linkedin.com/company/ultralytics/"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-linkedin.png" width="2%" alt="Ultralytics LinkedIn"></a> | |
34 | + <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%" alt="space"> | |
35 | + <a href="https://twitter.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-twitter.png" width="2%" alt="Ultralytics Twitter"></a> | |
36 | + <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%" alt="space"> | |
37 | + <a href="https://youtube.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-youtube.png" width="2%" alt="Ultralytics YouTube"></a> | |
38 | + <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%" alt="space"> | |
39 | + <a href="https://www.tiktok.com/@ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-tiktok.png" width="2%" alt="Ultralytics TikTok"></a> | |
40 | + <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%" alt="space"> | |
41 | + <a href="https://www.instagram.com/ultralytics/"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-instagram.png" width="2%" alt="Ultralytics Instagram"></a> | |
42 | + <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%" alt="space"> | |
43 | + <a href="https://ultralytics.com/discord"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-discord.png" width="2%" alt="Ultralytics Discord"></a> | |
44 | +</div> | |
45 | +</div> | |
46 | + | |
47 | +## <div align="center">Documentation</div> | |
48 | + | |
49 | +See below for a quickstart installation and usage example, and see the [YOLOv8 Docs](https://docs.ultralytics.com) for full documentation on training, validation, prediction and deployment. | |
50 | + | |
51 | +<details open> | |
52 | +<summary>Install</summary> | |
53 | + | |
54 | +Pip install the ultralytics package including all [requirements](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) in a [**Python>=3.8**](https://www.python.org/) environment with [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/). | |
55 | + | |
56 | +[![PyPI version](https://badge.fury.io/py/ultralytics.svg)](https://badge.fury.io/py/ultralytics) [![Downloads](https://static.pepy.tech/badge/ultralytics)](https://pepy.tech/project/ultralytics) | |
57 | + | |
58 | +```bash | |
59 | +pip install ultralytics | |
60 | +``` | |
61 | + | |
62 | +For alternative installation methods including [Conda](https://anaconda.org/conda-forge/ultralytics), [Docker](https://hub.docker.com/r/ultralytics/ultralytics), and Git, please refer to the [Quickstart Guide](https://docs.ultralytics.com/quickstart). | |
63 | + | |
64 | +</details> | |
65 | + | |
66 | +<details open> | |
67 | +<summary>Usage</summary> | |
68 | + | |
69 | +### CLI | |
70 | + | |
71 | +YOLOv8 may be used directly in the Command Line Interface (CLI) with a `yolo` command: | |
72 | + | |
73 | +```bash | |
74 | +yolo predict model=yolov8n.pt source='https://ultralytics.com/images/bus.jpg' | |
75 | +``` | |
76 | + | |
77 | +`yolo` can be used for a variety of tasks and modes and accepts additional arguments, i.e. `imgsz=640`. See the YOLOv8 [CLI Docs](https://docs.ultralytics.com/usage/cli) for examples. | |
78 | + | |
79 | +### Python | |
80 | + | |
81 | +YOLOv8 may also be used directly in a Python environment, and accepts the same [arguments](https://docs.ultralytics.com/usage/cfg/) as in the CLI example above: | |
82 | + | |
83 | +```python | |
84 | +from ultralytics import YOLO | |
85 | + | |
86 | +# Load a model | |
87 | +model = YOLO("yolov8n.yaml") # build a new model from scratch | |
88 | +model = YOLO("yolov8n.pt") # load a pretrained model (recommended for training) | |
89 | + | |
90 | +# Use the model | |
91 | +model.train(data="coco128.yaml", epochs=3) # train the model | |
92 | +metrics = model.val() # evaluate model performance on the validation set | |
93 | +results = model("https://ultralytics.com/images/bus.jpg") # predict on an image | |
94 | +path = model.export(format="onnx") # export the model to ONNX format | |
95 | +``` | |
96 | + | |
97 | +See YOLOv8 [Python Docs](https://docs.ultralytics.com/usage/python) for more examples. | |
98 | + | |
99 | +</details> | |
100 | + | |
101 | +### Notebooks | |
102 | + | |
103 | +Ultralytics provides interactive notebooks for YOLOv8, covering training, validation, tracking, and more. Each notebook is paired with a [YouTube](https://youtube.com/ultralytics) tutorial, making it easy to learn and implement advanced YOLOv8 features. | |
104 | + | |
105 | +| Docs | Notebook | YouTube | | |
106 | +| --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | |
107 | +| <a href="https://docs.ultralytics.com/modes/">YOLOv8 Train, Val, Predict and Export Modes</a> | <a href="https://colab.research.google.com/github/ultralytics/ultralytics/blob/main/examples/tutorial.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | <a href="https://youtu.be/j8uQc0qB91s"><center><img width=30% src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-youtube-rect.png" alt="Ultralytics Youtube Video"></center></a> | | |
108 | +| <a href="https://docs.ultralytics.com/hub/quickstart/">Ultralytics HUB QuickStart</a> | <a href="https://colab.research.google.com/github/ultralytics/ultralytics/blob/main/examples/hub.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | <a href="https://youtu.be/lveF9iCMIzc"><center><img width=30% src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-youtube-rect.png" alt="Ultralytics Youtube Video"></center></a> | | |
109 | +| <a href="https://docs.ultralytics.com/modes/track/">YOLOv8 Multi-Object Tracking in Videos</a> | <a href="https://colab.research.google.com/github/ultralytics/ultralytics/blob/main/examples/object_tracking.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | <a href="https://youtu.be/hHyHmOtmEgs"><center><img width=30% src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-youtube-rect.png" alt="Ultralytics Youtube Video"></center></a> | | |
110 | +| <a href="https://docs.ultralytics.com/guides/object-counting/">YOLOv8 Object Counting in Videos</a> | <a href="https://colab.research.google.com/github/ultralytics/ultralytics/blob/main/examples/object_counting.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | <a href="https://youtu.be/Ag2e-5_NpS0"><center><img width=30% src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-youtube-rect.png" alt="Ultralytics Youtube Video"></center></a> | | |
111 | +| <a href="https://docs.ultralytics.com/guides/heatmaps/">YOLOv8 Heatmaps in Videos</a> | <a href="https://colab.research.google.com/github/ultralytics/ultralytics/blob/main/examples/heatmaps.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> | <a href="https://youtu.be/4ezde5-nZZw"><center><img width=30% src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-youtube-rect.png" alt="Ultralytics Youtube Video"></center></a> | | |
112 | + | |
113 | +## <div align="center">Models</div> | |
114 | + | |
115 | +YOLOv8 [Detect](https://docs.ultralytics.com/tasks/detect), [Segment](https://docs.ultralytics.com/tasks/segment) and [Pose](https://docs.ultralytics.com/tasks/pose) models pretrained on the [COCO](https://docs.ultralytics.com/datasets/detect/coco) dataset are available here, as well as YOLOv8 [Classify](https://docs.ultralytics.com/tasks/classify) models pretrained on the [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet) dataset. [Track](https://docs.ultralytics.com/modes/track) mode is available for all Detect, Segment and Pose models. | |
116 | + | |
117 | +<img width="1024" src="https://raw.githubusercontent.com/ultralytics/assets/main/im/banner-tasks.png" alt="Ultralytics YOLO supported tasks"> | |
118 | + | |
119 | +All [Models](https://github.com/ultralytics/ultralytics/tree/main/ultralytics/cfg/models) download automatically from the latest Ultralytics [release](https://github.com/ultralytics/assets/releases) on first use. | |
120 | + | |
121 | +<details open><summary>Detection (COCO)</summary> | |
122 | + | |
123 | +See [Detection Docs](https://docs.ultralytics.com/tasks/detect/) for usage examples with these models trained on [COCO](https://docs.ultralytics.com/datasets/detect/coco/), which include 80 pre-trained classes. | |
124 | + | |
125 | +| Model | size<br><sup>(pixels) | mAP<sup>val<br>50-95 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(B) | | |
126 | +| ------------------------------------------------------------------------------------ | --------------------- | -------------------- | ------------------------------ | ----------------------------------- | ------------------ | ----------------- | | |
127 | +| [YOLOv8n](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt) | 640 | 37.3 | 80.4 | 0.99 | 3.2 | 8.7 | | |
128 | +| [YOLOv8s](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8s.pt) | 640 | 44.9 | 128.4 | 1.20 | 11.2 | 28.6 | | |
129 | +| [YOLOv8m](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8m.pt) | 640 | 50.2 | 234.7 | 1.83 | 25.9 | 78.9 | | |
130 | +| [YOLOv8l](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l.pt) | 640 | 52.9 | 375.2 | 2.39 | 43.7 | 165.2 | | |
131 | +| [YOLOv8x](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x.pt) | 640 | 53.9 | 479.1 | 3.53 | 68.2 | 257.8 | | |
132 | + | |
133 | +- **mAP<sup>val</sup>** values are for single-model single-scale on [COCO val2017](http://cocodataset.org) dataset. <br>Reproduce by `yolo val detect data=coco.yaml device=0` | |
134 | +- **Speed** averaged over COCO val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance. <br>Reproduce by `yolo val detect data=coco.yaml batch=1 device=0|cpu` | |
135 | + | |
136 | +</details> | |
137 | + | |
138 | +<details><summary>Detection (Open Image V7)</summary> | |
139 | + | |
140 | +See [Detection Docs](https://docs.ultralytics.com/tasks/detect/) for usage examples with these models trained on [Open Image V7](https://docs.ultralytics.com/datasets/detect/open-images-v7/), which include 600 pre-trained classes. | |
141 | + | |
142 | +| Model | size<br><sup>(pixels) | mAP<sup>val<br>50-95 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(B) | | |
143 | +| ----------------------------------------------------------------------------------------- | --------------------- | -------------------- | ------------------------------ | ----------------------------------- | ------------------ | ----------------- | | |
144 | +| [YOLOv8n](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n-oiv7.pt) | 640 | 18.4 | 142.4 | 1.21 | 3.5 | 10.5 | | |
145 | +| [YOLOv8s](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8s-oiv7.pt) | 640 | 27.7 | 183.1 | 1.40 | 11.4 | 29.7 | | |
146 | +| [YOLOv8m](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8m-oiv7.pt) | 640 | 33.6 | 408.5 | 2.26 | 26.2 | 80.6 | | |
147 | +| [YOLOv8l](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l-oiv7.pt) | 640 | 34.9 | 596.9 | 2.43 | 44.1 | 167.4 | | |
148 | +| [YOLOv8x](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x-oiv7.pt) | 640 | 36.3 | 860.6 | 3.56 | 68.7 | 260.6 | | |
149 | + | |
150 | +- **mAP<sup>val</sup>** values are for single-model single-scale on [Open Image V7](https://docs.ultralytics.com/datasets/detect/open-images-v7/) dataset. <br>Reproduce by `yolo val detect data=open-images-v7.yaml device=0` | |
151 | +- **Speed** averaged over Open Image V7 val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance. <br>Reproduce by `yolo val detect data=open-images-v7.yaml batch=1 device=0|cpu` | |
152 | + | |
153 | +</details> | |
154 | + | |
155 | +<details><summary>Segmentation (COCO)</summary> | |
156 | + | |
157 | +See [Segmentation Docs](https://docs.ultralytics.com/tasks/segment/) for usage examples with these models trained on [COCO-Seg](https://docs.ultralytics.com/datasets/segment/coco/), which include 80 pre-trained classes. | |
158 | + | |
159 | +| Model | size<br><sup>(pixels) | mAP<sup>box<br>50-95 | mAP<sup>mask<br>50-95 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(B) | | |
160 | +| -------------------------------------------------------------------------------------------- | --------------------- | -------------------- | --------------------- | ------------------------------ | ----------------------------------- | ------------------ | ----------------- | | |
161 | +| [YOLOv8n-seg](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n-seg.pt) | 640 | 36.7 | 30.5 | 96.1 | 1.21 | 3.4 | 12.6 | | |
162 | +| [YOLOv8s-seg](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8s-seg.pt) | 640 | 44.6 | 36.8 | 155.7 | 1.47 | 11.8 | 42.6 | | |
163 | +| [YOLOv8m-seg](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8m-seg.pt) | 640 | 49.9 | 40.8 | 317.0 | 2.18 | 27.3 | 110.2 | | |
164 | +| [YOLOv8l-seg](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l-seg.pt) | 640 | 52.3 | 42.6 | 572.4 | 2.79 | 46.0 | 220.5 | | |
165 | +| [YOLOv8x-seg](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x-seg.pt) | 640 | 53.4 | 43.4 | 712.1 | 4.02 | 71.8 | 344.1 | | |
166 | + | |
167 | +- **mAP<sup>val</sup>** values are for single-model single-scale on [COCO val2017](http://cocodataset.org) dataset. <br>Reproduce by `yolo val segment data=coco-seg.yaml device=0` | |
168 | +- **Speed** averaged over COCO val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance. <br>Reproduce by `yolo val segment data=coco-seg.yaml batch=1 device=0|cpu` | |
169 | + | |
170 | +</details> | |
171 | + | |
172 | +<details><summary>Pose (COCO)</summary> | |
173 | + | |
174 | +See [Pose Docs](https://docs.ultralytics.com/tasks/pose/) for usage examples with these models trained on [COCO-Pose](https://docs.ultralytics.com/datasets/pose/coco/), which include 1 pre-trained class, person. | |
175 | + | |
176 | +| Model | size<br><sup>(pixels) | mAP<sup>pose<br>50-95 | mAP<sup>pose<br>50 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(B) | | |
177 | +| ---------------------------------------------------------------------------------------------------- | --------------------- | --------------------- | ------------------ | ------------------------------ | ----------------------------------- | ------------------ | ----------------- | | |
178 | +| [YOLOv8n-pose](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n-pose.pt) | 640 | 50.4 | 80.1 | 131.8 | 1.18 | 3.3 | 9.2 | | |
179 | +| [YOLOv8s-pose](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8s-pose.pt) | 640 | 60.0 | 86.2 | 233.2 | 1.42 | 11.6 | 30.2 | | |
180 | +| [YOLOv8m-pose](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8m-pose.pt) | 640 | 65.0 | 88.8 | 456.3 | 2.00 | 26.4 | 81.0 | | |
181 | +| [YOLOv8l-pose](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l-pose.pt) | 640 | 67.6 | 90.0 | 784.5 | 2.59 | 44.4 | 168.6 | | |
182 | +| [YOLOv8x-pose](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x-pose.pt) | 640 | 69.2 | 90.2 | 1607.1 | 3.73 | 69.4 | 263.2 | | |
183 | +| [YOLOv8x-pose-p6](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x-pose-p6.pt) | 1280 | 71.6 | 91.2 | 4088.7 | 10.04 | 99.1 | 1066.4 | | |
184 | + | |
185 | +- **mAP<sup>val</sup>** values are for single-model single-scale on [COCO Keypoints val2017](http://cocodataset.org) dataset. <br>Reproduce by `yolo val pose data=coco-pose.yaml device=0` | |
186 | +- **Speed** averaged over COCO val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance. <br>Reproduce by `yolo val pose data=coco-pose.yaml batch=1 device=0|cpu` | |
187 | + | |
188 | +</details> | |
189 | + | |
190 | +<details><summary>OBB (DOTAv1)</summary> | |
191 | + | |
192 | +See [OBB Docs](https://docs.ultralytics.com/tasks/obb/) for usage examples with these models trained on [DOTAv1](https://docs.ultralytics.com/datasets/obb/dota-v2/#dota-v10/), which include 15 pre-trained classes. | |
193 | + | |
194 | +| Model | size<br><sup>(pixels) | mAP<sup>test<br>50 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(B) | | |
195 | +| -------------------------------------------------------------------------------------------- | --------------------- | ------------------ | ------------------------------ | ----------------------------------- | ------------------ | ----------------- | | |
196 | +| [YOLOv8n-obb](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n-obb.pt) | 1024 | 76.9 | 204.77 | 3.57 | 3.1 | 23.3 | | |
197 | +| [YOLOv8s-obb](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8s-obb.pt) | 1024 | 78.0 | 424.88 | 4.07 | 11.4 | 76.3 | | |
198 | +| [YOLOv8m-obb](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8m-obb.pt) | 1024 | 80.5 | 763.48 | 7.61 | 26.4 | 208.6 | | |
199 | +| [YOLOv8l-obb](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l-obb.pt) | 1024 | 80.7 | 1278.42 | 11.83 | 44.5 | 433.8 | | |
200 | +| [YOLOv8x-obb](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x-obb.pt) | 1024 | 81.36 | 1759.10 | 13.23 | 69.5 | 676.7 | | |
201 | + | |
202 | +- **mAP<sup>test</sup>** values are for single-model multi-scale on [DOTAv1](https://captain-whu.github.io/DOTA/index.html) dataset. <br>Reproduce by `yolo val obb data=DOTAv1.yaml device=0 split=test` and submit merged results to [DOTA evaluation](https://captain-whu.github.io/DOTA/evaluation.html). | |
203 | +- **Speed** averaged over DOTAv1 val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance. <br>Reproduce by `yolo val obb data=DOTAv1.yaml batch=1 device=0|cpu` | |
204 | + | |
205 | +</details> | |
206 | + | |
207 | +<details><summary>Classification (ImageNet)</summary> | |
208 | + | |
209 | +See [Classification Docs](https://docs.ultralytics.com/tasks/classify/) for usage examples with these models trained on [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet/), which include 1000 pretrained classes. | |
210 | + | |
211 | +| Model | size<br><sup>(pixels) | acc<br><sup>top1 | acc<br><sup>top5 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(B) at 640 | | |
212 | +| -------------------------------------------------------------------------------------------- | --------------------- | ---------------- | ---------------- | ------------------------------ | ----------------------------------- | ------------------ | ------------------------ | | |
213 | +| [YOLOv8n-cls](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n-cls.pt) | 224 | 69.0 | 88.3 | 12.9 | 0.31 | 2.7 | 4.3 | | |
214 | +| [YOLOv8s-cls](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8s-cls.pt) | 224 | 73.8 | 91.7 | 23.4 | 0.35 | 6.4 | 13.5 | | |
215 | +| [YOLOv8m-cls](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8m-cls.pt) | 224 | 76.8 | 93.5 | 85.4 | 0.62 | 17.0 | 42.7 | | |
216 | +| [YOLOv8l-cls](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l-cls.pt) | 224 | 76.8 | 93.5 | 163.0 | 0.87 | 37.5 | 99.7 | | |
217 | +| [YOLOv8x-cls](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x-cls.pt) | 224 | 79.0 | 94.6 | 232.0 | 1.01 | 57.4 | 154.8 | | |
218 | + | |
219 | +- **acc** values are model accuracies on the [ImageNet](https://www.image-net.org/) dataset validation set. <br>Reproduce by `yolo val classify data=path/to/ImageNet device=0` | |
220 | +- **Speed** averaged over ImageNet val images using an [Amazon EC2 P4d](https://aws.amazon.com/ec2/instance-types/p4/) instance. <br>Reproduce by `yolo val classify data=path/to/ImageNet batch=1 device=0|cpu` | |
221 | + | |
222 | +</details> | |
223 | + | |
224 | +## <div align="center">Integrations</div> | |
225 | + | |
226 | +Our key integrations with leading AI platforms extend the functionality of Ultralytics' offerings, enhancing tasks like dataset labeling, training, visualization, and model management. Discover how Ultralytics, in collaboration with [Roboflow](https://roboflow.com/?ref=ultralytics), ClearML, [Comet](https://bit.ly/yolov8-readme-comet), Neural Magic and [OpenVINO](https://docs.ultralytics.com/integrations/openvino), can optimize your AI workflow. | |
227 | + | |
228 | +<br> | |
229 | +<a href="https://bit.ly/ultralytics_hub" target="_blank"> | |
230 | +<img width="100%" src="https://github.com/ultralytics/assets/raw/main/yolov8/banner-integrations.png" alt="Ultralytics active learning integrations"></a> | |
231 | +<br> | |
232 | +<br> | |
233 | + | |
234 | +<div align="center"> | |
235 | + <a href="https://roboflow.com/?ref=ultralytics"> | |
236 | + <img src="https://github.com/ultralytics/assets/raw/main/partners/logo-roboflow.png" width="10%" alt="Roboflow logo"></a> | |
237 | + <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="15%" height="0" alt="space"> | |
238 | + <a href="https://cutt.ly/yolov5-readme-clearml"> | |
239 | + <img src="https://github.com/ultralytics/assets/raw/main/partners/logo-clearml.png" width="10%" alt="ClearML logo"></a> | |
240 | + <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="15%" height="0" alt="space"> | |
241 | + <a href="https://bit.ly/yolov8-readme-comet"> | |
242 | + <img src="https://github.com/ultralytics/assets/raw/main/partners/logo-comet.png" width="10%" alt="Comet ML logo"></a> | |
243 | + <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="15%" height="0" alt="space"> | |
244 | + <a href="https://bit.ly/yolov5-neuralmagic"> | |
245 | + <img src="https://github.com/ultralytics/assets/raw/main/partners/logo-neuralmagic.png" width="10%" alt="NeuralMagic logo"></a> | |
246 | +</div> | |
247 | + | |
248 | +| Roboflow | ClearML ⭐ NEW | Comet ⭐ NEW | Neural Magic ⭐ NEW | | |
249 | +| :--------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------: | | |
250 | +| Label and export your custom datasets directly to YOLOv8 for training with [Roboflow](https://roboflow.com/?ref=ultralytics) | Automatically track, visualize and even remotely train YOLOv8 using [ClearML](https://cutt.ly/yolov5-readme-clearml) (open-source!) | Free forever, [Comet](https://bit.ly/yolov8-readme-comet) lets you save YOLOv8 models, resume training, and interactively visualize and debug predictions | Run YOLOv8 inference up to 6x faster with [Neural Magic DeepSparse](https://bit.ly/yolov5-neuralmagic) | | |
251 | + | |
252 | +## <div align="center">Ultralytics HUB</div> | |
253 | + | |
254 | +Experience seamless AI with [Ultralytics HUB](https://bit.ly/ultralytics_hub) ⭐, the all-in-one solution for data visualization, YOLOv5 and YOLOv8 model training and deployment, without any coding. Transform images into actionable insights and bring your AI visions to life with ease using our cutting-edge platform and user-friendly [Ultralytics App](https://ultralytics.com/app_install). Start your journey for **Free** now! | |
255 | + | |
256 | +<a href="https://bit.ly/ultralytics_hub" target="_blank"> | |
257 | +<img width="100%" src="https://github.com/ultralytics/assets/raw/main/im/ultralytics-hub.png" alt="Ultralytics HUB preview image"></a> | |
258 | + | |
259 | +## <div align="center">Contribute</div> | |
260 | + | |
261 | +We love your input! YOLOv5 and YOLOv8 would not be possible without help from our community. Please see our [Contributing Guide](https://docs.ultralytics.com/help/contributing) to get started, and fill out our [Survey](https://ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey) to send us feedback on your experience. Thank you to all our contributors! | |
262 | + | |
263 | +<!-- SVG image from https://opencollective.com/ultralytics/contributors.svg?width=990 --> | |
264 | + | |
265 | +<a href="https://github.com/ultralytics/yolov5/graphs/contributors"> | |
266 | +<img width="100%" src="https://github.com/ultralytics/assets/raw/main/im/image-contributors.png" alt="Ultralytics open-source contributors"></a> | |
267 | + | |
268 | +## <div align="center">License</div> | |
269 | + | |
270 | +Ultralytics offers two licensing options to accommodate diverse use cases: | |
271 | + | |
272 | +- **AGPL-3.0 License**: This [OSI-approved](https://opensource.org/licenses/) open-source license is ideal for students and enthusiasts, promoting open collaboration and knowledge sharing. See the [LICENSE](https://github.com/ultralytics/ultralytics/blob/main/LICENSE) file for more details. | |
273 | +- **Enterprise License**: Designed for commercial use, this license permits seamless integration of Ultralytics software and AI models into commercial goods and services, bypassing the open-source requirements of AGPL-3.0. If your scenario involves embedding our solutions into a commercial offering, reach out through [Ultralytics Licensing](https://ultralytics.com/license). | |
274 | + | |
275 | +## <div align="center">Contact</div> | |
276 | + | |
277 | +For Ultralytics bug reports and feature requests please visit [GitHub Issues](https://github.com/ultralytics/ultralytics/issues), and join our [Discord](https://ultralytics.com/discord) community for questions and discussions! | |
278 | + | |
279 | +<br> | |
280 | +<div align="center"> | |
281 | + <a href="https://github.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-github.png" width="3%" alt="Ultralytics GitHub"></a> | |
282 | + <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space"> | |
283 | + <a href="https://www.linkedin.com/company/ultralytics/"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-linkedin.png" width="3%" alt="Ultralytics LinkedIn"></a> | |
284 | + <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space"> | |
285 | + <a href="https://twitter.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-twitter.png" width="3%" alt="Ultralytics Twitter"></a> | |
286 | + <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space"> | |
287 | + <a href="https://youtube.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-youtube.png" width="3%" alt="Ultralytics YouTube"></a> | |
288 | + <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space"> | |
289 | + <a href="https://www.tiktok.com/@ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-tiktok.png" width="3%" alt="Ultralytics TikTok"></a> | |
290 | + <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space"> | |
291 | + <a href="https://www.instagram.com/ultralytics/"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-instagram.png" width="3%" alt="Ultralytics Instagram"></a> | |
292 | + <img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space"> | |
293 | + <a href="https://ultralytics.com/discord"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-discord.png" width="3%" alt="Ultralytics Discord"></a> | |
294 | +</div> |
+++ rag.py
... | ... | @@ -0,0 +1,12 @@ |
1 | +import pdfplumber | |
2 | + | |
3 | +def extract_data(feed): | |
4 | + data = [] | |
5 | + with pdfplumber.load(feed) as pdf: | |
6 | + pages = pdf.pages | |
7 | + for p in pages: | |
8 | + data.append(p.extract_tables()) | |
9 | + return None # build more code to return a dataframe | |
10 | + | |
11 | +if __name__ : "__main__": | |
12 | + extract_data()(파일 끝에 줄바꿈 문자 없음) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?