Auto Label

 

1) English Documentation

2) Türkçe Dökümantasyon


Introduction:

 

The project has been developed to automate data collection and data labeling processes in image processing projects and optimize the workflow. This project automatically saves frames using pre-trained models, records the x, y, w, h coordinates of detected objects on these frames, and necessary data in txt-xml-json formats according to your needs. You can also automatically split the collected frames and labels into training and test sets if desired. This project supports labeling formats required by models such as Yolo, SSD, Tensorflow, and Pytorch, making it much easier to create custom models. For example, if you have a model that detects cars but want to identify and classify specific car brands according to your needs, you can automatically label car brands within seconds using your pre-trained model.

To download and try the project, visit https://github.com/muratcengizz/AutoLabel.

 

Workflow:

Within the project folder, you should provide suitable values for variables in the configuration.yaml file named "configuration.yaml." Then, you should use the functions shown in the documentation during the prediction process.

 

Documentation:

AutoLabel/workspace/configuration/configuration.yaml
# coco.names = {0: 'person', 1: 'bicycle', 2: 'car', 3: 'motorbike', 4: 'airplane', 5: 'bus', 6: 'train', 7: 'truck', 8: 'boat', 9: 'traffic light', 10: 'fire hydrant', 11: 'stop sign', 12: 'parking meter', 13: 'bench', 14: 'bird', 15: 'cat', 16: 'dog', 17: 'horse', 18: 'sheep', 19: 'cow', 20: 'elephant', 21: 'bear', 22: 'zebra', 23: 'giraffe', 24: 'backpack', 25: 'umbrella', 26: 'handbag', 27: 'tie', 28: 'suitcase', 29: 'frisbee', 30: 'skis', 31: 'snowboard', 32: 'sports ball', 33: 'kite', 34: 'baseball bat', 35: 'baseball glove', 36: 'skateboard', 37: 'surfboard', 38: 'tennis racket', 39: 'bottle', 40: 'wine glass', 41: 'cup', 42: 'fork', 43: 'knife', 44: 'spoon', 45: 'bowl', 46: 'banana', 47: 'apple', 48: 'sandwich', 49: 'orange', 50: 'broccoli', 51: 'carrot', 52: 'hot dog', 53: 'pizza', 54: 'donut', 55: 'cake', 56: 'chair', 57: 'sofa', 58: 'potted plant', 59: 'bed', 60: 'dining table', 61: 'toilet', 62: 'tv monitor', 63: 'laptop', 64: 'mouse', 65: 'remote', 66: 'keyboard', 67: 'cell phone', 68: 'microwave', 69: 'oven', 70: 'toaster', 71: 'sink', 72: 'refrigerator', 73: 'book', 74: 'clock', 75: 'vase', 76: 'scissors', 77: 'teddy bear', 78: 'hair dryer', 79: 'toothbrush'}


LABELS:
  - 0
  - 67

RENAME_LABELS:
  - 

LABEL_FORMAT:
  - xml

TRAIN_TEST_SPLIT:
  - {"train":80}

ROOT_DIR:
  - "C:\\Users\\murat\\Documents\\tensorflow\\AutoLabel\\workspace"


IMAGES_LABELS_PATH:
  - "C:\\Users\\murat\\Documents\\tensorflow\\AutoLabel\\workspace\\dataset\\collected_images"

LABELS: This variable should contain the key-values of the classes you want to create a dataset from among the class names in the coco.names variable in the comments.

RENAME_LABELS: If you want the names of your selected classes to be different from the names in the coco.names variable, you can use this variable.

RENAME_LABELS:
  - 

If left blank as shown above, it means that you do not wish to rename your labels and prefer to use the default names. Your labels will not be renamed.

NOTE: If you intend to rename your labels using the RENAME_LABELS variable, please remember that the number of parameters in the LABELS variable and the number of parameters in the RENAME_LABELS variable must be equal.

