{"id":17311318,"url":"https://github.com/dnth/ram-onnx-inference","last_synced_at":"2025-03-27T01:13:44.532Z","repository":{"id":255642845,"uuid":"852667999","full_name":"dnth/ram-onnx-inference","owner":"dnth","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-09T07:59:32.000Z","size":27631,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T18:12:22.613Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dnth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-05T07:57:22.000Z","updated_at":"2024-10-01T13:53:11.000Z","dependencies_parsed_at":"2024-09-06T13:13:40.245Z","dependency_job_id":null,"html_url":"https://github.com/dnth/ram-onnx-inference","commit_stats":null,"previous_names":["dnth/ram-onnx-inference"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnth%2Fram-onnx-inference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnth%2Fram-onnx-inference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnth%2Fram-onnx-inference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnth%2Fram-onnx-inference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnth","download_url":"https://codeload.github.com/dnth/ram-onnx-inference/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245761296,"owners_count":20667895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T12:40:10.205Z","updated_at":"2025-03-27T01:13:44.504Z","avatar_url":"https://github.com/dnth.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ram-onnx-inference\n\nThis guide shows how to run the recognize-anything-model (RAM) with ONNX Runtime GPU.\n\n## 1. Install CUDA components\nInstall CUDA 12.2.2 and related tools:\n\n```bash\nconda install -y -c nvidia cuda=12.2.2 cuda-tools=12.2.2 cuda-toolkit=12.2.2 cuda-version=12.2 cuda-command-line-tools=12.2.2 cuda-compiler=12.2.2 cuda-runtime=12.2.2\n```\n\n## 2. Install cuDNN\nInstall cuDNN 9.2.1.18:\n\n```bash\nconda install cudnn==9.2.1.18\n```\n\n## 3. Install ONNX Runtime GPU\nInstall ONNX Runtime with GPU support:\n\n```bash\npip install -U onnxruntime-gpu==1.19.2\n```\n\n## 4. Install TensorRT\nInstall TensorRT and its dependencies:\n\n```bash\npip install tensorrt==10.1.0 tensorrt-cu12==10.1.0 tensorrt-cu12-bindings==10.1.0 tensorrt-cu12-libs==10.1.0\n```\n\n## 5. Set up library paths\nAdd the Conda environment's library path and TensorRT library path to LD_LIBRARY_PATH:\n\n```bash\nexport LD_LIBRARY_PATH=\"/home/dnth/mambaforge-pypy3/envs/ram-onnx-inference/lib:$LD_LIBRARY_PATH\"\nexport LD_LIBRARY_PATH=\"/home/dnth/mambaforge-pypy3/envs/ram-onnx-inference/lib/python3.11/site-packages/tensorrt_libs:$LD_LIBRARY_PATH\"\n```\n\nNote: Adjust the paths according to your Conda environment location.\n\n\nUsage:\n\n```bash\npython ram_onnx_inference_batch.py [options]\n```\n\nExample:\n```bash\npython ram_onnx_inference_batch.py --folder_path /path/to/images --num_workers 4 --model_path /path/to/ram.onnx --output_file results.parquet\n```\n\nOptions:\n- `--folder_path`: Path to the folder containing images (default: \"sample_images\")\n- `--num_workers`: Number of worker threads (default: 8)\n- `--model_path`: Path to the ONNX model file (default: \"ram.onnx\")\n- `--output_file`: Output file path for results (default: \"onnx_inference_results.parquet\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnth%2Fram-onnx-inference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnth%2Fram-onnx-inference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnth%2Fram-onnx-inference/lists"}