%3CLINGO-SUB%20id%3D%22lingo-sub-1054432%22%20slang%3D%22en-US%22%3EAccelerate%20your%20end-to-end%20ML%20lifecycles%20with%20semi-automated%20image%20annotation%20using%20Azure%20ML%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1054432%22%20slang%3D%22en-US%22%3E%3CH1%20id%3D%22toc-hId-356596533%22%20id%3D%22toc-hId-356596533%22%3EAccelerate%20your%20end-to-end%20ML%20lifecycles%20with%20semi-automated%20image%20annotation%20using%20Azure%20Machine%20Learning%3C%2FH1%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F160573iC0354DA4BCF48165%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMany%20data%20and%20machine%20learning%20scientists%20have%20had%20the%20experience%20of%20working%20on%20a%20computer%20vision%20problem%2C%20e.g.%20object%20detection%2C%20that%20requires%20a%20significant%20investment%20of%20time%20annotating%20images%20within%20an%20unlabeled%20dataset.%20While%20labeling%20data%20can%20be%20relaxing%2C%20our%20existence%20is%20impermanent.%3C%2FP%3E%0A%3CP%3EThe%20following%20cloud-based%20solution%20speeds%20up%20the%20end-to-end%20ML%20lifecycle%20by%20performing%20semi-automated%20annotation%20of%20unlabeled%20image%20data.%20This%20is%20achieved%20by%20integrating%20the%20open-source%20web-based%20image%20annotation%20tool%20COCO-Annotator%20with%20a%20custom-built%20image%20segmentation%20or%20keypoint%20detection%20model%20that%20is%20trained%20and%20deployed%20on%20Azure.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECOCO-Annotator%20allows%20developers%20to%20easily%20review%20and%20correct%20inaccurate%20segmentation%20proposals%20for%20unlabeled%20data%20generated%20by%20the%20custom-built%20model.%20Corrected%20data%20can%20then%20be%20added%20to%20the%20training%20set%20for%20retraining%20the%20model.%20As%20segmentation%20proposals%20become%20increasingly%20accurate%20over%20iterations%20of%20training%2C%20the%20developer%20has%20to%20perform%20fewer%20corrections%20to%20the%20segmentation%20proposals.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1047158007%22%20id%3D%22toc-hId-1047158007%22%3ECOCO-Annotator%3C%2FH2%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fjsbroks%2Fcoco-annotator%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ECOCO-Annotator%3C%2FA%3E%20is%20an%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fjsbroks%2Fcoco-annotator%2Fblob%2Fmaster%2FLICENSE.md%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Eopen-source%3C%2FA%3E%20web-based%20image%20annotation%20tool%20for%20creating%20%3CA%20href%3D%22http%3A%2F%2Fcocodataset.org%2F%23home%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ECOCO-style%3C%2FA%3E%20training%20sets%20for%20object%20detection%20and%20segmentation%2C%20and%20for%20keypoint%20detection.%20If%20you%20follow%20the%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fjsbroks%2Fcoco-annotator%2Fwiki%2FGetting-Started%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Einstallation%20instructions%3C%2FA%3E%2C%20you%20will%20be%20all%20set%20within%20minutes%3A%20You%20simply%20clone%20the%20github%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fjsbroks%2Fcoco-annotator%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Erepository%3C%2FA%3E%2C%20and%20spin%20up%20the%20container%20with%20%E2%80%9C%3CA%20href%3D%22https%3A%2F%2Fdocs.docker.com%2Fcompose%2Finstall%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Edocker-compose%3C%2FA%3E%20up%E2%80%9D.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--760296456%22%20id%3D%22toc-hId--760296456%22%3EData%20Science%20Virtual%20Machine%3C%2FH2%3E%0A%3CP%3EI%E2%80%99m%20running%20COCO-Annotator%20on%20a%20lightweight%20because%20this%20allows%20me%20to%20annotate%20images%20on%20my%20workstation%20in%20the%20office%20or%20on%20my%20notebook%20or%20tablet%E2%80%99s%20touchscreen.%20I%20can%20even%20share%20the%20address%20of%20my%20DSVM%20with%20colleagues%20so%20that%20I%20don%E2%80%99t%20have%20to%20annotate%20all%20images%20myself.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1727216377%22%20id%3D%22toc-hId-1727216377%22%3ESet%20up%20an%20annotation%20service%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FH2%3E%0A%3CP%3ECOCO-Annotator%20supports%20model-based%20image%20annotation%20with%20models%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fjsbroks%2Fcoco-annotator%2Fwiki%2FUsage%23using-models%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Eout%20of%20the%20box%3C%2FA%3E%2C%20requiring%20only%20a%20single%20configuration%20step%20to%20enable%20a%20trained%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Ffacebookresearch%2Fmaskrcnn-benchmark%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EMaskRCNN%3C%2FA%3E%20segmentation%20model.%20Another%20exciting%20feature%20of%20COCO-Annotator%20is%20that%20you%20can%20point%20it%20towards%20any%20%3CA%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FRepresentational_state_transfer%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ERest%3C%2FA%3E%20API%20endpoint%20for%20automatically%20annotating%20your%20images%20as%20long%20as%20the%20Rest%20API%20endpoint%20returns%20COCO-style%20annotations%20in%20%3CA%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FJSON%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EJSON%3C%2FA%3E%20format.%20This%20can%20be%20extremely%20useful%20if%20you%20are%20working%20on%20a%20dataset%20with%20category%20labels%20specific%20to%20your%20use-case.%20In%20a%20typical%20workflow%20scenario%2C%20you%20might%20annotate%20a%20couple%20of%20images%2C%20use%20them%20to%20fine-tune%20a%20model%20pretrained%20on%20another%20dataset%2C%20then%20use%20the%20resulting%20model%20to%20semi-automatically%20label%20more%20images%2C%20iteratively%20growing%20your%20training%20set%20and%20improving%20the%20performance%20of%20your%20model.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20mentioned%20above%2C%20COCO-Annotator%20expects%20COCO-style%20annotations%20in%20JSON%20format%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-python%22%3E%3CCODE%3Eresponse_body%20%3D%20json.dumps(%7B%0A%20%20%20%20%22images%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22id%22%3A%20101%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22dataset_id%22%3A%202%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22path%22%3A%20%22%2Fdatasets%2Fgiraffe%2Fgiraffe%2F00102e5c-500.jpg%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22width%22%3A%20500%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22height%22%3A%20280%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22file_name%22%3A%20%2200102e5c-500.jpg%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%2C%0A%20%20%20%20%22categories%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22id%22%3A%205%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%22giraffe%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22supercategory%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22color%22%3A%20%22%238924e8%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22metadata%22%3A%20%7B%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%2C%0A%20%20%20%20%22annotations%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22id%22%3A%2037%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22image_id%22%3A%20101%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22category_id%22%3A%205%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22segmentation%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20270%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20...%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2036%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22area%22%3A%2017044%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22bbox%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20190%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2036%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20150%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20244%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22iscrowd%22%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22isbbox%22%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22color%22%3A%20%22%235ad956%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22keypoints%22%3A%20%5B%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22metadata%22%3A%20%7B%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%7D)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDepending%20on%20your%20use-case%2C%20you%20may%20want%20to%20perform%20automated%20annotation%20with%20a%20model%20you%20have%20deployed%20in%20production%2C%20e.g.%20on%20an%20auto-scaling%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fservices%2Fkubernetes-service%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EAKS%3C%2FA%3E%20cluster.%20This%20way%20you%20will%20get%20first-hand%20exposure%20to%20the%20performance%20of%20the%20production%20model.%20Alternatively%2C%20you%20can%20run%20a%20local%20docker%20container%20on%20the%20same%20DSVM%20on%20which%20you%20are%20running%20COCO-Annotator.%20If%20you%20built%20the%20container%20image%20with%20the%20AML%20SDK%2C%20you%20can%20use%20the%20same%20image%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmachine-learning%2Fservice%2Fhow-to-troubleshoot-deployment%23debug-the-service%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Elocally%3C%2FA%3E%20as%20you%20would%20deploy%20in%20production%20to%20AKS%20or%20an%20Edge%20device.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F160571iD6427B59632BD6AA%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_1.png%22%20title%3D%22clipboard_image_1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EFigure%201%3A%20Simply%20click%20on%20the%20%E2%80%9CImage%20Settings%E2%80%9D%20wheel%20in%20the%20left%20panel.%20Enter%20the%20URL%20to%20the%20REST%20endpoint%20that%20returns%20coco-style%20image%20annotations%20as%20JSON%20data.%20Then%20you%20can%20click%20the%20%E2%80%9Cdownload%20from%20cloud%E2%80%9D%20button%20in%20the%20left%20panel%20to%20have%20images%20annotated%20automatically.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--80238086%22%20id%3D%22toc-hId--80238086%22%3EDataset%20storage%3C%2FH2%3E%0A%3CP%3EDepending%20on%20your%20setup%2C%20you%20may%20also%20want%20to%20consider%20maintaining%20your%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmachine-learning%2Fservice%2Fhow-to-create-register-datasets%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Edataset%3C%2FA%3E%20on%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fservices%2Fstorage%2Fblobs%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Azure%20Blob%20Storage%3C%2FA%3E.%20That%20way%20you%20could%20hook%20up%20an%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmachine-learning%2Fservice%2Fconcept-ml-pipelines%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Machine%20Learning%20Pipeline%3C%2FA%3E%20to%20a%20storage%20container%2C%20to%20automatically%20retrain%20your%20model%20with%20the%20newly%20annotated%20training%20data.%20More%20importantly%2C%20this%20way%20the%20data%20will%20be%20available%20even%20when%20the%20DSVM%20is%20shut%20down.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20simplify%20your%20workflow%20significantly%20by%20mounting%20your%20Azure%20Blob%20Storage%20container%20on%20your%20DSVM%2C%20so%20that%20COCO-annotator%20datasets%20are%20directly%20stored%20in%20your%20storage%20container.%20Just%20follow%20these%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Fblobs%2Fstorage-how-to-mount-container-linux%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Einstructions%3C%2FA%3E%2C%20then%20create%20a%20symbolic%20link%20from%20the%20dataset%20directory%20of%20COCO-Annotator%20to%20the%20mount%20directory%20for%20that%20storage%20container.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1887692549%22%20id%3D%22toc-hId--1887692549%22%3EUse%20Azure%20Machine%20Learning%20pipelines%20to%20retrain%20the%20model%3C%2FH2%3E%0A%3CP%3EIf%20you%20store%20your%20dataset%20in%20Azure%20Blob%20Storage%2C%20either%20manually%20or%20by%20mounting%20the%20container%20on%20the%20machine%20running%20COCO-Annotator%2C%20you%20should%20consider%20using%20AML%20pipelines%20to%20retrain%20your%20model%20with%20the%20newly%20annotated%20data.%20Your%20AML%20pipeline%20could%20be%20a%20sequence%20of%20steps%2C%20from%20data%20ingestion%20to%20registering%20the%20model%20in%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmachine-learning%2Fservice%2Fhow-to-deploy-and-where%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ethe%20AML%20model%20registry%3C%2FA%3E.%20You%20could%20even%20perform%20automated%20hyperparameter%20sweeps%20with%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmachine-learning%2Fservice%2Fhow-to-tune-hyperparameters%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EHyperDrive%3C%2FA%3E%20while%20retraining%20your%20model.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOne%20great%20feature%20of%20AML%20pipelines%20is%20that%20you%20can%20set%20up%20a%20scheduler%20that%20checks%20according%20to%20a%20desired%20polling%20interval%20whether%20there%20have%20been%20any%20changes%20to%20the%20dataset%20in%20your%20storage%20container.%20For%20example%2C%20the%20scheduler%20could%20check%20once%20a%20day%20whether%20the%20dataset%20was%20updated.%20You%20can%20of%20course%20also%20manually%20trigger%20a%20pipeline%20run%2C%20if%20you%20feel%20you%20have%20annotated%20enough%20images%20for%20one%20day.%20You%20can%20even%20take%20it%20a%20step%20further%2C%20and%20add%20a%20step%20at%20the%20beginning%20of%20your%20pipeline%20that%20calculates%20more%20advanced%20statistics%20on%20your%20dataset%2C%20to%20determine%20whether%20it%20is%20worth%20triggering%20a%20full%20run%20of%20the%20training%20pipeline.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-599820284%22%20id%3D%22toc-hId-599820284%22%3EUpdate%20annotation%20service%20with%20MLOps%3C%2FH2%3E%0A%3CP%3EIf%20you%20haven%E2%80%99t%20used%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmachine-learning%2Fservice%2Fconcept-model-management-and-deployment%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EMLOps%3C%2FA%3E%20extension%20for%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fservices%2Fdevops%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20DevOps%3C%2FA%3E%2C%20now%20might%20be%20a%20good%20time%20to%20check%20it%20out.%20You%20can%20define%20a%20release%20pipeline%2C%20such%20that%20the%20annotation%20service%20is%20updated%20with%20your%20model%2C%20if%20the%20above%20AML%20pipeline%20has%20registered%20a%20new%20model%20in%20the%20AML%20model%20registry.%20You%20can%20condition%20the%20updating%20of%20your%20deployment%20on%20whether%20the%20new%20model%20performs%20better%20on%20some%20hold-out%20dataset.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20let%20me%20know%20if%20you%20found%20this%20useful%20or%20need%20more%20info.%20Thanks.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1054432%22%20slang%3D%22en-US%22%3E%3CP%3ESemi-automated%20image%20annotation%20of%20unlabeled%20data%20speeds%20up%20the%20end-to-end%20machine%20learning%20life%20cycle.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1054432%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Machine%20Learning%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EE2E%20Solutions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EImage%20Annotation%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EKeypoint%20Detection%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMachine%20Learning%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMLOps%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EObject%20Segmentation%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Accelerate your end-to-end ML lifecycles with semi-automated image annotation using Azure Machine Learning

 