LABEL_FORMAT: This variable should contain the format in which you want to output your labels. Auto Label supports txt-xml-json formats.

LABEL_FORMAT:
  - xml
# or
LABEL_FORMAT:
  - txt
# or 
LABEL_FORMAT:
  - json

TRAIN_TEST_SPLIT: This variable is related to whether you want to split your data into training and test sets after collecting it.

TRAIN_TEST_SPLIT:
  - 

If you do not want to split your data into training and test sets, you can leave this variable blank as follows.

ROOT_DIR: This variable should contain the path to your project. After downloading the project to your computer, right-click on the workspace folder and select "copy as path" to provide the file path.

# if you use windows;
ROOT_DIR:
  - "C:\\Users\\murat\\Documents\\tensorflow\\AutoLabel\\workspace"
# if you use macos, linux or unix;
ROOT_DIR:
  - "home/ubuntu/murat/AutoLabel/workspace"

IMAGES_LABELS_PATH: This variable should contain the path to the folder where frames and label files will be saved.

# if you use windows;
IMAGES_LABELS_PATH:
  - "C:\\Users\\murat\\Documents\\tensorflow\\AutoLabel\\workspace\\dataset\\collected_images"
# if you use macos, linux or unix;
IMAGES_LABELS_PATH:
  - "home/ubuntu/murat/AutoLabel/workspace/dataset/collected_images"

Advanced Usage

Now, we will see how to use Auto Label with the pre-trained YOLOv8 algorithm. After understanding the basic usage of functions, we will delve into the details of the functions.

#AutoLabel/predict.py
from ultralytics import YOLO
import cv2
import os 
from workspace.utils.get_label import GetLabel
from workspace.utils.get_train_test_split import GetTrainTestSplit
from workspace.processing import Processing
from workspace.utils.get_rename_labels import GetRenameLabels
class Predict:
    def __init__(self):
        if os.name == "nt":
            self.slash_type = "\\"
        elif os.name == "posix":
            self.slash_type = "/"
        self.model = YOLO(f"{os.path.join('workspace', 'models')}{self.slash_type}yolov8n.pt")
        self.get_label = GetLabel()
        self.processing = Processing()
        self.get_rename_labels = GetRenameLabels()
    def predict(self):
        video = cv2.VideoCapture(0)
        
        while True:
            retval, frame = video.read()
            if not retval: break
            frame = cv2.flip(src=frame, flipCode=1)
            
            _, label_list = self.get_label.get_label_from_yaml()
            predict = self.model.predict(frame, classes=label_list)
            for result in predict:
                boxes = result.boxes.cpu().numpy()
                class_list = []
                for box in boxes:
                    x, y, w, h = box.xyxy[0].astype(int)

                    names = result.names[int(box.cls[0])]
                    
                    class_list.append([names,x,y,w,h])
                    
                    message = self.processing.process(frame=frame, class_list=class_list)
                    print(message)
                    
                    #cv2.rectangle(img=frame, pt1=(x1,y1), pt2=(w1,h1), color=(0, 0, 255), thickness=2)
                    #cv2.putText(img=frame, text=names, org=(x1, y1-20), fontFace=cv2.FONT_HERSHEY_SIMPLEX, fontScale=1, color=(0, 255, 100), thickness=2)
            cv2.imshow(winname="Prediction", mat=frame)
            if cv2.waitKey(1) == ord("q"): break
        
p1 = Predict()
p1.predict()

We should use the "get_label_from_yaml()" function from the GetLabel class. This function provides the parameters we have given in the LABELS variable within the configuration.yaml configuration file as output in a list. We will use this output, as shown below, to specify the classes that the YOLOv8 model should detect. This way, the model can work more optimally and prevent unnecessary objects in the frames from causing confusion.

predict = self.model.predict(frame, classes=label_list)

