ModuleNotFoundError - Please, pip install . '[image]'
See original GitHub issue🐛 Bug
The finetuning object dection example https://lightning-flash.readthedocs.io/en/latest/reference/object_detection.html#finetuning fails with error
Exception has occurred: ModuleNotFoundError
Please, pip install . '[image]'
To Reproduce
Steps to reproduce the behavior:
Run the lightning flash object detection fine tuning example.
https://lightning-flash.readthedocs.io/en/latest/reference/object_detection.html#finetuning
Code sample
import flash
from flash.core.data.utils import download_data
from flash.image import ObjectDetectionData, ObjectDetector
# 1. Download the data
# Dataset Credit: https://www.kaggle.com/ultralytics/coco128
download_data("https://github.com/zhiqwang/yolov5-rt-stack/releases/download/v0.3.0/coco128.zip", "data/")
# 2. Load the Data
datamodule = ObjectDetectionData.from_coco(
train_folder="data/coco128/images/train2017/",
train_ann_file="data/coco128/annotations/instances_train2017.json",
val_split=0.3,
batch_size=4,
num_workers=4,
)
# 3. Build the model
model = ObjectDetector(model="retinanet", num_classes=datamodule.num_classes)
# 4. Create the trainer
trainer = flash.Trainer(max_epochs=3, limit_train_batches=1, limit_val_batches=1)
# 5. Finetune the model
trainer.finetune(model, datamodule=datamodule)
# 6. Save it!
trainer.save_checkpoint("object_detection_model.pt")`
Expected behavior
The fine-tuning example of object detection is expected to run.
Environment
- PyTorch Version: 1.7.1
- OS (e.g., Linux): Ubuntu 20.04
- How you installed PyTorch: Pip
- Python version: Python 3.6.13 :: Anaconda, Inc.
- cuDNN version: 7.6
- GPU models and configuration:
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
ModuleNotFoundError: No module named 'Image' in Python
To solve the error, install the module by running the pip install Pillow command.
Read more >No module named Image - python - Stack Overflow
6 Answers 6 · 1) make sure it is available python -m pip install Image · 2) where is it available? sudo find...
Read more >ModuleNotFounderror: No Module Named 'Image' in Python
Quick Fix: Python raises the ModuleNotFoundError: No module named 'Image' when the PIL/pillow library providing the module Image is not installed but used ......
Read more >ModuleNotFoundError - Please, pip install . '[image]' · Issue #341
The fine-tuning example of object detection is expected to run. Environment. PyTorch Version: 1.7.1; OS (e.g., Linux): Ubuntu 20.04; How you installed PyTorch: ......
Read more >ModuleNotFoundError: No module named 'PIL' - Python Help
usr/bin/python3 # On 10/4/22 I installed version Python 3.10.7 # Does ... from PIL import Image # ModuleNotFoundError: No module named 'PIL'
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@deepseek-eoghan Thank you for your interest!
No, you cannot create a branch in this repository. First, you need to fork (=copy) this repository for you to make changes. Here’s an overview for contribution:
You can find more details at https://github.com/PyTorchLightning/lightning-flash/blob/master/.github/CONTRIBUTING.md.
Great thanks @akihironitta, am I able to make a branch to make the changes for the PR?