clipboard_image_0.png

 

Many data and machine learning scientists have had the experience of working on a computer vision problem, e.g. object detection, that requires a significant investment of time annotating images within an unlabeled dataset. While labeling data can be relaxing, our existence is impermanent.

The following cloud-based solution speeds up the end-to-end ML lifecycle by performing semi-automated annotation of unlabeled image data. This is achieved by integrating the open-source web-based image annotation tool COCO-Annotator with a custom-built image segmentation or keypoint detection model that is trained and deployed on Azure.

 

COCO-Annotator allows developers to easily review and correct inaccurate segmentation proposals for unlabeled data generated by the custom-built model. Corrected data can then be added to the training set for retraining the model. As segmentation proposals become increasingly accurate over iterations of training, the developer has to perform fewer corrections to the segmentation proposals.

 

COCO-Annotator

COCO-Annotator is an open-source web-based image annotation tool for creating COCO-style training sets for object detection and segmentation, and for keypoint detection. If you follow the installation instructions, you will be all set within minutes: You simply clone the github repository, and spin up the container with “docker-compose up”.

 

Data Science Virtual Machine

I’m running COCO-Annotator on a lightweight because this allows me to annotate images on my workstation in the office or on my notebook or tablet’s touchscreen. I can even share the address of my DSVM with colleagues so that I don’t have to annotate all images myself.

 