Now, you should use the "process()" function from the Processing class. This function takes as input the frame and the label of the detected object within a list, along with x, y, width, and height coordinates. Within the function, the frame is saved as a jpg image file in the "collected_images" folder. Additionally, the coordinates of the detected object within the frame are saved in the "collected_images" folder according to the label format specified in the LABEL_FORMAT variable within the configuration.yaml configuration file. If an error occurs during these processes, the "process()" function returns a string value containing an error message. If the processes are completed successfully, it returns "None".

Using Auto Label is this simple. Here are all the functions available in the Auto Label library:


get_label_from_yaml() -> label_status, user_label_list

from workspace.utils.get_label import GetLabel
label_status, user_label_list = GetLabel().get_label_from_yaml()

This function retrieves the parameters in the LABELS variable in the configuration.yaml file. It checks if the user entered the parameters correctly. If there is no error in the LABELS variable, label_status is set to 1; if there is an error, label_status is set to 0. The user_label_list variable contains the names of the labels the user wants to detect.


get_label_format_from_yaml() -> label_format_status, label_format

from workspace.utils.get_label_format import GetLabelFormat
label_format_status, label_format = GetLabelFormat().get_label_format_from_yaml()

This function retrieves the parameter in the LABEL_FORMAT variable in the configuration.yaml file. It checks if the user entered the parameter correctly. If there is no error in the LABEL_FORMAT variable, label_format_status is set to 1; if there is an error, label_format_status is set to 0. The label_format variable contains the preferred label format (txt, xml, json).


get_train_test_split_from_yaml() -> return message

from workspace.utils.get_train_test_split import GetTrainTestSplit
message = GetTrainTestSplit().get_train_test_split_from_yaml()

This function retrieves the TRAIN_TEST_SPLIT parameter in the configuration.yaml file. It checks if the user entered the parameter correctly. If there is no error in the TRAIN_TEST_SPLIT variable, it performs the process of splitting the data into training and test sets and returns a success message. If there is an error in the TRAIN_TEST_SPLIT variable or if an error occurs during the process, it returns an error message.


process() -> [user_label_list, label_format, root_dir, images_labels_path]

from workspace.utils.process import Process
user_label_list, label_format, root_dir, images_labels_path = Process().process()

This function gathers all modules under the workspace.utils directory into one framework. After processing all the variables in the configuration.yaml file, it checks if all the modules worked successfully. If there is an error, it returns an error message. If there is no error, it returns the variables mentioned above.


process() -> message

from workspace.conversion.yolo_label import YoloFormatAutoLabel
message = YoloFormatAutoLabel().process()

This function performs labeling in the txt file format based on the frame, class name, and coordinates obtained during the prediction. It returns a string value as output, indicating the success of the process.


process() -> message

from workspace.conversion.tf_xml_label import TensorflowXmlFormatAutoLabel
message = TensorflowXmlFormatAutoLabel().process()

This function performs labeling in the xml file format based on the frame, class name, and coordinates obtained during the prediction. It returns a string value as output, indicating the success of the process.


process() -> message

from workspace.conversion.tf_json_label import TensorflowJsonFormatAutoLabel
message = TensorflowJsonFormatAutoLabel().process()

This function performs labeling in the json file format based on the frame, class name, and coordinates obtained during the prediction. It returns a string value as output, indicating the success of the process.


process() -> message

from workspace.processing import Processing
message = Processing().process()

This function, based on the LABEL_FORMAT variable in the configuration.yaml file, directs the flow to YoloFormatAutoLabel(), TensorflowXmlFormatAutoLabel(), or TensorflowJsonFormatAutoLabel() classes.

These functions can be used to streamline the process of data collection, labeling, and model creation in image processing projects.

 

 


 

1) Giriş

