{"id":21343771,"url":"https://github.com/catalystcode/imaginem-functions","last_synced_at":"2026-03-09T15:04:17.511Z","repository":{"id":73517103,"uuid":"83777901","full_name":"CatalystCode/Imaginem-Functions","owner":"CatalystCode","description":"Azure functions for the configurable image recognition and classification pipeline","archived":false,"fork":false,"pushed_at":"2017-05-03T13:54:11.000Z","size":26,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-12T15:39:59.724Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CatalystCode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2017-03-03T08:50:48.000Z","updated_at":"2023-08-29T10:36:25.000Z","dependencies_parsed_at":"2023-04-06T13:24:39.310Z","dependency_job_id":null,"html_url":"https://github.com/CatalystCode/Imaginem-Functions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CatalystCode/Imaginem-Functions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatalystCode%2FImaginem-Functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatalystCode%2FImaginem-Functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatalystCode%2FImaginem-Functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatalystCode%2FImaginem-Functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CatalystCode","download_url":"https://codeload.github.com/CatalystCode/Imaginem-Functions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatalystCode%2FImaginem-Functions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30299884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T14:33:48.460Z","status":"ssl_error","status_checked_at":"2026-03-09T14:33:48.027Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11-22T01:15:19.030Z","updated_at":"2026-03-09T15:04:17.503Z","avatar_url":"https://github.com/CatalystCode.png","language":"C#","readme":"# Imaginem-Functions\nAzure functions for the configurable image recognition and classification pipeline\n\nDetails on how to [develop for Azure function](https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-csharp) and the [Azure Function tools for Visual Studio](https://blogs.msdn.microsoft.com/webdev/2016/12/01/visual-studio-tools-for-azure-functions/)\n\n\n# Adding a function \nEach function is added to its own folder and contains the following artifacts:\n\n```\nfunction.json   // your function binding\nproject.json    // your project dependencies\nrun.csx         // your code\ntest.json       // your test message\n```\n## Implementing the function.json\n\nHere an example implementation for `samplefunction`:\n\n```csharp\n#load \"..\\Common\\FunctionHelper.csx\"\n\nusing System;\nusing System.Configuration;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Linq;\nusing Microsoft.WindowsAzure.Storage;\nusing Microsoft.WindowsAzure.Storage.Queue;\n\n// your classifier's name\nprivate const string ClassifierName = \"samplefunction\";\n\npublic static void Run(string inputMsg, TraceWriter log)\n{\n    log.Verbose($\"Process {inputMsg}\");\n    PipelineHelper.Process(SampleFunction, ClassifierName, inputMsg, log);\n}\npublic static dynamic SampleFunction(dynamic inputJson, string imageUrl, TraceWriter log)\n{ \n    // TODO: do your processing here and return the results\n\n    return new {\n        stringOutput = \"your output string value\",\n        intOutput = 10 \n    };\n}\n``` \n## Declare the dependencies\nAs the last step, you need to declare the functions dependencies in `dependencies.json`. In the example below, `facematch` depends on `faceprint` and `faceprint` depends on `facedetection`. \n\n```json\n{\n  \"facecrop\": [\"facedetection\"],\n  \"facedetection\": [],\n  \"facematch\": [\"faceprint\"],\n  \"faceprint\": [\"facedetection\"],\n  \"generalclassification\": [],\n  \"ocr\": []\n}\n```\n\nTherefore the pipeline definition for `facematch` would look like `\"facedetection,faceprint,facematch\"`\n\n## Create the test message\nEach function should contain a simple test message stored in `test.json`:\n\n```json\n{\n  \"job_definition\": {\n    \"batch_id\": \"mybatchid\",\n    \"id\": \"myjobid\",\n    \"input\": {\n      \"image_url\": \"your image url\",\n      \"image_classifiers\": [ \"classifier1\", \"classifier2\" ]\n    },\n    \"processing_pipeline\": [ \"your_input_queue_name\", \"your_output_queue_name\" ],\n    \"processing_step\": 0\n\n  },\n  \"job_output\" : {\n    \"sample_job1\" : {\n      \"output\": \"sample_job1 output\"\n    }\n  }\n}\n```\nEnsure you add all needed input data (your dependencies) as part of the `job_output` and set `your_input_queue_name` and `your_input_queue_name` for the `processing_pipeline` property.\n\n\n## Test the function locally\nTo test your functions locally, you need to update your [appsettings.json](https://github.com/CatalystCode/Imaginem-Functions/blob/master/appsettings.json#L6-L10) file:\n\n```json\n  {\n    \"IsEncrypted\": false,\n    \"Values\": {\n      \"FACES_CONTAINER\": \"faces\",\n      \"SQL_CONNECTION_STRING\": \"\u003cYOUR_SQL_CONNECTION_STRING\u003e\",\n      \"FACE_API_KEY\": \"\u003cYOUR_FACE_API_KEY\u003e\",\n      \"VISION_API_KEY\": \"\u003cYOUR_VISION_API_KEY\",\n      \"AzureWebJobsStorage\": \"\u003cYOUR_STORAGE_CONNECTION_STRING\u003e\",\n      \"AzureWebJobsDashboard\": \"\u003cYOUR_STORAGE_CONNECTION_STRING\u003e\"\n    }\n  }\n```\n\nOnce you've done that, you can either run your functions in Visual Studio or use `azure-functions-cli` directly:\n\n```\nnpm i -g azure-functions-cli\n```\n\nTo run your function, just execute \n\n```\nfunc run YourFunctionName\n```\n\nto run the tests, run the Imaginem-Cli. The following triggers the `SampleFunction` by adding its `test.json` to the `sample` queue. \n```\n.\\Imaginem-Cli.exe test SampleFunction sample\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatalystcode%2Fimaginem-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatalystcode%2Fimaginem-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatalystcode%2Fimaginem-functions/lists"}