One can know if one is chaiv (liable to) mitah (death penalty), makkos (lashes), mammon (money) - the beit din says. But how can one know if he is chaiv karet (being cut off)? Also, does karet require two witnesses? Can one get karet for a violation b'shogeg?
Karet does not require witnesses or a warning. These are required for a punishment given by a human court, so that the human court knows that the sin was intentional. So for a penalty of lashes or the death penalty. However, if there is a presence of witnesses and warning then the court can give lashes for an offence that is chayev karet. (Source: Makot, mishna and g'mara).
You cannot get karet for a violation b'shogeg, and for most such instances, you are chayiv a "chatat", for example, if you ate Chametz forgetting that it is Pesach.
If you have committed an intentional "chatet" violation, there may be a possibility to overturn the decree with sincere Teshuva. (and possibly tefilla and tzedaka in addition..).
As a karet punishment is heavenly, G-d knows what your intention was and does not need human witnesses to testify, or for you to be warned if you already know what you are about to do is wrong and rebellious (and would carry a karet penalty).