Proje, görüntü işleme projelerinde ki veri toplama, veri etiketleme işlemlerini otonom hale getirmek ve süreci optimize etmek için yazılmıştır. Bu proje, hazır modelleri kullanarak frame'leri, frame'ler üzerinde tespit edilen nesnelerin x,y,w,h koordinatlarını ve gerekli verileri ihtiyacınıza göre txt-xml-json formatlarında ki dosyalara otomatik olarak kaydeder. Ve dilerseniz toplanan frame'leri ve etiketleri train-test setlerine otomatik olarak ayırabilirsiniz. Yolo, SSD, Tensorflow, Pytorch gibi modellerin ihtiyaç duyduğu etiketleme formatlarını destekleyen bu proje, custom modeller oluşturabilmenizi oldukça kolaylaştırır. Örneğin arabaları tespit eden bir modeliniz var. Fakat ihtiyacınıza göre belirli araba markalarını tespit etmek ve sınıflandırmak istiyorsunuz. Hazır modelinizi kullanarak araba markalarını saniyeler içerisinde otomatik olarak etiketleyebilirsiniz. 
Projeyi indirmek ve deneyimlemek için https://github.com/muratcengizz/AutoLabel adresini ziyaret edebilirsiniz.


2) Akış

  • Proje klasörü içerisinde ki configuration.yaml isimli yapılandırma dosyası içerisinde ki değişkenlere sizin için uygun olan değerleri vermelisiniz.
  • Sonra yapmanız gereken tek şey tahmin işlemi sırasında dökümantasyonda gösterilen fonksiyonları kullanmak.

3) Dökümantasyon

AutoLabel/workspace/configuration/configuration.yaml
# coco.names = {0: 'person', 1: 'bicycle', 2: 'car', 3: 'motorbike', 4: 'airplane', 5: 'bus', 6: 'train', 7: 'truck', 8: 'boat', 9: 'traffic light', 10: 'fire hydrant', 11: 'stop sign', 12: 'parking meter', 13: 'bench', 14: 'bird', 15: 'cat', 16: 'dog', 17: 'horse', 18: 'sheep', 19: 'cow', 20: 'elephant', 21: 'bear', 22: 'zebra', 23: 'giraffe', 24: 'backpack', 25: 'umbrella', 26: 'handbag', 27: 'tie', 28: 'suitcase', 29: 'frisbee', 30: 'skis', 31: 'snowboard', 32: 'sports ball', 33: 'kite', 34: 'baseball bat', 35: 'baseball glove', 36: 'skateboard', 37: 'surfboard', 38: 'tennis racket', 39: 'bottle', 40: 'wine glass', 41: 'cup', 42: 'fork', 43: 'knife', 44: 'spoon', 45: 'bowl', 46: 'banana', 47: 'apple', 48: 'sandwich', 49: 'orange', 50: 'broccoli', 51: 'carrot', 52: 'hot dog', 53: 'pizza', 54: 'donut', 55: 'cake', 56: 'chair', 57: 'sofa', 58: 'potted plant', 59: 'bed', 60: 'dining table', 61: 'toilet', 62: 'tv monitor', 63: 'laptop', 64: 'mouse', 65: 'remote', 66: 'keyboard', 67: 'cell phone', 68: 'microwave', 69: 'oven', 70: 'toaster', 71: 'sink', 72: 'refrigerator', 73: 'book', 74: 'clock', 75: 'vase', 76: 'scissors', 77: 'teddy bear', 78: 'hair dryer', 79: 'toothbrush'}


LABELS:
  - 0
  - 67

RENAME_LABELS:
  - 

LABEL_FORMAT:
  - xml

TRAIN_TEST_SPLIT:
  - {"train":80}

ROOT_DIR:
  - "C:\\Users\\murat\\Documents\\tensorflow\\AutoLabel\\workspace"


IMAGES_LABELS_PATH:
  - "C:\\Users\\murat\\Documents\\tensorflow\\AutoLabel\\workspace\\dataset\\collected_images"

LABELS: Bu değişken, yorum satırındaki coco.names isimli değişkenin içerisinde ki sınıf isimleri arasından veri seti oluşturmak istediğiniz sınıfın anahtar değerini-değerlerini almalıdır.

