์ฝ˜ํ…์ธ ๋กœ ๊ฑด๋„ˆ๋›ฐ๊ธฐ

Ultralytics HUB-SDK ํ”„๋กœ์ ํŠธ ๊ด€๋ฆฌ ์šด์˜

Ultralytics HUB-SDK ๋ฌธ์„œ์— ์˜ค์‹  ๊ฒƒ์„ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค! ์—ฌ๊ธฐ์„œ๋Š” HUB-SDK๋ฅผ ์‚ฌ์šฉํ•ด ๋จธ์‹  ๋Ÿฌ๋‹ ํ”„๋กœ์ ํŠธ๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ๋ฐ ํ•„์š”ํ•œ ํ•„์ˆ˜ ์‚ฌํ•ญ์„ ์•ˆ๋‚ดํ•ด ๋“œ๋ฆฝ๋‹ˆ๋‹ค. ์ƒˆ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ, ๊ธฐ์กด ํ”„๋กœ์ ํŠธ ์—…๋ฐ์ดํŠธ๋ถ€ํ„ฐ ํ”„๋กœ์ ํŠธ ๋ชฉ๋ก ํƒ์ƒ‰๊นŒ์ง€, ๋”ฐ๋ผ ํ•˜๊ธฐ ์‰ฌ์šด Python ์ฝ”๋“œ ์Šค๋‹ˆํŽซ์„ ํ†ตํ•ด ๋ชจ๋“  ๊ฒƒ์„ ๋‹ค๋ฃน๋‹ˆ๋‹ค. ์ €ํฌ์˜ ๋ชฉํ‘œ๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ์›ํ™œํ•˜๊ณ  ๊ฐ„ํŽธํ•˜๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•˜์—ฌ ๋›ฐ์–ด๋‚œ ๋จธ์‹  ๋Ÿฌ๋‹ ๋ชจ๋ธ์„ ๊ตฌ์ถ•ํ•˜๊ณ  ๋ฐฐํฌํ•˜๋Š” ์ค‘์š”ํ•œ ์ผ์— ์ง‘์ค‘ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์ง€๊ธˆ ๋ฐ”๋กœ ์‹œ์ž‘ํ•˜์„ธ์š”!

ID๋กœ ํ”„๋กœ์ ํŠธ ๊ฐ€์ ธ์˜ค๊ธฐ

Ultralytics ํ”Œ๋žซํผ์—์„œ ์ด๋ฏธ ํ˜ธ์ŠคํŒ…๋œ ํ”„๋กœ์ ํŠธ๊ฐ€ ์žˆ๋Š” ๊ฒฝ์šฐ ์„ธ๋ถ€ ์ •๋ณด๋ฅผ ํ™•์ธํ•˜๊ฑฐ๋‚˜ ๋ณ€๊ฒฝํ•˜๊ธฐ ์œ„ํ•ด ํ”„๋กœ์ ํŠธ๋ฅผ ๊ฒ€์ƒ‰ํ•˜๊ณ  ์‹ถ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ”„๋กœ์ ํŠธ์˜ ๊ณ ์œ  ID๋กœ ํ”„๋กœ์ ํŠธ๋ฅผ ๊ฐ€์ ธ์˜ค๋ ค๋ฉด ํ•ด๋‹น ID๋ฅผ client.project ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜๋Š” ํ”„๋กœ์ ํŠธ์˜ ๋ฐ์ดํ„ฐ๋ฅผ ๋น ๋ฅด๊ฒŒ ์‚ดํŽด๋ณผ ์ˆ˜ ์žˆ๋Š” ์Šค๋‹ˆํŽซ์ž…๋‹ˆ๋‹ค:

from hub_sdk import HUBClient

credentials = {"api_key": "<YOUR-API-KEY>"}  # api key
client = HUBClient(credentials)

project = client.project("<Project ID>")  # Replace '<Project ID>' with your actual project ID
print(project.data)

์ƒˆ ํ”„๋กœ์ ํŠธ ๋งŒ๋“ค๊ธฐ

์ƒˆ๋กœ์šด ML ํ”„๋กœ์ ํŠธ๋ฅผ ์‹œ์ž‘ํ•˜๊ณ  ๊ณ„์‹ ๊ฐ€์š”? ํ™˜์ƒ์ ์ž…๋‹ˆ๋‹ค! ๋‹ค์Œ Python ์ฝ”๋“œ๋Š” Ultralytics ์—์„œ ์ƒˆ ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๋‹จ๊ณ„๋ฅผ ๊ฐ„๋žตํ•˜๊ฒŒ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค. ํ•„์š”ํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ๊ฐ€์ ธ์˜ค๊ณ , ํ”„๋กœ์ ํŠธ ์„ธ๋ถ€ ์ •๋ณด(์ด ๊ฒฝ์šฐ ์ด๋ฆ„)๋ฅผ ์ •์˜ํ•œ ๋‹ค์Œ ๋งˆ์ง€๋ง‰์œผ๋กœ create_project ๋ฉ”์„œ๋“œ๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋ฐฉ๋ฒ•์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค:

from hub_sdk import HUBClient

credentials = {"api_key": "<YOUR-API-KEY>"}  # api key
client = HUBClient(credentials)

data = {"meta": {"name": "my project"}}  # Name your project
project = client.project()  # Initialize a project instance
project.create_project(data)  # Create your new project with the specified data

๊ธฐ์กด ํ”„๋กœ์ ํŠธ ์—…๋ฐ์ดํŠธ

