This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install turicreate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python build.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let visionModel = try? VNCoreMLModel(for: Painting.model) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let classificationRequest = VNCoreMLRequest(model:visionModel, completionHandler: handleDetections) | |
// make a global variable in your UIViewCOntroller : var requests = [VNRequest]() | |
self.requests = [classificationRequest] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let pixbuff : CVPixelBuffer? = (sceneView.session.currentFrame?.capturedImage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let imageRequestHandler = VNImageRequestHandler(cvPixelBuffer: pixbuff!, orientation: CGImagePropertyOrientation.right, options: [:]) | |
// Run Image Request | |
do { | |
if requests.count > 0 { | |
try imageRequestHandler.perform(self.requests) | |
} | |
} catch { | |
print(error) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hdiutil resize -size <new-size-you-want>g ~/android.dmg.sparseimage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xcode-select --install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POSIXLY_CORRECT=1 sudo port install gmake libsdl git gnupg |
OlderNewer