RENAME_LABELS: Bu değişkeni, seçtiğiniz sınıfların etiketlerinizin isminin coco.names değişkeninde ki isimlerden farklı olmasını istiyorsanız kullanabilirsiniz.

RENAME_LABELS:
  - 

Eğer yukarıdaki gibi boş bırakırsanız, etiketlerinizi yeniden isimlendirmek istemediğiniz ve default isimleri kullanmak istediğiniz anlamına gelir. Ve etiketleriniz yeniden isimlendirilmez.

NOT: Eğer RENAME_LABELS isimli değişkeni kullanarak etiketlerinizi yeniden isimlendirmek istiyorsanız, LABELS değişkenin parametrelerinin sayısı ile RENAME_LABELS değişkeninin parametrelerinin sayısının birbirine eşit olması gerektiğini lütfen unutmayınız.

LABEL_FORMAT: Bu değişken, etiketlerinizi hangi formatta çıktı almak istediğinizi içermelidir. Auto Label, txt-xml-json formatlarını destekler. Örnek kullanımı aşağıdaki gibidir.

LABEL_FORMAT:
  - xml
# or
LABEL_FORMAT:
  - txt
# or 
LABEL_FORMAT:
  - json

TRAIN_TEST_SPLIT: Bu değişken, verilerinizi topladıktan sonra eğitim ve test setlerine ayırmak isteyip istemediğiniz bilgisi ile ilgilenir. Eğer ayırmak istiyorsanız aşağıdaki formatta yüzdelik olarak oranı belirtmelisiniz. Test verilerinin oranını belirtmenize gerek yoktur. %100 - %Train = %Test formülü ile algoritma otomatik olarak eğitim ve test setlerini ayıracaktır.

TRAIN_TEST_SPLIT:
  - {"train":80}
# or
TRAIN_TEST_SPLIT:
  - {"train":70}

Eğer verilerinizi eğitim ve test setlerine ayırmak istemiyorsanız bu değişkeni aşağıdaki şekilde boş bırakabilirsiniz.

TRAIN_TEST_SPLIT:
  - 

ROOT_DIR: Bu değişken, projenizin yolunu içermelidir. Projeyi bilgisayarınıza indirdikten sonra workspace klasörüne sağ tıklayın ve "copy as path" seçeneğini seçerek dosya yolunu bu değişkene verin.

# if you use windows;
ROOT_DIR:
  - "C:\\Users\\murat\\Documents\\tensorflow\\AutoLabel\\workspace"
# if you use macos, linux or unix;
ROOT_DIR:
  - "home/ubuntu/murat/AutoLabel/workspace"

IMAGES_LABELS_PATH: Bu değişken, frame'lerin ve etiket dosyalarının kaydedileceği klasörün yolunu içermelidir. Auto Label'da bu yol workspace/dataset/collected_images olmalıdır.

# if you use windows;
IMAGES_LABELS_PATH:
  - "C:\\Users\\murat\\Documents\\tensorflow\\AutoLabel\\workspace\\dataset\\collected_images"
# if you use macos, linux or unix;
IMAGES_LABELS_PATH:
  - "home/ubuntu/murat/AutoLabel/workspace/dataset/collected_images"

 

İleri Düzey Kullanım:

Şimdi ise, yolov8 algoritmasının hazır ağırlık dosyasını kullanarak Auto Label'ı nasıl kullanacağımızı göreceğiz. Auto Label'ı kullanabilmek için temel fonksiyonların kullanımını gördükten sonra detaylı olarak fonksiyonları inceleyeceğiz.

