Spaces:
Paused
Paused
| from ModelLoader import ModelLoader | |
| import os | |
| def main(): | |
| model = ModelLoader(gpu_ids='', max_img_wh=512) | |
| model.load() | |
| # Test | |
| sample = os.path.join(os.path.dirname(__file__), 'examples', 'rawimg.png') | |
| # sample = os.path.join(os.path.dirname(__file__), 'examples', 'test.jpg') | |
| img = model.inference(src=sample) | |
| img.show() # PIL Image | |
| main() |