{ "id": "9c814f0d-17ce-4c2c-805d-63c77d63c0d4", "title": "SimpleImageClassifier", "description": "A simple image classifier with parametrizable url to input picture compatible with the D4Science infrastructure", "version": "0.0.1", "jobControlOptions": [ "async-execute" ], "keywords": [ "pytorch", "docker", "python", "python3", "image classifier", "classifier" ], "metadata": [ { "title": "Marco Lettere", "role": "author", "href": "https://accounts.d4science.org/auth/admin/realms/d4science/users/09138708-9a19-4724-93d1-8c721d591da2" }, { "role": "category", "title": "Example" }, { "role": "category", "title": "Image Classifier" } ], "inputs": { "ccpimage": { "id": "ccpimage", "title": "Runtime", "description": "The image of the runtime to use for method execution. This depends on the infrastructure specific protocol for interacting with registries.", "minOccurs": 1, "maxOccurs": 1, "schema": { "type": "string", "format": "url", "contentMediaType": "text/plain", "default": "nubisware/simpleimageclassifier:latest", "readOnly": "true" } }, "ccpnote": { "id": "ccpnote", "title": "Annotations for execution", "description": "The value of this parameter will be associated as annotation to the execution.", "minOccurs": 1, "maxOccurs": 1, "schema": { "type": "string", "format": null, "contentMediaType": "text/plain", "default": "" } }, "pictureurl": { "id": "pictureurl", "title": "Input picture", "description": "The download url of the input picture to be analyzed", "minOccurs": 1, "maxOccurs": 1, "schema": { "type": "string", "format": "url", "default": "https://as1.ftcdn.net/v2/jpg/00/85/32/68/1000_F_85326806_k3nKFfDnL7BKZZpgplibILjssleez7za.jpg" } } }, "outputs": { "inputimage": { "id": "inputimage", "title": "Input image", "description": "The input image that has been analyzed by the classifier", "minOccurs": 1, "maxOccurs": 1, "metadata": [ { "title": "canegatto.jpg", "role": "file", "href": "/ccp_data/output/canegatto.jpg" } ], "schema": { "type": "string", "contentEncoding": "binary", "contentMediaType": "image/jpeg" } }, "outputimage": { "id": "outputimage", "title": "Output image", "description": "The output image is a rendered view of the classification", "minOccurs": 1, "maxOccurs": 1, "metadata": [ { "title": "canegatto_out.jpg", "role": "file", "href": "/ccp_data/output/canegatto_out.jpg" } ], "schema": { "type": "string", "contentEncoding": "binary", "contentMediaType": "image/jpeg" } } }, "additionalParameters": { "parameters": [ { "name": "execute-script", "value": [ "python3 -m simpleimageclassifier --config-file /usr/local/lib/python3.8/dist-packages/simpleimageclassifier/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml --input /ccp_data/output/canegatto.jpg --output /ccp_data/output/canegatto_out.jpg --opts MODEL.DEVICE cpu MODEL.WEIGHTS detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl", "python3 -m simpleimageclassifier --config-file /usr/local/lib/python3.8/dist-packages/simpleimageclassifier/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml --input canegatto.jpg --output canegatto_out.jpg --opts MODEL.DEVICE cpu MODEL.WEIGHTS detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl" ] }, { "name": "deploy-script", "value": [ "mkdir /ccp_data/output", "wget -q -O /ccp_data/output/canegatto.jpg {{ pictureurl }}" ] }, { "name": "undeploy-script", "value": [] }, { "name": "cancel-script", "value": [ "echo '' > /dev/null" ] }, { "name": "lifecycle", "value": [ { "time": "2024-05-28T13:42:57.211Z", "type": "shared", "user": "https://accounts.d4science.org/auth/admin/realms/d4science/users/09138708-9a19-4724-93d1-8c721d591da2", "context": "%2Fgcube%2Fdevsec%2FdevVRE" } ] } ] }, "links": [ { "rel": "compatibleWith", "title": "D4Science development Infrastructure", "href": "infrastructures/d4science-dev-swarm" }, { "rel": "compatibleWith", "title": "D4Science production Infrastructure", "href": "infrastructures/d4science-prod-swarm" } ] }