#AutoLabel/predict.py
from ultralytics import YOLO
import cv2
import os 
from workspace.utils.get_label import GetLabel
from workspace.utils.get_train_test_split import GetTrainTestSplit
from workspace.processing import Processing
from workspace.utils.get_rename_labels import GetRenameLabels
class Predict:
    def __init__(self):
        if os.name == "nt":
            self.slash_type = "\\"
        elif os.name == "posix":
            self.slash_type = "/"
        self.model = YOLO(f"{os.path.join('workspace', 'models')}{self.slash_type}yolov8n.pt")
        self.get_label = GetLabel()
        self.processing = Processing()
        self.get_rename_labels = GetRenameLabels()
    def predict(self):
        video = cv2.VideoCapture(0)
        
        while True:
            retval, frame = video.read()
            if not retval: break
            frame = cv2.flip(src=frame, flipCode=1)
            
            _, label_list = self.get_label.get_label_from_yaml()
            predict = self.model.predict(frame, classes=label_list)
            for result in predict:
                boxes = result.boxes.cpu().numpy()
                class_list = []
                for box in boxes:
                    x, y, w, h = box.xyxy[0].astype(int)

                    names = result.names[int(box.cls[0])]
                    
                    class_list.append([names,x,y,w,h])
                    
                    message = self.processing.process(frame=frame, class_list=class_list)
                    print(message)
                    
                    #cv2.rectangle(img=frame, pt1=(x1,y1), pt2=(w1,h1), color=(0, 0, 255), thickness=2)
                    #cv2.putText(img=frame, text=names, org=(x1, y1-20), fontFace=cv2.FONT_HERSHEY_SIMPLEX, fontScale=1, color=(0, 255, 100), thickness=2)
            cv2.imshow(winname="Prediction", mat=frame)
            if cv2.waitKey(1) == ord("q"): break
        
p1 = Predict()
p1.predict()

GetLabel isimli sınıf üzerinden get_label_from_yaml() fonksiyonunu kullanmalıyız. Bu fonksiyon configuration.yaml yapılandırma dosyası içerisinde LABELS değişkenine verdiğimiz parametreleri bir liste içerisinde çıktı verir. Bu çıktıyı, aşağıdaki gibi kullanarak yolov8 modelinin tespit etmesi gereken sınıfları belirtmek için kullanacağız. Böylece model daha optimize şekilde çalışabilecek ve frame'ler içerisinde işimize yaramayan nesnelerin kafamızı karıştırmasını önlemiş olacağız.

predict = self.model.predict(frame, classes=label_list)

Şimdi ise, Processing isimli sınıf üzerinden process() fonksiyonunu kullanmalıyız. Bu fonksiyon girdi olarak frame'i ve bir liste içerisinde tespit edilen nesnenin etiketini, x,y,width,height koordinatlarını alır.  Ve fonksiyon içerisinde frame jpg uzantılı bir resim dosyası olarak collected_images klasörüne kaydedilir. Ayrıca frame içerisinde tespit edilen nesnenin koordinatları da configuration.yaml yapılandırma dosyasında LABEL_FORMAT isimli değişkene verdiğiniz etiket formatına göre collected_images klasörüne kaydedilir. Eğer bu işlemler sırasında bir hata alınırsa, process() fonksiyonu çıktı olarak hata mesajını içeren string değer döndürür. İşlemler başarılı bir şekilde gerçekleştirilirse ise None değeri döner.

class_list.append([names,x,y,w,h])
message = self.processing.process(frame=frame, class_list=class_list)
print(message)

İşte Auto Label'ı kullanmak bu kadar basit. Auto Label kütüphanesinde kullanabileceğiniz tüm fonksiyonlar aşağıdaki gibidir.


get_label_from_yaml() -> label_status, user_label_list

from workspace.utils.get_label import GetLabel
label_status, user_label_list = GetLabel().get_label_from_yaml()

Bu fonksiyon, configuration.yaml yapılandırma dosyasındaki LABELS isimli değişkenin parametrelerini alır. Kullanıcının parametreleri doğru girip girmediğini kontrol eder. Eğer LABELS değişkeninde bir hata yok ise, label_status=1 değerini alır. Eğer LABELS değişkeninde bir hata var ise label_status=0 değerini alır. user_label_list değişkeni ise kullanıcının tespit etmek istediği etiketlerin isimlerini içerir.


