A computer-implemented method for vehicle localization using visual odometry based on evaluating a polyline homogeneity between a first set of polylines and a second set of polylines, the method comprising: rendering, by a processor, the first set of polylines onto a first image grid and the second set of polylines onto a second image grid, wherein the first image grid and the second image grid share a grid pattern; labeling one or more first cells of the first image grid to indicate at least one first polyline of the first set based on determining that the at least one first polyline occupies the one or more first cells; labeling one or more second cells of the second image grid to indicate at least one second polyline of the second set based on determining that the at least one second polyline occupies the one or more second cells; for each of the at least one first polyline in the first set, determining one or more matching cells from among the one or more second cells that matches the one or more first cells labeled to indicate said each of the least one first polyline; and determining a percent composition indicating a respective percentage of each of the at least one second polyline occupying the one or more matching cells for said each of the at least one first polyline based on the labeling of the one or more second cells, wherein the percent composition is a representation of the polyline homogeneity of the first set with respect to the second set, wherein the first set and the second set are representations of one or more objects used for a vehicle localization, the method further comprising: using the representation of the one or more objects to perform the vehicle localization based on determining that the polyline homogeneity meets threshold criteria, wherein the second set is mapped to a known location to enable the vehicle localization, wherein the vehicle localization is used for operating an autonomous vehicle, wherein the first set and the second set are determined from an image captured by camera sensors of the autonomous vehicle. rendering, by a processor, the first set of polylines onto a first image grid and the second set of polylines onto a second image grid, wherein the first image grid and the second image grid share a grid pattern; labeling one or more first cells of the first image grid to indicate at least one first polyline of the first set based on determining that the at least one first polyline occupies the one or more first cells; labeling one or more second cells of the second image grid to indicate at least one second polyline of the second set based on determining that the at least one second polyline occupies the one or more second cells; for each of the at least one first polyline in the first set, determining one or more matching cells from among the one or more second cells that matches the one or more first cells labeled to indicate said each of the least one first polyline; and determining a percent composition indicating a respective percentage of each of the at least one second polyline occupying the one or more matching cells for said each of the at least one first polyline based on the labeling of the one or more second cells, wherein the percent composition is a representation of the polyline homogeneity of the first set with respect to the second set, wherein the first set and the second set are representations of one or more objects used for a vehicle localization, the method further comprising: using the representation of the one or more objects to perform the vehicle localization based on determining that the polyline homogeneity meets threshold criteria, wherein the second set is mapped to a known location to enable the vehicle localization, wherein the vehicle localization is used for operating an autonomous vehicle, wherein the first set and the second set are determined from an image captured by camera sensors of the autonomous vehicle. using the representation of the one or more objects to perform the vehicle localization based on determining that the polyline homogeneity meets threshold criteria, wherein the second set is mapped to a known location to enable the vehicle localization, wherein the vehicle localization is used for operating an autonomous vehicle, wherein the first set and the second set are determined from an image captured by camera sensors of the autonomous vehicle.