Comments (8)
Hi, sgebr01.
I am using the original model 'isnet-general-use.pth' converted to a CoreML model '.mlmodel'.
You can get the CoreML model converted by jphon-rocky and the conversion script at the following URL.
Find IS-Net (= DIS) on the page.
https://github.com/john-rocky/CoreML-Models
And more, for your reference..., the mlmodel is 8bit quantized in the iphone app for compactness.
# Quantization sample code :Python with Apple coremltools
import coremltools as ct
from coremltools.models.neural_network import quantization_utils
# load full precision model = 32bit
model = ct.models.MLModel('ISNet_general_use.mlmodel')
# in case of 8bit quantization
quantized_model = quantization_utils.quantize_weights(model, 8)
quantized_model.save('quantized08_ISNet_general_use.mlmodel')
see https://developer.apple.com/documentation/coreml/model_customization/reducing_the_size_of_your_core_ml_app
and https://coremltools.readme.io/docs/quantization
from dis.
Hi roimulia2.
You can get the one from here.
https://drive.google.com/file/d/1-8FIZGVIXOHrAd8VljkwF0Sv8lIkBpdR/view?usp=sharing
Appendix:
Simply on Google Colab, mlmodel can be converted to 8bits-quantize file with below .ipynb code.
from google.colab import drive
drive.mount('/content/drive')
!pip install coremltools
basePath = '/content/drive/MyDrive/CoreML' # This line, edit for your work Path
import coremltools as ct
from coremltools.models.neural_network import quantization_utils
# load full precision model = 32bit
model = ct.models.MLModel(basePath+'/ISNet_general_use.mlmodel') # orign mlmodel file name
# Quantize 8bits
nbits = 8
quantized_model = quantization_utils.quantize_weights(model, nbits)
quantized_model.save(basePath+'/quantized08_ISNet_general_use.mlmodel') # save to quantized file name
print('...Finished: quantized 8bit')
from dis.
from dis.
Thanks for the reply.
I know that the dataset has a big impact, however, I was wondering because this IS-Net general use model works so well without human or animal data. As you say, maybe there is a network made that can detect some central object.
I look forward to your future research, and the V2 dataset.
Best Regards,
from dis.
@daisymind Did you make this an API, or implement a CoreML Model?
from dis.
Great thank you, I appreciate it.
from dis.
Hey @daisymind! Thank you for the info :) Any chance you can send the quantatized MLModel here? I'm having an issue setup the environment on my mac
from dis.
Perfect, thank you so much :)
from dis.
Related Issues (20)
- Update environment from CUDA10.2 to CUDA 11.8! Adapt to 4090 and A100!
- Dataset image format issues HOT 2
- Add new groups and categories HOT 1
- Shadow in image in the paper HOT 2
- DIS 2.0 HOT 6
- The skeletion of the DIS5K
- Final value of training loss HOT 1
- Difference between isnet.pth and isnet-general-use.pth HOT 1
- How to remove the thin line surrounding the edge of the object after background removal? HOT 1
- Failed installation on MacBook with M1 Processor and Ventura 13.4.1 OS HOT 6
- Not able to save image: ValueError: Can't write images with one color channel. HOT 2
- Training and fine-tuning suggestions HOT 1
- Ground Truth shape and data format for 2 class segmentation
- Require DIS v2 Dataset HOT 5
- Downloading weights issue HOT 7
- Regarding whether pre-trained encoders are necessary HOT 2
- what tar loss mean? HOT 2
- Build a high-quality dataset
- Training on custom dataset HOT 4
- Assistance with Running DIS on NVIDIA RTX A5000 GPU HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dis.