apple / ml-cvnets

CVNets: A library for training computer vision networks
https://apple.github.io/ml-cvnets
Other
1.76k stars 225 forks source link

How to convert segmentation model results into VNInstanceMaskObservation? #93

Open darwinharianto opened 12 months ago

darwinharianto commented 12 months ago

I can preview segmentation model on XCode by setting the type to imagesegmenter

mlmodel.user_defined_metadata["com.apple.coreml.model.preview.type"] = "imageSegmenter"

I think this has the same underlying data with VNInstanceMaskObservation

How do I convert the result from that model into it?

Tranbaber commented 11 months ago

@darwinharianto Hello! I'm trying to train MobileViT model, but I'm having the following problem and am asking for help

File "C:\Users\72344.conda\envs\MobileViTv2\Scripts\cvnets-train.exemain.py", line 4, in ModuleNotFoundError: No module named 'main_train'

And I tried to download this module, but show "ERROR: Could not find a version that satisfies the requirement main_train (from versions: none) ERROR: No matching distribution found for main_train"

Can you tell what can I do? Thank you very much!

darwinharianto commented 11 months ago

@Tranbaber some people already gave the answers https://github.com/apple/ml-cvnets/issues/94 https://github.com/apple/ml-cvnets/issues/78#issuecomment-1633518775

Tranbaber commented 11 months ago

@darwinharianto Thank you very much!

Tranbaber commented 11 months ago

@darwinharianto but now,it show that "ModuleNotFoundError: No module named 'data.sampler'" Can you tell me how should I do?