get_label_format_from_yaml() -> label_format_status, label_format

from workspace.utils.get_label_format import GetLabelFormat
label_format_status, label_format = GetLabelFormat().get_label_format_from_yaml()

Bu fonksiyon, configuration.yaml yapılandırma dosyasındaki LABEL_FORMAT isimli değişkenin parametresini alır. Kullanıcının parametreyi doğru girip girmediğini kontrol eder. Eğer LABEL_FORMAT değişkeninde bir hata yok ise, label_format_status=1 değerini alır. Eğer LABEL_FORMAT değişkeninde bir hata var ise label_format_status=0 değerini alır. label_format değişkeni ise kullanıcının etiketini hangi formatta kaydetmek istediğini içerir. (txt, xml, json)


get_train_test_split_from_yaml() -> return message

from workspace.utils.get_train_test_split import GetTrainTestSplit
message = GetTrainTestSplit().get_train_test_split_from_yaml()

Bu fonksiyon, configuration.yaml yapılandırma dosyasındaki TRAIN_TEST_SPLIT isimli değişkenin parametresini alır. Kullanıcının parametreyi doğru girip girmediğini kontrol eder. Eğer TRAIN_TEST_SPLIT değişkeninde bir hata yok ise, eğitim ve test setlerini ayırma işlemi yapılır ve sürecin başarılı bir şekilde işlediğine dair bilgilendirme mesajı return eder. Eğer TRAIN_TEST_SPLIT değişkeninde bir hata var ise veya işlem sırasında bir hata meydana geldiyse, hata mesajı return eder.


process() ->[user_label_list, label_format, root_dir, images_labels_path]

from workspace.utils.process import Process
user_label_list, label_format, root_dir, images_labels_path = Process().process()

Bu fonksiyon, workspace.utils dizinin altındaki tüm modülleri tek bir çatı altında toplar. Configuration.yaml yapılanndırma dosyasındaki tüm değişkenlerin işlenmesinin ardından tüm modüllerin başarılı bir şekilde çalışıp çalışmadığını hata ayıklamayla ile kontrol eder ve eğer hata varsa hata mesajı döndürür, hata yoksa da yukarıdaki değişkenleri return eder.


process() -> message

from workspace.conversion.yolo_label import YoloFormatAutoLabel
message = YoloFormatAutoLabel().process()

Bu fonksiyon, predict işleminden gelen frame, sınıf ismi ve koordinatları kullanarak txt dosya formatı üzerinde etiketleme işlemi yapar. Çıktı olarak string değer döndürür. Bu değer işlemin başarılı olup olmadığı hakkında bilgi verir.


process() -> message

from workspace.conversion.tf_xml_label import TensorflowXmlFormatAutoLabel
message = TensorflowXmlFormatAutoLabel().process()

Bu fonksiyon, predict işleminden gelen frame, sınıf ismi ve koordinatları kullanarak xml dosya formatı üzerinde etiketleme işlemi yapar. Çıktı olarak string değer döndürür. Bu değer işlemin başarılı olup olmadığı hakkında bilgi verir.


process() -> message

from workspace.conversion.tf_json_label import TensorflowJsonFormatAutoLabel
message = TensorflowJsonFormatAutoLabel().process()

Bu fonksiyon, predict işleminden gelen frame, sınıf ismi ve koordinatları kullanarak json dosya formatı üzerinde etiketleme işlemi yapar. Çıktı olarak string değer döndürür. Bu değer işlemin başarılı olup olmadığı hakkında bilgi verir.


process() -> message

from workspace.processing import Processing
message = Processing().process()

Bu fonksiyon, configuration.yaml dosyasındaki LABEL_FORMAT değişkeninin değerine göre akışı YoloFormatAutoLabel(), TensorflowXmlFormatAutoLabel() veya TensorflowJsonFormatAutoLabel() sınıflarına yönlendirir.