gpt4 book ai didi

ios - 错误 : Cannot subscript a value of type '[String : Any]' with an index of type 'UIImagePickerController.InfoKey'

转载 作者:可可西里 更新时间:2023-11-01 00:55:08 24 4
gpt4 key购买 nike

<分区>

我正在尝试通过 CoreML 重建用于图像检测的 Apple 测试应用程序,但出现错误:

Cannot subscript a value of type '[String : Any]' with an index of type 'UIImagePickerController.InfoKey

extension ImageClassificationViewController: UIImagePickerControllerDelegate, UINavigationControllerDelegate {
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String: Any]) {
picker.dismiss(animated: true)

let image = info[UIImagePickerControllerOriginalImage] as! UIImage
imageView.image = image
updateClassifications(for: image)
}

错误出现在行中:

let image = info[UIImagePickerControllerOriginalImage] as! UIImage

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com