Set up an annotation service             

COCO-Annotator supports model-based image annotation with models out of the box, requiring only a single configuration step to enable a trained MaskRCNN segmentation model. Another exciting feature of COCO-Annotator is that you can point it towards any Rest API endpoint for automatically annotating your images as long as the Rest API endpoint returns COCO-style annotations in JSON format. This can be extremely useful if you are working on a dataset with category labels specific to your use-case. In a typical workflow scenario, you might annotate a couple of images, use them to fine-tune a model pretrained on another dataset, then use the resulting model to semi-automatically label more images, iteratively growing your training set and improving the performance of your model.

 

As mentioned above, COCO-Annotator expects COCO-style annotations in JSON format:

 

response_body = json.dumps({
    "images": [
        {
            "id": 101,
            "dataset_id": 2,
            "path": "/datasets/giraffe/giraffe/00102e5c-500.jpg",
            "width": 500,
            "height": 280,
            "file_name": "00102e5c-500.jpg"
        }
    ],
    "categories": [
        {
            "id": 5,
            "name": "giraffe",
            "supercategory": "",
            "color": "#8924e8",
            "metadata": {}
        }
    ],
    "annotations": [
        {
            "id": 37,
            "image_id": 101,
            "category_id": 5,
            "segmentation": [
                [
                    270,
                    ...
                    36
                ]
            ],
            "area": 17044,
            "bbox": [
                190,
                36,
                150,
                244
            ],
            "iscrowd": false,
            "isbbox": false,
            "color": "#5ad956",
            "keypoints": [],
            "metadata": {}
        }
    ]
})

 

