<jupyter_start><jupyter_text><jupyter_code>!nvidia-smi
!pip install opencv-python==4.1.2.30
!pip install keras==2.3.1
!pip install tensorflow==1.14.0
!pip install tensorflow-gpu==1.14.0
!pip install imageai
from imageai.Detection.Custom import DetectionModelTrainer

trainer = DetectionModelTrainer()
trainer.setModelTypeAsYOLOv3()
trainer.setDataDirectory(data_directory="/content/drive/My Drive/Image Ai")
trainer.setTrainConfig(num_objects=10, object_names_array=['Text'], batch_size=4, num_experiments=15, train_from_pretrained_model="/content/drive/My Drive/Image Ai/models/detection_model-ex-001--loss-0005.582.h5")
# In the above,when training for detecting multiple objects,
#set object_names_array=["object1", "object2", "object3",..."objectz"]
trainer.trainModel()<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup