A PACS company wants to provide AI to its customers (for example - MediLab). Note - the PACS company has the ability to themselves select which algorithm they want to offer - all they have to do is change the inference project ID in their API.
Create Deployment project
Create account on CARPL
Create Dataset
Name: Deployment at Site_1
Description: The dataset for deployment of AI Algorithm #2 at Site_1
Modality: <Choose appropriate>
Click on "Create Dataset"
Click on "Go to Dataset Manager"
Upload studies either by
Browser upload
API Upload ( https://documenter.getpostman.com/view/12410320/T1LV8iyD?version=latest#ae0df535-eeb5-47b0-9576-475a75a1b489 )
Enable Dicom Receive to get AE title and port to push data directly from PACS
Create Inferencing Project
Name: Deployment at Site_1_Algo#2
Description: An inference project to drive the deployment of Algo#2 at Site_1
Algorithm: <Choose appropriate - Algo#2>
Dataset: Deployment at Site_1
Execute commands (If Executing through API)
One-time checks
POST: Show datasets >> get the dataset_ID of Deployment at Site_1
import requestsurl = "https://demo.carpl.ai/api/v1/datasets"payload = {}headers= {}response = requests.request("POST", url, headers=headers, data = payload)print(response.text.encode('utf8'))POST: Show inference projects >> get the inference project ID of Deployment at Site_1_Algo#2
import requestsurl = "https://demo.carpl.ai/api/v1/inf_projects"payload = {}headers= {}response = requests.request("POST", url, headers=headers, data = payload)print(response.text.encode('utf8'))POST: Generate Auth Token >> get authorization token every hourUpload data to Deployment at Site_1
POST: Upload studies >> use dataset_ID from 2.1.1
import requestsurl = "https://demo.carpl.ai/api/v1/upload"payload = {'dataset_id': '<dataset_id>','anon': '0/1'}files = [('file', open('/path/to/file','rb'))]headers = {'token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbGlkIjoicm9oaXQudGFraGFyQGNhcmluZy1yZXNlYXJjaC5jb20iLCJ1c2VyaWQiOjEsImV4cCI6MTU5NjM3OTY0OH0.kz6sHNdcu5HUdCOAIEjCYYpkbloTEklmUcdOK0RyDH8'}response = requests.request("POST", url, headers=headers, data = payload, files = files)print(response.text.encode('utf8'))Run inference in Inferencing Project
POST: Run algorithm will start automatically
import requestsurl = "https://demo.carpl.ai/api/v1/run_algorithm"payload = {'project_id': '<inference_id>', 'studies': '["d21f59437e74298df2d4ab453ee2c9f0e8319f1283369175b58054532d5fcd70"]'}files = []headers= {}response = requests.request("POST", url, headers=headers, data = payload, files = files)print(response.text.encode('utf8'))POST: Download Inference of study
import requestsurl = "https://demo.carpl.ai/api/v1/inf_download_study"payload = {'study_id': '967b5e49f491a4a33a1903f0c4f4697be187a3488e1ff841de8d35e0a0503a46','project_id': '<inference_id>'}files = []headers= {}response = requests.request("POST", url, headers=headers, data = payload, files = files)print(response.text.encode('utf8'))Repeat steps 2.2 and 2.3 every-time new data is being pushed to CARPL for inference.