Skip to content

Instantly share code, notes, and snippets.

View suyashgupta25's full-sized avatar

Suyash Gupta suyashgupta25

View GitHub Profile
let pixbuff : CVPixelBuffer? = (sceneView.session.currentFrame?.capturedImage)
let classificationRequest = VNCoreMLRequest(model:visionModel, completionHandler: handleDetections)
// make a global variable in your UIViewCOntroller : var requests = [VNRequest]()
self.requests = [classificationRequest]
let visionModel = try? VNCoreMLModel(for: Painting.model)
# Include module turicreate
import turicreate as tc
# Define all painting images annotations with bounding box details (I am showing only 5)
annotations = tc.SArray([
[
{'label': 'painting1', 'type': 'rectangle', 'coordinates': {'height': 725, 'width': 625, 'x': 736, 'y': 636}}
],
[
{'label': 'painting2', 'type': 'rectangle', 'coordinates': {'height': 735, 'width': 661, 'x': 396, 'y': 568}}
pip install turicreate