Depending on your use-case, you may want to perform automated annotation with a model you have deployed in production, e.g. on an auto-scaling AKS cluster. This way you will get first-hand exposure to the performance of the production model. Alternatively, you can run a local docker container on the same DSVM on which you are running COCO-Annotator. If you built the container image with the AML SDK, you can use the same image locally as you would deploy in production to AKS or an Edge device.

clipboard_image_1.png

Figure 1: Simply click on the “Image Settings” wheel in the left panel. Enter the URL to the REST endpoint that returns coco-style image annotations as JSON data. Then you can click the “download from cloud” button in the left panel to have images annotated automatically.

 

Dataset storage

Depending on your setup, you may also want to consider maintaining your dataset on Azure Blob Storage. That way you could hook up an Azure Machine Learning Pipeline to a storage container, to automatically retrain your model with the newly annotated training data. More importantly, this way the data will be available even when the DSVM is shut down.

 

You can simplify your workflow significantly by mounting your Azure Blob Storage container on your DSVM, so that COCO-annotator datasets are directly stored in your storage container. Just follow these instructions, then create a symbolic link from the dataset directory of COCO-Annotator to the mount directory for that storage container.

 

Use Azure Machine Learning pipelines to retrain the model

If you store your dataset in Azure Blob Storage, either manually or by mounting the container on the machine running COCO-Annotator, you should consider using AML pipelines to retrain your model with the newly annotated data. Your AML pipeline could be a sequence of steps, from data ingestion to registering the model in the AML model registry. You could even perform automated hyperparameter sweeps with HyperDrive while retraining your model.

 

One great feature of AML pipelines is that you can set up a scheduler that checks according to a desired polling interval whether there have been any changes to the dataset in your storage container. For example, the scheduler could check once a day whether the dataset was updated. You can of course also manually trigger a pipeline run, if you feel you have annotated enough images for one day. You can even take it a step further, and add a step at the beginning of your pipeline that calculates more advanced statistics on your dataset, to determine whether it is worth triggering a full run of the training pipeline.

 

Update annotation service with MLOps

If you haven’t used the MLOps extension for Azure DevOps, now might be a good time to check it out. You can define a release pipeline, such that the annotation service is updated with your model, if the above AML pipeline has registered a new model in the AML model registry. You can condition the updating of your deployment on whether the new model performs better on some hold-out dataset.

 

Please let me know if you found this useful or need more info. Thanks.