In most machine learning tutorials ,when it comes to labeling classes in object detection ,it usually start with 1 as in below .Is ordering important when labeling classes and giving them numbers such as id:1 ,id:2 ,etc. Can we give it different numbers like id:5000 where there is only few classes ? Can we start with id:1000 for example ? does the engine expect ordered numbers for classes

I’m using transfer learning in tensorflow to train my own data ,I have some objects to train ,when I label them ,I didn’t give it ordered numbers starting from 1 ,I gave it different/random numbers like 89 ,100 .When the training is finished and I started to do inferencing ,the detected classes doesn’t show the numbers which I used for labeling ,it shows ordered numbers such as 1 ,2 ,4 etc. Those ordered numbers are not in my labels ,and they are annotating random areas in the image .I started to think ,this is the original model structure before I did the transfer learning .

I don’t know exactly which tutorial you are using but I don’t think it will work with random numbers.
What I’d expect is, the model will return an array with probabilities. Each position of the array is the probability for that class. If you mention id 5000, that would mean position 5000 of the array.
I think that the process is normalizing the ids to be a 1, 2, 3 and this might result in weird results.
I’d first try using a proper sequence of numbers and test with it.