class_docstr: 🤗 Constructor for the DETR Object Detection trainer
class_docstr_tok: ["\ud83e\udd17","Constructor","for","the","DETR","Object","Detection","trainer"]
code: def __splitDatasets(self):
      print("Load Datasets...")
  
      # Train Dataset in the COCO format
      self.train_dataset = CocoDetection(
          img_folder=self.train_path,
          feature_extractor=self.feature_extractor,
      )
  
      # Dev Dataset in the COCO format
      self.val_dataset = CocoDetection(
          img_folder=self.dev_path,
          feature_extractor=self.feature_extractor,
      )
  
      # Test Dataset in the COCO format
      self.test_dataset = CocoDetection(
          img_folder=self.test_path,
          feature_extractor=self.feature_extractor,
      )
  
      print(self.train_dataset)
      print(self.val_dataset)
      print(self.test_dataset)
  
      workers = int(os.cpu_count() * 0.75)
  
      # Train Dataloader
      self.train_dataloader = DataLoader(
          self.train_dataset,
          collate_fn=self.collator,
          batch_size=self.batch_size,
          shuffle=self.shuffle,
          num_workers=workers,
      )
  
      # Validation Dataloader
      self.val_dataloader = DataLoader(
          self.val_dataset,
          collate_fn=self.collator,
          batch_size=self.batch_size,
          num_workers=workers,
      )
  
      # Test Dataloader
      self.test_dataloader = DataLoader(
          self.test_dataset,
          collate_fn=self.collator,
          batch_size=self.batch_size,
          num_workers=workers,
      )
  
      return (
          self.train_dataloader,
          self.val_dataloader,
          self.test_dataloader,
      )
  
imports: import os
  import math
  import random
  import argparse
  from pathlib import Path
  from datetime import datetime
  from collections import Counter
  import torch
  import torchmetrics
  from torch.utils.data import DataLoader
  from pytorch_lightning import Trainer
  from sklearn.metrics import precision_recall_fscore_support
  from hugsvision.models.Detr import Detr
  from hugsvision.dataio.CocoDetectionDataset import CocoDetection
  from hugsvision.dataio.ObjectDetectionCollator import ObjectDetectionCollator
  from hugsvision.inference.ObjectDetectionInference import ObjectDetectionInference
  from transformers import DetrFeatureExtractor
label_desc: Use image node_id 4 for calling the ObjectDetectionTrainer obj's underlying member method code with example usage: obj.__splitDatasets() and returns: self,  self,  self