Parcourir la source

Update README.md

Igor Pavlov il y a 2 ans
Parent
commit
c8b3dba0d5
1 fichiers modifiés avec 11 ajouts et 1 suppressions
  1. 11 1
      README.md

+ 11 - 1
README.md

@@ -22,7 +22,17 @@ To test model you can run `test.py` file.
 
 ## Examples
 
-You can find usage examples in [example.ipynb](example.ipynb)
+```python
+from PIL import Image
+from CRAFT import CRAFTModel, draw_polygons
+
+model = CRAFTModel('weights/', 'cuda', use_refiner=True, fp16=True)
+img = Image.open('images/cafe_sign.jpg')
+polygons = model.get_polygons(img)
+result = draw_polygons(img, polygons)
+```
+
+You can find more usage examples in [example.ipynb](example.ipynb)
 
 ![](images/cafe_sign.jpg)