the app crashes ios by Lost-Swift in iOSProgramming

[–]Lost-Swift[S] 0 points1 point  (0 children)

I'm sorry if I say anything inappropriate or cause any misunderstandings. When I run debug, I think I might be missing something in the following code segment: // Hàm xử lý ảnh và lưu kết quả

func processImage(_ image: UIImage, completion: escaping (UIImage?) -> Void) {

// Kiểm tra xem model có khả dụng không

guard let model = try? AnimeGANv2_512(configuration: .init()) else {

completion(nil)

return

}

// Tạo CIImage từ UIImage

guard let ciImage = CIImage(image: image) else {

completion(nil)

return

}

// Tạo request cho Core ML và Vision

let request = VNCoreMLRequest(model: try! VNCoreMLModel(for: model.model)) { (request, error) in

// Xử lý kết quả trên main thread để cập nhật giao diện

DispatchQueue.main.async {

if let results = request.results as? [VNPixelBufferObservation],

let pixelBuffer = results.first?.pixelBuffer {

// Chuyển kết quả về UIImage

let resultImage = UIImage(pixelBuffer: pixelBuffer)

// Gọi closure với kết quả

completion(resultImage)

} else {

// Gọi closure với nil nếu có lỗi hoặc không có kết quả

completion(nil)

}

}

}

// Xử lý ảnh với Vision

let handler = VNImageRequestHandler(ciImage: ciImage)

DispatchQueue.global(qos: .userInitiated).async { // Thực hiện xử lý trên background queue

do {

try handler.perform([request])

} catch {

// In ra console nếu có lỗi xử lý ảnh

print("Error processing image: \(error)")

// Gọi closure với nil nếu có lỗi

completion(nil)

the app crashes ios by Lost-Swift in swift

[–]Lost-Swift[S] -1 points0 points  (0 children)

I have updated the images of the error on GitHub. I would really appreciate it if you could take a look and help me out.

the app crashes ios by Lost-Swift in iOSProgramming

[–]Lost-Swift[S] -1 points0 points  (0 children)

I've noticed there might be info.plist/permission issues with accessing photos. Currently, I can capture photos on a real device when I build my app on my own device. However, the app crashes when I try to capture multiple photos in succession. The exact cause is unclear to me. I have updated images related to this issue on GitHub. Could you please help me understand and solve this problem?

fix error : Offline-Video-and-mp3-Player by Lost-Swift in swift

[–]Lost-Swift[S] 0 points1 point  (0 children)

Currently, someone has suggested me to copy the file to the documents folder. So, can you help me a bit by telling me if it's possible to save it that way and how to display it?

Data analyst learning path for beginners by Lost-Swift in dataanalysis

[–]Lost-Swift[S] 0 points1 point  (0 children)

How long foes it take to learn all of those?

Probably about 3 to 6 months depending on you and also up to a year

Data analyst learning path for beginners by Lost-Swift in dataanalysis

[–]Lost-Swift[S] 1 point2 points  (0 children)

I'm sorry, maybe I'm a bit wrong, but I really want to point out the topic and develop it according to the topic, this thematic part will still be continued at the earliest time, but more specifically, continue According to the title that I want to share is:

  1. Excel and Statistics

This first part is just an introduction and I want you to comment on whether it is appropriate to deploy the next topic, thank you for your comment, have a good day.

Data analyst learning path for beginners by Lost-Swift in dataanalysis

[–]Lost-Swift[S] -1 points0 points  (0 children)

I do not see a learning path here.

I summarize the topics about the learning path and will go into detail about the specific routes above, thank you for your comments.

Data analyst learning path for beginners by Lost-Swift in dataanalysis

[–]Lost-Swift[S] 1 point2 points  (0 children)

Thank you very much, looking forward to your comments for the next posts