ํ”„๋กœ์ ํŠธ ID์™€ ํฌํ•จํ•  ์ƒˆ ์„ธ๋ถ€ ์ •๋ณด๋ฅผ ์ง€์ •ํ•˜์—ฌ ํ”„๋กœ์ ํŠธ์˜ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋ฅผ ์‰ฝ๊ฒŒ ์—…๋ฐ์ดํŠธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฆ„ ๋ณ€๊ฒฝ, ์„ค๋ช… ์—…๋ฐ์ดํŠธ ๋˜๋Š” ๊ธฐํƒ€ ์ˆ˜์ • ๊ฐ€๋Šฅํ•œ ์†์„ฑ์„ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ๊ฐ„๋‹จํ•œ ์ฝ”๋“œ ์Šค๋‹ˆํŽซ์„ ํ†ตํ•ด ์ด๋Ÿฌํ•œ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์‹คํ–‰ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ณด์„ธ์š”:

from hub_sdk import HUBClient

credentials = {"api_key": "<YOUR-API-KEY>"}  # api key
client = HUBClient(credentials)

project = client.project("<Project ID>")  # Provide your actual project ID here
project.update({"meta": {"name": "Project name update"}})  # Update the project's name or other metadata

ํ”„๋กœ์ ํŠธ ์‚ญ์ œ

ํ”„๋กœ์ ํŠธ๊ฐ€ ๋” ์ด์ƒ ํ•„์š”ํ•˜์ง€ ์•Š์•„ Ultralytics ํ”Œ๋žซํผ์—์„œ ํ”„๋กœ์ ํŠธ๋ฅผ ์‚ญ์ œํ•˜๋ ค๋Š” ๊ฒฝ์šฐ, ๊ฐ„๋‹จํ•œ ์ „ํ™”๋กœ delete ๋ฉ”์„œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”. ๋‹ค์Œ ์ฝ”๋“œ์กฐ๊ฐ์€ ํ”„๋กœ์ ํŠธ์˜ ID๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ”„๋กœ์ ํŠธ๋ฅผ ์‚ญ์ œํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•ˆ๋‚ดํ•ฉ๋‹ˆ๋‹ค:

from hub_sdk import HUBClient

credentials = {"api_key": "<YOUR-API-KEY>"}  # api key
client = HUBClient(credentials)

project = client.project("<Project ID>")  # Input the project ID for the project to delete
project.delete()  # This will permanently delete your project

ํ”„๋กœ์ ํŠธ ๋ชฉ๋ก ๋ฐ ํƒ์ƒ‰

๊ฒฝ์šฐ์— ๋”ฐ๋ผ ํ”„๋กœ์ ํŠธ๋ฅผ ๋‘˜๋Ÿฌ๋ณด๊ฑฐ๋‚˜ Ultralytics ์—์„œ ๊ณต๊ฐœ ํ”„๋กœ์ ํŠธ๋ฅผ ํ™•์ธํ•˜๊ณ  ์‹ถ์„ ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ์›ํ•˜๋Š” ํŽ˜์ด์ง€ ํฌ๊ธฐ์˜ ํ”„๋กœ์ ํŠธ ๋ชฉ๋ก์„ ๊ฐ€์ ธ์™€์„œ ์ด ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ฝ”๋“œ ์Šค๋‹ˆํŽซ์€ ํ˜„์žฌ ํŽ˜์ด์ง€ ๊ฒฐ๊ณผ๋ฅผ ๋ณด๊ณ  ๋‹ค์Œ ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•œ ๋‹ค์Œ ์ด์ „ ํŽ˜์ด์ง€๋กœ ๋Œ์•„๊ฐ€๋Š” ๋ฐฉ๋ฒ•์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค. ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋‹ค์–‘ํ•œ ํ”„๋กœ์ ํŠธ๋ฅผ ํƒ์ƒ‰ํ•  ์ˆ˜ ์žˆ๋Š” ์ข‹์€ ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค:

from hub_sdk import HUBClient

credentials = {"api_key": "<YOUR-API-KEY>"}  # api key
client = HUBClient(credentials)

projects = client.project_list(page_size=10)  # Fetch a list of projects with specified page size
print("Current result:", projects.results)  # Display the projects in the current page

projects.next()  # Navigate to the next page
print("Next page result:", projects.results)  # Display the projects after pagination

projects.previous()  # Go back to the previous page
print("Previous page result:", projects.results)  # Confirm the projects in the previous page

์ถ•ํ•˜๋“œ๋ฆฝ๋‹ˆ๋‹ค! ์ด์ œ Ultralytics HUB-SDK์—์„œ ๋จธ์‹  ๋Ÿฌ๋‹ ํ”„๋กœ์ ํŠธ๋ฅผ ์†์‰ฝ๊ฒŒ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ์ง€์‹์„ ๊ฐ–์ถ”๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ์ž‘์—…์„ ์‹คํ—˜ํ•ด๋ณด๊ณ  ๋จธ์‹  ๋Ÿฌ๋‹ ์ž‘์—…์ด ๋”์šฑ ์ฒด๊ณ„์ ์ด๊ณ  ํšจ์œจ์ ์œผ๋กœ ์ง„ํ–‰๋˜๋Š” ๊ณผ์ •์„ ์ง€์ผœ๋ณด์„ธ์š”. ๊ถ๊ธˆํ•œ ์ ์ด ์žˆ๊ฑฐ๋‚˜ ์ถ”๊ฐ€ ์ง€์›์ด ํ•„์š”ํ•˜๋ฉด ์–ธ์ œ๋“ ์ง€ ์ง€์› ์ปค๋ฎค๋‹ˆํ‹ฐ์— ๋ฌธ์˜ํ•˜์„ธ์š”. ํ–‰๋ณตํ•œ ์ฝ”๋”ฉ! ๐Ÿš€


๋Œ“๊ธ€