Search the Community
Showing results for tags 'camera'.
-
How to trigger a ML Model from the gallery pictures?
Tobi Marsh posted a question in Various questions
I'm pursuing Machine Learning advance course and here is my question. What I would like to do is that once I open the picture library from the camera to select a photo, I will be able to make it identified by a Machine Learning Model. Does anyone know how to do it? This is the code to classify the photo: @State private var isShowPicker: Bool = false @State private var image: Image? = Image("") @State private var classificationLabel: String = "" let model = MobileNetV2() private func performImageClassification() { let currentImageName = ImagePicker(image: self.$image) guard let img = UIImage(named: "\(String(describing: currentImageName))"), let resizedImage = img.resizeTo(size: CGSize(width: 224, height: 224)), let pixelBuffer = resizedImage.toCVPixelBuffer() else { return } let output = try? model.prediction(image: pixelBuffer) if let output = output { self.classificationLabel = output.classLabel } } I am assuming I will have to call it somewhere in the image Picker Controller function which is this one: func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { let uiImage = info[UIImagePickerController.InfoKey.originalImage] as! UIImage image = Image(uiImage: uiImage) presentationMode.dismiss() } -
Witajcie, jakiś czas temu zakupiłem na naszym forum kamerkę TSGM 120M. Niestety sprzedający nie posiadał do niej płytki ze sterownikami, a sterowniki od kamery ToupTek, które niby miały działać, na razie nie działają. Może ktoś z Was posiada te sterowniki pod Windows (7, 64 bit) - w internecie ich nie mogę znaleźć. Ostatecznie spróbuję napisać do Teleskop Express, może by się podzielili...